FB_BX_COM_64ex

This function block connects ModbusRTU.lib or ComLib.lib with the serial interface of the BX Controller. A PC interface with 64 byte of user data is emulated. Data output is not via a PC interface, but via one of the two serial interfaces of the BX (COM1 or COM2).

Function block FB_BX_COM_64EX

VAR_INPUT

pstrEmo_IN        :POINTER TO BYTE;
pstrEmo_OUT       :POINTER TO BYTE;
ComConfig         :ST_COMConfig;

VAR_OUTPUT

ComPortIsClose    :BOOL;
bError            :BOOL;
iErrorId          :INT;

Legend

pstrEmo_IN:
Pointer to ModbusPCComInData
pstrEmo_OUT:
Pointer to ModbusPCComOutData
ComConfig:
Parameterization of the COM interface
COM_Port_Open:
If this bit is set, the interface is opened. If this bit is reset, the interface is closed.
ComPortIsClose:
If the interface is closed, this bit is set.
bError:
There is an error.
iErrorId:
Error code (see FB_COMPortOpen)

FB_BX_COM_64ex 1: Download sample program in ST for linking ModbusRTU and BX: (sample file)

The sample requires the ModbusRTU library!

modbus com port 64ex.prx