TG Motion  version 421 - 4033/904 cnc 121
Real-time system for controlling servo drives and I/O modules
DIO Struct Reference

Describes one servo input/output module. More...

#include <TGM.h>

Public Attributes

int32_t Number
 number of the mapped I/O unit, interface logical number (unit 0 – Number = 0, unit 1 – Number = 1, etc.)
 
int32_t Node
 address of the physical I/O unit, which is set on the unit directly
 
int32_t Type
 
volatile int32_t Control
 bit 0 = fault reset, bit 2 = EtherCAT communication reset
 
volatile int32_t Status
 
int32_t Error
 
int32_t NumberIn
 the number of bytes used for digital inputs (1 byte = 8 digital inputs)
 
int32_t In0
 digital input octet (logical input slot 0)
 
int32_t In1
 digital input octet (logical input slot 1)
 
int32_t In2
 digital input octet (logical input slot 2)
 
int32_t In3
 digital input octet (logical input slot 3)
 
int32_t In4
 digital input octet (logical input slot 4)
 
int32_t In5
 digital input octet (logical input slot 5)
 
int32_t In6
 digital input octet (logical input slot 6)
 
int32_t In7
 digital input octet (logical input slot 7)
 
int32_t Ext_In0
 digital input octet (logical input slot 8)
 
int32_t Ext_In1
 digital input octet (logical input slot 9)
 
int32_t Ext_In2
 digital input octet (logical input slot 10)
 
int32_t Ext_In3
 digital input octet (logical input slot 11)
 
int32_t Ext_In4
 digital input octet (logical input slot 12)
 
int32_t Ext_In5
 digital input octet (logical input slot 13)
 
int32_t Ext_In6
 digital input octet (logical input slot 14)
 
int32_t Ext_In7
 digital input octet (logical input slot 15)
 
int32_t NumberOut
 the number of bytes used for digital outputs (1 byte = 8 digital outputs)
 
int32_t Out0
 digital output octet (logical output slot 0)
 
int32_t Out1
 digital output octet (logical output slot 1)
 
int32_t Out2
 digital output octet (logical output slot 2)
 
int32_t Out3
 digital output octet (logical output slot 3)
 
int32_t Out4
 digital output octet (logical output slot 4)
 
int32_t Out5
 digital output octet (logical output slot 5)
 
int32_t Out6
 digital output octet (logical output slot 6)
 
int32_t Out7
 digital output octet (logical output slot 7)
 
int32_t Ext_Out0
 digital output octet (logical output slot 8)
 
int32_t Ext_Out1
 digital output octet (logical output slot 9)
 
int32_t Ext_Out2
 digital output octet (logical output slot 10)
 
int32_t Ext_Out3
 digital output octet (logical output slot 11)
 
int32_t Ext_Out4
 digital output octet (logical output slot 12)
 
int32_t Ext_Out5
 digital output octet (logical output slot 13)
 
int32_t Ext_Out6
 digital output octet (logical output slot 14)
 
int32_t Ext_Out7
 digital output octet (logical output slot 15)
 
int32_t NumberAI
 number of connected analog inputs
 
int32_t AI0
 analog input 0
 
int32_t AI1
 analog input 1
 
int32_t AI2
 analog input 2
 
int32_t AI3
 analog input 3
 
int32_t Ext_AI0
 analog input 4
 
int32_t Ext_AI1
 analog input 5
 
int32_t Ext_AI2
 analog input 6
 
int32_t Ext_AI3
 analog input 7
 
int32_t NumberAO
 number of connected analog outputs
 
int32_t AO0
 analog output 0
 
int32_t AO1
 analog output 1
 
int32_t AO2
 analog output 2
 
int32_t AO3
 analog output 3
 
int32_t Ext_AO0
 analog output 4
 
int32_t Ext_AO1
 analog output 5
 
int32_t Ext_AO2
 analog output 6
 
int32_t Ext_AO3
 analog output 7
 
int32_t Number_MeasureAmpl
 number of connected strain gauges
 
int32_t Ext_MeasureAmpl0
 output voltage of strain gauge 0
 
int32_t Ext_MeasureAmpl1
 output voltage of strain gauge 1
 
int32_t Ext_MeasureAmpl2
 output voltage of strain gauge 2
 
int32_t Ext_MeasureAmpl3
 output voltage of strain gauge 3
 
int32_t Ext_MeasureAmpl4
 output voltage of strain gauge 4
 
int32_t Ext_MeasureAmpl5
 output voltage of strain gauge 5
 
int32_t Ext_MeasureAmpl6
 output voltage of strain gauge 6
 
