
LenzeFpiDrv.lib function library
Functions
3.6 Receive status (L_Rs232GetReceiveState)
3−10
L
LenzeFpiDrv.lib EN 1.1
3.6 Receive status (L_Rs232GetReceiveState)
INT L_Rs232GetReceiveState (wDrvNr, bStateControl)
Use this function to find out about the current status of a receive order and to output the information
according to bStateControl :
If bStateControl is
· FALSE an error code will be sent at reception if an error has occurred. Other the number of
bytes received will be sent.
· TRUE the number of bytes already received will be sent, independently of the number of error
that have occurred.
L_Rs232GetReceiveState
wDrvNr
bStateControl
Fig. 3−6 Receive status (L_Rs232GetReceiveState)
Transfer parameter
Identifier Data type Possible settings Info
wDrvNr Word 30 AIF interface
bStateControl bool (boolean) FALSE Feedback value is receive status
TRUE Feedback value is number of bytes received
Feedback value
bStateControl = FALSE
Data type Value Meaning Priority
Integer
−7 Frame error of the serial interface (incorrect setting of number of stop bits). 2
−6 Overrun error of the serial interface (incorrect setting of baud rate). 3
−5 Parity error of the serial interface (wrong parity setting). 4
−4 Reception aborted since memory is full. 5
−3 TimeOut time has been exceeded or
no reception during the time−out time.
6
−2 Last reception order not completed yet. 7
−1 Wrong driver number (wDrvNr) or driver not initialised. 1
Note: If errors are caused by several problems, the error cause with the highest priority sends back the
corresponding feedback value. The data already received will also be stored in the receive memory if
the feedback value is negative.
0 ... 32767 Number of data bytes received after end has been recognised.
bStateControl = TRUE
Data type Value Meaning Priority
Double−integer
−1 Wrong driver number (wDrvNr) or driver not initialised. −
0 ... 32767 Number of data bytes received (independent of end or errors).
Comentários a estes Manuais