5. CONFIGURATION
Figure 141: Block Used to Visualize the Control Signals
Input parameters Type Description
REQUEST BOOL
This variable, when true, enables the func-
tion block use.
PORT SERIAL_PORT
Select the serial port, as described in the
SERIAL_PORT data type.
Table 175: SERIAL_GET_CTRL Input Parameters
Output parameters Type Description
DONE BOOL
This variable is true when the block is com-
pletely executed. It is false otherwise.
EXEC BOOL
This variable is true while the block is be-
ing executed. It is false otherwise.
ERROR BOOL
This variable is true when the block con-
cludes the execution with an error. It is
false otherwise. It is connected to the vari-
able DONE, as its status is showed after the
block conclusion.
STATUS SERIAL_STATUS
In case the ERROR variable is true, the
STATUS structure will show the error
found during the block execution. The
possible states, already described in the
SERIAL_STATUS data type, are:
- NO_ERROR
- ILLEGAL_SERIAL_PORT
- PORT_BUSY
- HW_ERROR_UART
- HW_ERROR_REMOTE
- FB_GET_CTRL_NOT_ALLOWED
- NOT_CONFIGURED
CTS_VALUE BOOL Value read in the CTS control signal.
DSR_VALUE BOOL Value read in the DSR control signal.
DCD_VALUE BOOL Value read in the DCD control signal.
Table 176: SERIAL_GET_CTRL Output Parameters
Utilization example in ST language, after the library is inserted in the project and the serial port configured:
PROGRAM UserPrg
VAR
Get_Control: SERIAL_GET_CTRL;
239