16 • Example “Transparent mode”
Application note
A500680e
6 Example “Transparent mode”
6.1 Configuration of module size
The example project includes in the first network a function block, which checks the
CAN_gateway module size by power up.
This block must be the first block in an application program. This block will reset the controller
in case that the module size needs to be adjusted. Therefore this block will only work, if the li-
brary WagoLibReset is supported by the target system.
6.2 Configuration by CoDeSys
It is assumed that the node ID of the CANopen Slave is 4. The slave will transmit one PDO
(0x184) with two bytes data. The slave will receive one PDO (0x204) with one byte data.
Before the data exchange will start, the configuration of the gateway module is checked. If the
module settings do not match with the settings in the application program, the module will be
reconfigured. This technic allows replacing a faulty module without additional tooling.
The configuration will be explained in detail, though it is recommended to do the first configura-
tion with Wago-IO-Check and take over manually the configuration to the CoDeSys structure
CAN_typFullConfiguration.
The configuration is subdivided in four sections. The register area is set in Register 32 according
to 16#0130. This is 11bit mode, 125kBaude and transparent mode.
The setting of these registers should not be changed unless a different configuration is used.
Please check the manual for detailed explanation of the bits within the registers.
The filter setting should be set to allow receiving the appropriate CAN telegrams. In this example
all telegrams from 0x184 up to 0x186 will be received. The first filter is enabled due
to”Feature1”=1. “Feature2” =1 activates the override mode for these CAN telegrams.