4. Configuration
200
Get_Status.EXEC;
Get_Status.ERROR;
Status := Get_Status.STATUS; //If it’s necessary to treat the error
Status_RX := Get_Status.RXQ_STATUS; // If it’s necessary to treat the error of the RX
queue
SERIAL_PURGE_RX_QUEUE
This function block is used to clean the serial port RX queue, local and remote. The UART RX FIFO
is restarted too.
Figure 4-97. Block Used to Clean the RX Queue
This variable, when true, enables the function
block use.
Select the serial port, as described in the
SERIAL_PORT data type.
Table 4-137. SERIAL_PURGE_RX_QUEUE Input Parameters
This variable is true when the block is
completely executed. It’s false otherwise.
This variable is true while the block is being
executed. It’s false otherwise.
This variable is true when the block concludes
the execution with an error. It’s false otherwise.
It is connected to the variable DONE, as its
status is showed after the block conclusion.
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
- NOT_CONFIGURED
Table 4-138. SERIAL_PURGE_RX_QUEUE Output Parameters
Utilization example in ST language, after the library is inserted in the project and the serial port
configured: