
7.5.2 FC/SFC 217 - SER_SND
This block sends data via the serial interface. The repeated call of the
FC/SFC 217 SER_SND delivers a return value for 3964R, USS and
Modbus via RETVAL that contains, among other things, recent infor-
mation about the acknowledgement of the partner station.
The protocols USS and Modbus require to evaluate the receipt tele-
gram by calling the FC/SFC 218 SER_RCV after SER_SND.
Parameter
Declaration Data type
Description
DATAPTR
IN
ANY
Pointer to Data Buffer for sending data
DATALEN
OUT
WORD
Length of data sent
RETVAL
OUT
WORD
Return value (0 = OK)
Here you define a range of the type Pointer for the send buffer where
the data to be sent are stored. You have to set type, start and length.
Example:
Data is stored in DB5 starting at 0.0 with a length of 124byte.
DataPtr:=P#DB5.DBX0.0 BYTE 124
Word where the number of the sent Bytes is stored.
At
ASCII
if data were sent by means of FC/SFC 217 faster to the
serial interface than the interface sends, the length of data to send
could differ from the DATALEN due to a buffer overflow. This should
be considered by the user program.
With
STX/ETX
,
3964R
,
Modbus
and
USS
always the length set in
DATAPTR
is stored or 0.
Return values of the block:
Error code
Description
0000h
Send data - ready
1000h
Nothing sent (data length 0)
20xxh
Protocol executed error free with xx bit pattern for
diagnosis
7001h
Data is stored in internal buffer - active (busy)
7002h
Transfer - active
80xxh
Protocol executed with errors with xx bit pattern for
diagnosis (no acknowledgement by partner)
90xxh
Protocol not executed with xx bit pattern for diagnosis
(no acknowledgement by partner)
Description
Parameters
DATAPTR
DATALEN
RETVAL FC/SFC 217
(Return values)
VIPA System 300S
Deployment PtP communication
Communication> FC/SFC 217 - SER_SND
HB140 | CPU-SC | 313-6CF13 | GB | 15-50
157