Specifications

Chapter 5 - AsconMBCommLib
173
5-3-38 SERIAL Ports
Caution
This Function Block can be used only with the CU-02 unit.
FB Prototype
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_SERIALPORT
Required serial port
(default value = X4)
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_SERIALPORT
ASCON_SERIALBAURATE
ASCON_SERIALPARITY
USINT
USINT
ASCON_SERIALPROTOCOL
USINT
UINT
¡
¡
¡
¡
¡
¡
¡
¡
¡
BOOL
USINT
ERROR
ERCODE
¡
¡
Label Options
ENABLE
FALSE = Serial Port DISABLE
TRUE = Serial Port ENABLE