![]() |
TG Motion
version 502 - 4034/906 cnc 126
|
Describes one servo input/output module. More...
#include <tgm.h>
Public Attributes | |
uint32_t | Number |
number of the mapped I/O unit, interface logical number (unit 0: Number = 0, unit 1: Number = 1, etc.) | |
uint32_t | Node |
address of the physical I/O unit, which is set on the unit directly | |
DIO_TYPE | Type |
volatile uint32_t | Control |
volatile uint32_t | Status |
uint32_t | Error |
uint32_t | NumberIn |
the number of bytes used for digital inputs (1 byte = 8 digital inputs) | |
uint32_t | In [N_DIG_ARRAY_SIZE] |
digital inputs, all bits are used (0 - 512 bits) | |
uint32_t | NumberOut |
the number of bytes used for digital outputs (1 byte = 8 digital outputs) | |
uint32_t | Out [N_DIG_ARRAY_SIZE] |
digital outputs, all bits are used (0 - 512 bits) | |
uint32_t | NumberAI |
number of connected analog inputs | |
int32_t | AI [N_ANA_ARRAY_SIZE] |
analog inputs 0 - 15 | |
uint32_t | NumberAO |
number of connected analog outputs | |
int32_t | AO [N_ANA_ARRAY_SIZE] |
analog outputs 0 - 15 | |
uint32_t | Number_MeasureAmpl |
number of connected strain gauges | |
int32_t | Ext_MeasureAmpl [N_TENZO_ARRAY_SIZE] |
output voltage of strain gauges 0 - 7 | |
uint32_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 (currently not used) | |
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 [387] |
reserved | |
Static Public Attributes | |
static constexpr uint32_t | RESET_FAULT_BIT0 { 0x0001U } |
Value for DIO::Control - reset. | |
static constexpr uint32_t | RESET_TGMMINI_DIO_FORCE_BIT2 { 0x0004U } |
Value for DIO::Control - forced reset of TGMmini internal DIO. | |
static constexpr uint32_t | MAX_TX_RX_BUFFER_SIZE { 32U } |
size of TX and RX buffers for ECAT to serial converters (currently BK1120+EL6041 only) | |
static constexpr uint32_t | N_DIG_ARRAY_SIZE { 16U } |
static constexpr uint32_t | N_ANA_ARRAY_SIZE { 16U } |
max number of analog inputs/outputs | |
static constexpr uint32_t | N_TENZO_ARRAY_SIZE { 8U } |
max number of strain gauges | |
Describes one servo input/output module.
Structure size is 2048 bytes
volatile uint32_t DIO::Control |
bit 0 = fault reset. If there is no Error, the bit is ignored and reset back to zero.
bit 2 = force reset (TGMmini internal DIO only)
uint32_t DIO::Error |
code of the first detected fault, if the I/O unit is in fault; the value depends on the particular type of the unit (see the I/O unit manual).
TGMmini internal DIO error value is coded as follows (any of the following bits can be set):
Bit | Description |
---|---|
0 | hardware fault |
1 | under voltage (no 24V power supply on pin OUTPWR24), could produce other errors |
8 | short circuit on pin OUT0 |
9 | short circuit on pin OUT1 |
10 | short circuit on pin OUT2 |
11 | short circuit on pin OUT3 |
12 | short circuit on pin OUT4 |
13 | short circuit on pin OUT5 |
14 | short circuit on pin OUT6 |
15 | short circuit on pin OUT7 |
16 | over voltage on pin OUT0 |
17 | over voltage on pin OUT1 |
18 | over voltage on pin OUT2 |
19 | over voltage on pin OUT3 |
20 | over voltage on pin OUT4 |
21 | over voltage on pin OUT5 |
22 | over voltage on pin OUT6 |
23 | over voltage on pin OUT7 |
24 | internal VDD warning |
25 | internal VDD under voltage |
26 | internal 5V under voltage |
29 | DC-DC current limit |
uint32_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 |
|
staticconstexpr |
max number of digital inputs/outputs in double words, i.e. the number of available digital i/o bits is 32 times larger (16 * 32 = 512 in this case)
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.
volatile uint32_t DIO::RxPointerWrite |
Write index to DIO::RxBuffer. TGM writes incoming 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.
volatile uint32_t DIO::Status |
specifies the actual status of the I/O unit:
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.
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.
DIO_TYPE DIO::Type |
I/O unit type is not indicated in TGMotion5xx.ini, TG Motion finds out automatically the connected I/O units and updates the DIO::Type.