Command ‘Scan Devices’

Function: This command establishes a brief connection to the hardware and determines the devices in the network. You can then adopt the devices found into the device tree of your project.

Call: Main menu Project, context menu of a device object in the device tree.

Requirement: The settings for communication with the control device are correct. The gateway and the PLC are running. The device supports the scan function.

Note

To use the scan functionality, you must log in once in order to load the library to the controller.

The command refers to the master controller selected in the device tree. For example, an already inserted PROFINET IO controller can be selected and the command used to determine the I/O devices and I/O modules assigned to it.

After scanning, the dialog box Scan for Devices appears with the results.

Dialog box ‘Scan Devices’

Scanned devices
Device Name, Device Type, Address, Station Name, etc.

Data about the scanned device depending on network type.

When you change a value in the list of scanned devices, the value is shown in italics. This indicates that the new value has been changed in the editor in CODESYS, but not in the device. When you download the value to the device, it is shown normally.

Value that indicate differences between the project and the scanned device are shown in orange.

If several device descriptions are available for the scanned device, then the name is displayed in bold. The selection of the matching device description is resolved differently for different fieldbuses. Details can be found in the corresponding fieldbus sections.

If a device description cannot be found, then the following message is shown: “Attention! The device was not found in the repository.” Depending on the bus system, additional information is displayed, such as manufacturer number and product number. The device cannot be inserted into the project without the installed device description.

Show differences to project

aaea3925e1b0c3aec0a8640e019f7ee3_9a3f06830c0506c5c0a8640e012f0ace : The table in the dialog box also shows additional configured devices (in the device tree of the project).

aaea3925e1b0c3aec0a8640e019f7ee3_4681610f0c058035c0a8640e0049916a : The table shows all scanned devices. The configured devices are not shown.

Scan for Devices Starts a new search.
Copy to project The device that is selected in the table is inserted into the device tree in the project. If nothing is selected, then all scanned devices are shown.

Attention

If you insert devices, which are available in the device tree, to the device tree with Copy all devices to the project, then the following should be noted. The data of the Process data and <…> I/O mapping tabs of the existing devices can be overwritten with the data of the newly inserted devices.

Configured devices

This part of the dialog box is visible only when you select the Show differences to project option.

Differences between the scanned and configured devices are color-coded. Devices in green are identical on both sides. Device in red are available only in the view of the scanned or configured devices.

aaea3925e1b0c3aec0a8640e019f7ee3_dbaf42886bf35e8fc0a8640e004a3155 If you have selected a device in both views, then the scanned devices are inserted above the selected configured device.
aaea3925e1b0c3aec0a8640e019f7ee3_2e5ef9b56bf3cd8bc0a8640e004a0474 If you have selected a device in both views, then the scanned devices are inserted below the selected configured device.
aaea3925e1b0c3aec0a8640e019f7ee3_62e2e9826bf47402c0a8640e00029671 If you have selected a device in both views, then the configured devices are replaced by the selected scanned device.
aaea3925e1b0c3aec0a8640e019f7ee3_af5c5c816bf41ba5c0a8640e01f9dbf0 All scanned devices are copied to the project.
aaea3925e1b0c3aec0a8640e019f7ee3_48eeb5256bf2cf32c0a8640e00f6e291 Deletes the selected configure device.

Special settings for PROFINET

ID No.

Display only when

  • I/O device and controller are part of the same logical network
  • IP address and network mask of the I/O device are set correctly
Station name

You can modify these entries or create them again before you accept the device and its settings into the configuration of the project. If you do not define an address, then the presets are used. The presets are defined in PNIO Controller Parameter.

To determine the module structure of the station, it must possess a valid IP address (see setting the IP address with Set IP or Denominate).

NOTICE: Each device must have received a station name because the name is required in network operation for certain functionalities.

To declare the new name in the bus system, you must click the Denominate button for the selected device entry.

IP Address
Subnet mask
MAC address
IM Use this command for retrieving the I&M data (identification and maintenance) of the device and displaying it in a dialog box.
Set IP With this command, you automatically set a valid IP address within the network (network settings of the master) if the address scanned by the device is invalid.
<– Use this command for assigning the settings (Station name, IP address) from the configured device to the scanned device.
–> Use this command for assigning the settings (Station name, IP address) from the scanned device to the configured device.
Reset Resets the device settings to default values.
Blink LED In the Found Devices view, you can identify a device by its hardware by selecting the entry in the dialog and clicking Blink LED. The device should respond with a flashing signal.
Set Name+IP CODESYS attempts to set the station name and IP address that were specified for the selected slave.
Show only unnamed stations aaea3925e1b0c3aec0a8640e019f7ee3_9a3f06830c0506c5c0a8640e012f0ace : Only devices are listed that do not have an assigned station name.

Note

Please note the option of aligning: Mapping Hardware Structures in the Device Tree

See also