Yt_CO_TCP_UDT_COMMUNICATION
Yt_CO_TCP_UDT_COMMUNICATION: STRUCT
| Element | Data Type | Description | Usage |
|---|---|---|---|
| ClientReady |
BOOL | TRUE when client has a socket connection with a server |
Yt_CO_TCP_UDT_COMMUNICATION.ClientReady |
| xError |
BOOL | TRUE when the client has experienced an error |
Yt_CO_TCP_UDT_COMMUNICATION.xError |
| wDiagCode |
WORD | Dialog code that describes the state of the ModBus Client function block |
Yt_CO_TCP_UDT_COMMUNICATION.wDiagCode |
| wAddDiagCode |
WORD | Additional dialog code that describes the state of the ModBus Client function block |
Yt_CO_TCP_UDT_COMMUNICATION.wAddDiagCode |
| ReadWriteGroups |
Yt_CO_TCP_ARR_READ_WRITE | Array containing data that describes all of the function codes |
Yt_CO_TCP_UDT_COMMUNICATION.ReadWriteGroups |
Yt_CO_TCP_ARR_READ_WRITE: ARRAY
| Array Name | Data Type | Description | Usage |
|---|---|---|---|
| Yt_CO_TCP_ARR_READ_WRITE | Yt_CO_TCP_UDT_READ_WRITE | Yt_CO_TCP_UDT_READ_WRITE array with 10 elements | Yt_CO_TCP_ARR_READ_WRITE[0] |
Yt_CO_TCP_UDT_READ_WRITE: STRUCT
| Element | Data Type | Description | Usage |
|---|---|---|---|
| Write |
BOOL | When false the function code driver is set to a read function code and when set TRUE the function code driver is set to a write function code |
Yt_CO_TCP_UDT_READ_WRITE.Write |
| xActive |
BOOL | Write function code is active |
Yt_CO_TCP_UDT_READ_WRITE.xActive |
| FC |
INT | Function code selection |
Yt_CO_TCP_UDT_READ_WRITE.FC
|
| uiUnitIdentifier |
BYTE | Unit Identifier |
Yt_CO_TCP_UDT_READ_WRITE.uiUnitIdentifier
|
| ReadStartAddress |
WORD |
If Yt_CO_TCP_UDT_READ_WRITE.Write = FALSE the function code driver will start to read from this register
|
Yt_CO_TCP_UDT_READ_WRITE.ReadStartAddress
|
| QuantityToRead |
WORD | Number of registers to read |
Yt_CO_TCP_UDT_READ_WRITE.QuantityToRead
|
| arrReadBuffer |
Yt_CO_TCP_ARR_B_1_260 | Array of bytes that stores the data from the read command |
Yt_CO_TCP_UDT_READ_WRITE.arrReadBuffer
|
| ByteCount |
BYTE | Number of bytes that were received from the last read command |
Yt_CO_TCP_UDT_READ_WRITE.ByteCount
|
| xNDR |
BOOL | TRUE when the read command has finished processing and 1 packet of information has been read |
Yt_CO_TCP_UDT_READ_WRITE.xNDR
|
| WriteStartAddress |
WORD | If Yt_CO_TCP_UDT_READ_WRITE.Write = TRUE the function code driver will start to write to this register |
Yt_CO_TCP_UDT_READ_WRITE.WriteStartAddress
|
| QuantityToWrite |
WORD | Number of registers to write |
Yt_CO_TCP_UDT_READ_WRITE.QuantityToWrite
|
| arrWriteBuffer |
Yt_CO_TCP_ARR_B_1_260 | Array of bytes that stores the data to be sent |
Yt_CO_TCP_UDT_READ_WRITE.arrWriteBuffer
|
| xDone |
BOOL |
TRUE when the write command has finished processing and 1 packet of information has been sent to the server
|
Yt_CO_TCP_UDT_READ_WRITE.xDone
|
| xError |
BOOL | TRUE when the function code driver has experienced an error |
Yt_CO_TCP_UDT_READ_WRITE.xError
|
| wDiagCode |
WORD |
Dialog code that describes the state of the function code driver
|
Yt_CO_TCP_UDT_READ_WRITE.wDiagCode
|
| wAddDiagCode |
WORD |
Additional dialog code that describes the state of the function code driver
|
Yt_CO_TCP_UDT_READ_WRITE.wAddDiagCode
|
| StartAction |
BOOL | Internal element that is set TRUE when the client function block |
Yt_CO_TCP_UDT_READ_WRITE.StartAction
|
| tUpdateTime |
TIME | Time between two read operation in ms |
Yt_CO_TCP_UDT_READ_WRITE.tUpdateTime
|