9 Modbus Communication
The block library can be found for download in the ‘Service/Support’ area of
www.vipa.com at ‘Downloads è VIPA Lib’ as ‘Block library Modbus Communication -
SW90AS0MA’ . The library is available as packed zip file. As soon as you want to use
these blocks you have to import them into your project.
Ä
Chap. 5 ‘Include VIPA library’
page 69
9.1 TCP
9.1.1 FB 70 - TCP_MB_CLIENT - Modbus/TCP client
9.1.1.1 Description
This function allows the operation of an Ethernet interface as Modbus/TCP client.
Call parameter
Name Declaration Type Description
REQ IN BOOL Start job with edge 0-1.
ID IN WORD ID from TCON.
MB_FUNCTION IN BYTE Modbus: Function code.
MB_DATA_ADDR IN WORD Modbus: Start address or sub function code.
MB_DATA_LEN IN INT Modbus: Number of register/bits.
MB_DATA_PTR IN ANY Modbus: Data buffer (only flag area or data block of
data type byte allowed) for access with function code
03h, 06h and 10h.
DONE * OUT BOOL Job finished without error.
BUSY OUT BOOL Job is running.
ERROR * OUT BOOL Job is ready with error - parameter STATUS has error
information.
STATUS * OUT WORD Extended status and error information.
*) Parameter is available until the next call of the FB
Parameter in instance DB
Name Declaration Type Description
PROTOCOL_TIMEOUT STAT INT Blocking time before an active job can be cancelled by
the user.
Default: 3s
RCV_TIMEOUT STAT INT Monitoring time for a job.
Default: 2s
MB_TRANS_ID STAT WORD Modbus: Start value for the transaction identifier.
Default: 1
MB_UNIT_ID STAT BYTE Modbus: Device identification.
Default: 255
Block library "Modbus
Communication"
VIPA SPEED7
Modbus Communication
TCP > FB 70 - TCP_MB_CLIENT - Modbus/TCP client
HB00 | OPL_SP7 | Operation list | en | 18-30 183