Table of Contents

Codesys / TwinCAT Integration

codesys_logo.jpg

machine_expert.jpg

NiLAB Gateway can be used in combination with Codesys / TwinCAT or Schneider Electric Machine Expert PLC solution.
Please use this ESI Device Description xml for configuration: :gtw_ethercat:gtw-eth-can-modbus.zip
Note that the BUS Converter is mapped as MDP (Modular Device Profile).
In order to use the ESI File in Twincat you have to copy to C:\TwinCAT\3.1\Config\Io\EtherCAT directory and then restart TwinCAT.

PDI - Input Data Structure

A maximum of 10 NLi motors can be mapped at the same time.

Address Data Type Description
0x6000UINT16Status
0x6001UINT16Current slave ID
0x6002UINT64PDO Slave Node id 1 (Status Word)
0x6003UINT64PDO Slave Node id 2 (Status Word)
0x6004UINT64PDO Slave Node id 3 (Status Word)
0x6005UINT64PDO Slave Node id 4 (Status Word)
0x6006UINT64PDO Slave Node id 5 (Status Word)
0x6007UINT64PDO Slave Node id 6 (Status Word)
0x6008UINT64PDO Slave Node id 7 (Status Word)
0x6009UINT64PDO Slave Node id 8 (Status Word)
0x600AUINT64PDO Slave Node id 9 (Status Word)
0x600BUINT64PDO Slave Node id 10 (Status Word)
0x600CUINT16INPUTS (Remote Inputs)

PDO - Output Data Structure

Address Data Type Description
0x7000UINT16GTW_CONTROL_WORD
0x7001UINT16Slave ID
0x7002UINT64Synchronization signal
0x7003UINT64PDI Slave 1 (Control Word)
0x7004UINT64PDI Slave 2 (Control Word)
0x7005UINT64PDI Slave 3 (Control Word)
0x7006UINT64PDI Slave 4 (Control Word)
0x7007UINT64PDI Slave 5 (Control Word)
0x7008UINT64PDI Slave 6 (Control Word)
0x7009UINT64PDI Slave 7 (Control Word)
0x700AUINT64PDI Slave 8 (Control Word)
0x700BUINT64PDI Slave 9 (Control Word)
0x700CUINT64PDI Slave 10 (Control Word)
0x700DUINT16OUTPUTS (Remote Outputs)

SDO Configuration data

Address Data Type Description
0x8000RercordGateway configuration
0x8001RecordPos Table Row 1
0x8002RecordPos Table Row 2
0x8003RecordPos Table Row 3
0x8004RecordPos Table Row 4
0x8005RecordPos Table Row 5
0x8006RecordPos Table Row 6
0x8007RecordPos Table Row 7
0x8008RecordPos Table Row 8
0x8009RecordPos Table Row 9
0x800ARecordPos Table Row 10
0x800BRecordSlave PDO Mapping
0x800CRecordSlave PDI Mapping
0x800DRecordCurrent Slave Modbus Data