Getting Started – Commissioning of NetX Adapters
Requirement: A NetX adapter is inserted into a slot of the computer.
1. Install drivers for Windows
If you want to use a NetX adapter with a CODESYS runtime, then you have to install the following drivers:
For CODESYS Control Win:
SysDrv3s.sys
driverFor CODESYS Control RTE:
RTIOwdmGenericc.sys
driver orSysDrv3s.sys
driverNote: The installed driver has to be passive. When using CODESYS Control RTE, it is also possible to install no specific driver at all.
Tip
When installing CODESYS Control Win, the SysDrv3s.sys
driver is saved in the program folder ../GatewayPLC/Driver
; for CODESYS Control RTE, in the ../SysDrv3s
folder.
The NetX firmware and the NetX boot loader are located in the HilscherCIFX
folder for both runtimes.
Important
The NetX firmware and the NetX Second Stage Boot Loader must be the same version. Otherwise, the NetX firmware and the fieldbus will not work.
The NetX Second Stage Boot Loader and the NetX firmware are reloaded to the NetX chip each time the runtime is started.
2. Edit the file "CODESYSControl.cfg" in the CODESYS runtime system folder
Open the file
CODESYSControl.cfg
of the respective runtime system directory in a text editor.Remove the semicolon in the section
[ComponentManager]
at the beginning of the entryCmpHilscherCIFX
so that the entry is no longer commented out.In the area
[CmpHilscherCIFX]
, follow the steps below to edit the entries for the NetX adapter and the NetX configuration.The following entries have to exist for the firmware and boot loader:
DynamicFirmware=1
BootloaderFile=./HilscherCIFX/Firmware/NETX100-BSL.bin
FirmwareFilePath=./HilscherCIFX/Firmware
If the entry
DMAMode=1
is commented out, then remove the semicolon (;
) at the beginning of the line.Remove the semicolon in front of the following entries:
Device.0.BootloaderFilePath=.\HilscherCIFX\Firmware\NETX100-BSL.bin
Device.0.Channel.0.FirmwareFile=.\.\HilscherCIFX\Firmware\cifxcom.nxf
Description:
Device.X.BootloaderFilePath
: Specifies the file path and the file name of the NetX boot loader for each NetX chip. (The relative path starts in the installation folder. Absolute paths are also possible.) If multiple NetX chips are used, the multiple files paths must also be specified:Device.0.BootloaderFilePath=.\HilscherCIFX\Firmware\NETX100-BSL.bin
Device.1.BootloaderFilePath=.\HilscherCIFX\Firmware\NETX100-BSL.bin
Device.X.Channel.X.FirmwareFile
: Specifies the file path and the file name of the NetX firmware for each NetX chip and each channel. (The relative path starts in the installation folder. Absolute paths are also possible.) In most cases, only channel 0 is used. If multiple NetX chips are used, the multiple files paths must also be specified:Device.0.Channel.0.FirmwareFile=.\HilscherCIFX\Firmware\cifxcom.nxf
Device.1.Channel.0.FirmwareFile=.\HilscherCIFX\Firmware\cifxcom.nxf
If you want to get more comprehensive logger messages from your controller (device editor of the controller, Log tab), then remove the semicolon (
;
) at the following locations: in the area[CmpHilscherCIFX]
before the entryTraceLevel=0xffffffff
, and in the area[CmpLog]
before the entries:Logger.0.Name=PlcLog
Logger.0.Filter=0xFFFFFFFF
Save the file
CODESYSControl.cfg
.
3. Creating a NetX configuration for a project
In CODESYS, click to create a new standard project. In the New Project dialog, select the Standard Project template.
In Standard Dialog, select the controller (example: CODESYS Control Win) and click OK.
The new standard project is displayed in the device tree.
Click Add Device in the context menu of the controller.
In the Add Device dialog of , select a NetX fieldbus master (example: CIFX-PB) and click Add Device.
Double-click the NetX fieldbus master in the device tree (example: CIFX-PB) and select the PROFIBUS Master – NetX Configuration tab in the editor.
Select Slot 0 from the Slot list box and NetXComChannel0 from NetX com channel.
Caution: The number of the selected slot (example: Slot 0) has to correspond to the number of the device in the file
CODESYSControl.cfg
(example:Device.0
). Likewise, the number of the selected NetX com channel (example: NetX Com channel 0) must correspond to the entries in the fileCODESYSControl.cfg
(example:Channel.0
).Log in to the controller and click
to start the application.If there are no error messages, then the NetX adapter has been configured correctly and you can now continue developing the project.