EasyManuals Logo

ALTUS Nexto NX3004 User Manual

ALTUS Nexto NX3004
388 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #209 background imageLoading...
Page #209 background image
4. Configuration
201
PROGRAM MainPrg
VAR
Purge_Queue: SERIAL_PURGE_RX_QUEUE;
Port: SERIAL_PORT := COM1;
Status: SERIAL_STATUS;
END_VAR
//INPUTS:
Purge_Queue.REQUEST := TRUE;
Purge_Queue.PORT := Port;
//FUNCTION:
Purge_Queue();
//OUTPUTS:
Purge_Queue.DONE;
Purge_Queue.EXEC;
Purge_Queue.ERROR;
Status := Purge_Queue.STATUS; // If it’s necessary to treat the error.
SERIAL_RX
This function block is used to receive a serial port buffer, using the RX queue normal mode. In this
mode, each character in the RX queue occupy a single byte which has the received data, storing 5, 6,
7 or 8 bits, according to the serial interface configuration.
Figure 4-98. Block Used to Read the Reception Buffer Values
Input parameters
Type
Description
REQUEST
BOOL
This variable, when true, enables the function
block use.
PORT
SERIAL_PORT
Select the serial port, as described in the
SERIAL_PORT data type.
RX_BUFFER_POINTER
POINTER TO BYTE
Pointer of a byte array to receive the buffer
values.
RX_BUFFER_LENGTH
UINT
Specify the expected character number in the
byte array. In case more than the expected
bytes are available, only the expected quantity
will be read from the byte array, the rest will be
leaved in the RX queue (maximum size equal
to 1024 characters).
RX_TIME-OUT
UINT
Specify the time-out to receive the expected
character quantity. In case it is smaller than the
necessary to receive the characters, the
RX_TIME-OUT_ERROR output from the
STATUS parameter will be indicated. When the
specified value, in ms, is equal to zero, the
function will return the data within the buffer.
Table 4-139. SERIAL_RX Input Parameters

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the ALTUS Nexto NX3004 and is the answer not in the manual?

ALTUS Nexto NX3004 Specifications

General IconGeneral
BrandALTUS
ModelNexto NX3004
CategoryProcessor
LanguageEnglish