Commissioning the Hilscher CIFX Card
The following steps are taken to install a Hilscher CIFX network card with CODESYS Control RTE. The procedure is independent of the applied fieldbus system.
The following fieldbuses with CIFX are supported:
PROFINET Controller and PROFINET Device
PROFIBUS Master and PROFIBUS Controller
netX-CAN
EtherNet/IP Scanner
Installing the Windows driver
When you operate the Hilscher card with the CODESYS Control RTE runtime system, then you must not use the supplied Hilscher driver for the network adapter. If you use CODESYS Control RTE with NetX, then you need to install SysDrv3s.sys
(SysDrv3S
subdirectory) which is supplied with the RTE installation package.
NetX firmware and NetX boot loader
The NetX firmware and NetX boot loader are supplied together with the installation package and are located in the subfolder HilscherCIFX\Firmware
after the installation.
Adding the component
In the CODESYS Control RTE menu, click PLC Configuration.
In the dialog, switch to the Component Manager tab.
Add the optional component CmpHilscherCIFX and click OK to confirm.
Configuring RTE with "CODESYSControl.cfg"
The configuration file CODESYSControl.cfg
is located in the installation directory.
Add the component
CmpHilscherCifX
:[ComponentManager] ...Component.x=CmpHilscherCIFX ...
In the segment
CmpHilscherCIFX
, activate the corresponding lines depending on the number of CIFX cards (remove ";" at the beginning of the line).... [CmpHilscherCIFX] ;TraceLevel=0xFFFFFFFF Device.0.BootloaderFilePath=... (see image) Device.0.Channel.0.FirmwareFile=...
TraceLevel
: To activate additional debug tasks in the CODESYS loggerBootloaderFilePath
: File path and file names of the NetX boot loader for each NetX controller. A relative path starts in the installation directory. An absolute path can also be used. If you are using more than one NetX controller, then you need to specify more than one file path.... Device.0.BootloaderFilePath=NXCIF50-RTE.bin Device.1.BootloaderFilePath=NXCIF50-RTE.bin ...
Device.X.Channel.X.FirmwareFile
: File path and file names of the NetX firmware for each adapter and each channel. A relative path starts in the installation directory. An absolute path can also be used. Only "Channel 0" is used most of all. If you are using more than one NetX chip, then you need to specify more than one file path.... Device.0.Channel.0.FirmwareFile=cifxdpm.nxf Device.1.Channel.0.FirmwareFile=cifxdpm.nxf ...
Result:
Starting the Runtime System
Start the runtime system by clicking Start PLC in the SysTray menu of CODESYS Control RTE.
As soon as the runtime system is running, entries for
CmpHilscherCIFX
appear in the runtime system logger. You see the entries in the Log dialog of the device editor in CODESYS, as well as in theLogPLCxx.csv
file in the CODESYS Control RTE directory.Check the following:
The
CmpHilscherCIFX
component has to have been loaded.The toolkit version of the
CmpHilscherCIFX
component have to be displayed.The firmware is loaded. The logger notifies about the name and version of the firmware.
If you set
TraceLevel
to0xFFFFFFFF
, then information is issued fromCmpHilscherCIFX
for each configured NetX channel.
For more information, see: Tab: Log
Creating a CODESYS project with I/O configuration
Now you can create a simple CODESYS project with the running fieldbus.
Create a new standard project in CODESYS. Select the device CODESYS Control RTE when creating.
Add a CIFX-PB fieldbus master in the device tree.
Open the configuration dialog for the fieldbus master by double-clicking the entry in the device tree. Switch to the NetX Configuration tab. Set the values of Slot and NetX com channel so that they are identical to the device numbers in the configuration file
CODESYSControl.cfg
. Compare the values with the logger entries of the runtime system.Build the application. Download the application to the controller and start it.
Every node of the device tree have to be marked green now.
FAQ
The fieldbus master in the device tree is not green. How can I find the problem? | Open the configuration editor of the PLC (the Communication Settings are also found in this editor), switch to the Log tab, and click the green arrow. CODESYS loads and displays all logger entries from the PLC. Then you can search for errors and exceptions. |
There are unresolved references. | If unresolved references are present in the application, then the runtime system component is not loaded or an incorrect version is loaded. Check the CODESYS logger. The If If |
| This means that the runtime does not find the NetX adapter or chip. Check that the adapter is inserted correctly and the corresponding driver is installed. For more information, see above: Installing the Windows driver. |