3 send data (l_rs232senddata), Send data (l_rs232senddata), Lenzefpidrv.lib function library – Lenze Global Drive PLC Developer Studio User Manual
Page 19: Functions

LenzeFpiDrv.lib function library
Functions
3.3
Send data (L_Rs232SendData)
3−4
L
LenzeFpiDrv.lib EN 1.1
3.3
Send data (L_Rs232SendData)
INT.
L_Rs232SendData (wDrvNr, pabySendDataMemory, wNumberOfBytes)
With this function data can be send via the FP interface.
·
The operating system of the controller sends data and executes the PLC program at the same
time, i.e. a byte can be sent every max. 250
ms.
·
A max. of 32767 characters can be send per function call.
·
A new call is only possible after the previous call has been processed, i.e. after all data has
been send.
·
An active sending process can be cancelled by repeating the function L_Rs232Open. It is
then possible to receive data which have been changed.
L_Rs232SendData
wDrvNr
pabySendDataMemory
wNumberOfBytes
Fig. 3−3
Send data (L_Rs232SendData)
Transfer parameter
Identifier
Data type
Possible settings
Info
wDrvNr
Word
30
AIF interface
pabySend
DataMemory
Pointer to Array
of Byte
Pointer set onto the address in
the memory where the data
bytes to be sent are stored.
The address of a variable (e. g. data array) can be detected using
the address function ADR.
wNumberOfBytes
Word
1 ... 32767
Number of data bytes to be sent
Feedback value
Data type
Value
Meaning
Priority
Integer
−4
Pointer of send memory does not point to PLC−RAM.
4
−3
Number of bytes to be sent exceeding its limits (1 ... 32767).
3
−2
Send order not passed on to the operating system since the previous send order is not
completed yet.
2
−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.
0
Send order successfully transferred to operating system.
Tip!
Sending is executed at the same time as the PLC program.
Please ensure that all send orders are completed before calling up this function, otherwise an error
will occur (feedback value = −2).