FB_SendPSN

FB_SendPSN 1:

FB_SendPSN sends PosiStageNet telegrams via UDP.

VAR_INPUT

   bEnable                 : BOOL;
   sInfoSystemName         : STRING;
   pData                   : POINTER TO ST_PsnData;
   nAvailableTracker       : BYTE;
   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.
sInfoSystemName: Name of the PosiStageNet server.
pData: Pointer to an array containing the data to be transmitted.
The array is an array of the structure ST_PsnData; the lower limit of the array is 0, while the upper limit is nAvailableTracker.
nAvailableTracker: Indicates the number of trackers to be transmitted.
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.