FB_ReceivePSN
FB_ReceivePSN receives PosiStageNet telegrams via UDP.
VAR_INPUT
bEnable : BOOL;
nLocalPort : UDINT;
sLocalHost : T_IPv4Addr;
nRemotePort : UDINT;
sMulticastAddr : T_IPv4Addr;
sSrvNetId : T_AmsNetID;
bEnable: The function block begins with the processing on a rising edge at this input. A falling edge ends the processing.
nLocalPort: The local IP port number of the UDP Client/Server socket.
Port 56565 is used if no value is transferred.
sLocalHost: The local IP address (IPv4) of the UDP Client/Server socket as a string (e.g. '192.168.0.5').
nRemotePort: The IP port number of the UDP Client/Server socket of the receiver.
Port 56565 is used if no value is transferred.
sMulticastAddr: The multicast address to which the data is to be transmitted.
The address 236.10.10.10 is used if no value is transferred.
sSrvNetId: String containing the network address of the TwinCAT TCP/IP Connection Server. For the local computer (default) an empty string may be specified.
VAR_OUTPUT
bBusy : BOOL;
bError : BOOL;
nErrorId : UDINT;
bBusy: Is set if PosiStageNet telegrams are transmitted.
bError: Is set, if an error occurs during execution of the function block.
nErrorId: If the bError output is set, this parameter returns the TwinCAT TCP/IP Connection Server error number.
sInfoSystemName: Supplies the name of the PSN server.
nFrameId: The FrameId transferred by the PSN server
aPsnData: The array of the structure ST_PsnData with the received data.
nAvailableTracker: Supplies the number of trackers transmitted by the PSN server.