Structures and Enums
UDPCommMgr_typ
Description of the structure. Sub-structure headers are examples of structure use.
commMgr
Name |
Type |
Description |
IN |
UDPCommMgr_IN_typ |
Structure containing all inputs for commMgr |
OUT |
UDPCommMgr_OUT_typ |
Structure containing all outputs for commMgr |
commMgr.IN
Name |
Type |
Description |
CMD |
UDPCommMgr_IN_CMD_typ |
Commands for commMgr |
PAR |
UDPCommMgr_IN_PAR_typ |
Parameters for commMgr |
CFG |
UDPCommMgr_IN_CFG_typ |
Configurations for commMgr |
commMgr.IN.CMD
Name |
Type |
Description |
Enable |
BOOL |
Enable FUB |
Send |
BOOL |
Send datagram on rising edge or on level if AllowContinuosSend is True |
AcknowledgeData |
BOOL |
Acknowledge data received and clear receive data |
AcknowledgeError |
BOOL |
Acknowledge error |
commMgr.IN.PAR
Name |
Type |
Description |
AllowContinuousSend |
BOOL |
Enables level sensitive Send command |
SendFlags |
UINT |
Send flags to be used see AsUDP for supported UDP flags |
pSendData |
UDINT |
Pointer to data to be sent |
SendLength |
UDINT |
Length of data to be sent |
AllowContinuosReceive |
BOOL |
Data will be continuously cleared without need to AcknowledgeData |
ReceiveFlag |
UINT |
Receive flags to be used see AsUDP for supported UDP flags |
pReceiveData |
UDINT |
Pointer to buffer where received data should be stored |
MaxReceiveLength |
UDINT |
Size of receive data buffer |
commMgr.IN.CFG
Name |
Type |
Description |
LocalInterface |
UDPCommMgr_Interface_typ |
Interface to be used locally |
RemoteInterface |
UDPCommMgr_Interface_typ |
Remote interface for data to be sent |
commMgr.OUT
Name |
Type |
Description |
STAT |
UDPCommMgr_OUT_STAT_typ |
Structure containing all stats for commMgr |
commMgr.OUT.STAT
Name |
Type |
Description |
CommunicationActive |
BOOL |
Communication is active |
Sending |
BOOL |
Currently sending data |
DataSent |
BOOL |
Data is sent. Stays |
SentDataLength |
UDINT |
Length of data that was sent with last command |
NewDataAvailable |
BOOL |
New data has been received |
ReceivedDataLength |
UDINT |
Length of received data |
ReceivedFromInterface |
UDPCommMgr_Interface_typ |
Interface last data was received from |
Ident |
UDINT |
Ident for local interface |
Error |
BOOL |
Indicates error has occurred |
ErrorID |
UINT |
Error ID |
ErrorString |
STRING |
Error description |
UDPCommMgr_Interface_typ
Name |
Type |
Description |
IPAddress |
STRING |
IP address to be used for interface |
Port |
UINT |
Port to be used for interface |
Enumerate possible errors that can occur, their ID’s, and explain them.
Name |
Value |
Description |
UDPCOMM_ERR_INVALIDINPUT |
50000 |
No error occurred |
UDPCOMM_ERR_RECVDATATOOLARGE |
50001 |
Error description |
UDPCOMM_ERR_SENDDATATOOLARGE |
50002 |
Error description |