![background image](http://html.mh-extra.com/html/ifm/ecomat-100-mobile-cr0301/ecomat-100-mobile-cr0301_programming-manual_620659113.webp)
113
ifm
Programming Manual
ecomatmobile
CabinetController (CR0301) Runtime System V05
2016-04-21
ifm function elements
ifm function elements for the device CR0301
>
SERIAL_RX
308
Unit type = function block (FB)
Unit is contained in the library
ifm_CR0301_Vxxyyzz.LIB
Symbol in CODESYS:
>
Description
311
SERIAL_RX reads a received data byte from the serial receive buffer at each call.
Then, the value of AVAILABLE is decremented by 1.
If more than 1000 data bytes are received, the buffer overflows and data is lost. This is indicated by
the bit OVERFLOW.
If 7-bit data transmission is used, the 8th bit contains the parity and must be suppressed by the user if
necessary.
The SERIAL FBs form the basis for the creation of an application-specific protocol for the serial
interface.
To do so, set the system flag bit SERIAL_MODE=TRUE!
NOTE
In principle, the serial interface is not available for the user, because it is used for program download
and debugging.
The interface can be freely used if the user sets the system flag bit SERIAL_MODE to TRUE. Then
however, program download and debugging are only possible via the CAN interface.
>
Parameters of the inputs
312
Parameter
Data type
Description
CLEAR
BOOL
TRUE:
delete receive buffer
FALSE:
function element is not executed
>
Parameters of the outputs
313
Parameter
Data type
Description
Rx
BYTE
Byte data received from the receive buffer
AVAILABLE
WORD
Number of remaining data bytes
0 = no valid data available
OVERFLOW
BOOL
TRUE:
Overflow of the data buffer
loss of data!
FALSE:
Data buffer is without data loss
Summary of Contents for Ecomat 100 Mobile CR0301
Page 212: ......