Specifications
sigmadue - IEC 61131-3 Function Block Library
166
5-3-35 MP SERIAL Ports
Caution
This Function Block can be used only with the MP-01 unit.
FB Prototype
MP_SERIAL_PORTS
Input parameters
Output parameters
Description
This function block configure the required Serial Port and the parameters to be
used with the selected Modbus Agent.
Reference
tables
Here are reported the range of the parameters used by the function block.
Input
Label Type Description
ENABLE BOOL
Command to enable the serial port
operations
PORT ASCON_MPSERIALPORT
Required serial port (default value = X1)
BAUD ASCON_SERIALBAUDRATE
Communication baud rate
(default value = B9600)
PARITY ASCON_SERIALPARITY
Communication parity
(default value = NOPAR)
DATA USINT
Communication data length
(default value = 8)
STOP USINT
Communication stop bits
(default value = 1)
PROTOCOL ASCON_SERIALPROTOCOL
Required communication agent
(default value = SLAVE1)
ADDR USINT
Slave agent communication address
(default value = 1)
T_OUT UINT
Communication time out factor
(this value is a multiple of 100ms -
eg. 10 means 10 x 100ms = 1 s)
Label Type Description
ERROR BOOL Serial port communication error status
ERCODE USINT Serial port communication error code
ENABLE
PORT
BAUD
PARITY
DATA
STOP
PROTOCOL
ADDR
T_OUT
BOOL
ASCON_MPSERIALPORT
ASCON_MPSERIALBAURATE
ASCON_MPSERIALPARITY
USINT
USINT
ASCON_MPSERIALPROTOCOL
USINT
UINT
¡
¡
¡
¡
¡
¡
¡
¡
¡
BOOL
USINT
ERROR
ERCODE
¡
¡
Label Options
ENABLE
FALSE = Serial Port DISABLE
TRUE = Serial Port ENABLE
PORT
X0 = Communication Port X0 RS232/RS485
X1 = Communication Port X1 RS485 (default value)