int32_t Ext_MeasureAmpl7
 output voltage of strain gauge 7
 
int32_t EtherCATState
 
struct SDO Sdo
 SDO communicating channel.
 
int32_t sdoResponseTries
 unsuccessful SDO request counter from PLC
 
uint8_t RxBuffer [MAX_TX_RX_BUFFER_SIZE]
 auxiliary buffer for RX messages (either KL3403 or KL6041 terminals)
 
uint8_t TxBuffer [MAX_TX_RX_BUFFER_SIZE]
 auxiliary buffer for TX messages (either KL3403 or KL6041 terminals)
 
int32_t TS_Data [8]
 Type specific data.
 
uint32_t SysTimeDifference
 last known difference between local time and reference time in ns
 
struct ECAT_REGISTER ecatRegister
 ECAT register communication channel.
 
uint32_t ECATBusPosition
 actual physical position on the ECAT bus
 
volatile uint32_t RxPointerWrite
 
volatile uint32_t RxPointerRead
 
volatile uint32_t TxPointerWrite
 
volatile uint32_t TxPointerRead
 
int32_t IReserve1 [403]
 reserved
 

Detailed Description

Describes one servo input/output module.

Structure size is 2048 bytes

Definition at line 850 of file TGM.h.

Member Data Documentation

◆ Type

int32_t DIO::Type

I/O unit type – is not indicated in TGMotion4xx.ini, TG Motion finds out automatically the connected I/O units and updates the Dio.Type register:

Value Module type
0x0014 DIO module TG 48/40/4/4
0x00F4 DIO module TG 40/24/0/0
0x0008 DIO strain gauge old design
0x0808 DIO strain gauge new design
0x0400 FESTO FB38
0x0200 B&R
0x0100 BECKHOFF BK1120
0x0101 BECKHOFF EK1100
0x7B90 DFC IO module (16inputs, 16outputs)

Definition at line 854 of file TGM.h.

◆ Status

volatile int32_t DIO::Status

specifies the actual status of the I/O unit: - 0 = does not communicate, no communication was established or the module is faulty

  • 1 = I/O module is operational (no faults) for more details, EtherCATState register can be used

Definition at line 870 of file TGM.h.

◆ Error

int32_t DIO::Error

uses the code of the first detected fault, if the I/O unit is in fault; the value meaning depends on the particular type of the unit (see the I/O unit manual)

Definition at line 875 of file TGM.h.

◆ EtherCATState

int32_t DIO::EtherCATState

I/O unit communication status from EtherCAT point of view:

Value State
0x01 Init
0x02 Pre-Operational
0x04 Safe-Operational
0x08 Operational

Definition at line 948 of file TGM.h.

◆ RxPointerWrite

volatile uint32_t DIO::RxPointerWrite

Write index to DIO::RxBuffer. TGM writes incomming data (up to MAX_TX_RX_BUFFER_SIZE-1 bytes) from RxPointerWrite to RxPointerRead-1 and increments RxPointerWrite accordingly. Value is always modulo MAX_TX_RX_BUFFER_SIZE, i.e. from 0 to MAX_TX_RX_BUFFER_SIZE-1. Written by TGM, read by PLC.

Definition at line 970 of file TGM.h.

◆ RxPointerRead

volatile uint32_t DIO::RxPointerRead

Read index to DIO::RxBuffer. PLC reads data from RxPointerRead to DIO::RxPointerWrite, copies them to internal stream, and sets RxPointerRead to be equal to RxPointerWrite. Value must be modulo MAX_TX_RX_BUFFER_SIZE. Written by PLC, read by TGM.

Definition at line 977 of file TGM.h.

◆ TxPointerWrite

volatile uint32_t DIO::TxPointerWrite

Write index to DIO::TxBuffer. PLC writes up to MAX_TX_RX_BUFFER_SIZE-1 bytes from TxPointerWrite to TxPointerRead-1 and increments TxPointerWrite accordingly. Value must be modulo MAX_TX_RX_BUFFER_SIZE. Written by PLC, read by TGM.

Definition at line 984 of file TGM.h.

◆ TxPointerRead

volatile uint32_t DIO::TxPointerRead

Read index to DIO::TxBuffer. TGM reads data from TxPointerRead to DIO::TxPointerWrite, copies them to EtherCAT, and increments TxPointerRead up to allowable data transmit size (22 bytes for KL6041). Value is always modulo MAX_TX_RX_BUFFER_SIZE. Written by TGM, read by PLC.

Definition at line 991 of file TGM.h.


The documentation for this struct was generated from the following file: