ifm
System Manual
ecomat
mobile
SmartController (CR2500) V05
More functions in the ecomatmobile controller
Use of the serial interface
243
10.6.3
Function SERIAL_RX
Contained in the library:
ifm_CRnnnn_Vxxyyzz.LIB
Available for the following devices:
•
CabinetController: CR0301, CR0302, CR0303
•
ClassicController: CR0020, CR0032, CR0505
•
ExtendedController: CR0200, CR0232
•
PCB controller: CS0015
•
SafetyController: CR7020, CR7021, CR7032, CR7200, CR7201, CR7232, CR7505, CR7506
•
SmartController:
CR2500
•
PDM360 smart: CR1070, CR1071
Function symbol:
SERIAL_RX
CLEAR
RX
AVAILABLE
OVERFLOW
Description
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.
The SERIAL functions form the basis for the creation of an application-specific protocol for the serial
interface.
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.
For CRnn32: Debugging of the application software is then only possible via all 4 CAN interfaces or via
USB.
Parameters of the function inputs
Name
Data type Description
CLEAR
BOOL
TRUE: receive buffer is deleted
FALSE: default condition