Basic Principles of Serial Data Transmission
2-12
Point-to-point connection CP 440 Installation and Parameter Assignment
A5E00057742-02
Sending Data with the ASCII Driver
When you send data, you specify the number of user data bytes to be transferred
in the “LEN” parameter of the call of the SEND_440 function block.
When you work with the end criterion “character delay time expired” when
receiving data, the ASCII driver pauses between two message frames when
sending. You can call the SEND_440 FB at any time, but the ASCII driver does not
begin its output until a period longer than the parameterized character delay time
has elapsed since the last message frame was sent.
If you work with the “end-of-text character” criterion, you have a choice of
three options:
•
Send up to and including the end-of-text character
The end-of-text character must be included in the data to be sent. Data is sent
only up to and including the end-of-text character, even if the data length
specified in the FB is longer.
•
Send up to length parameterized at the FB
Data is sent up to the length parameterized at the FB. The last character must
be the end-of-text character.
•
Send up to the length parameterized at the FB and automatically append the
end-of-text character or characters
Data is sent up to the length parameterized at the FB. The end-of-text
character(s) is/are automatically appended; in other words, the end-of-text
characters must not be included in the data to be sent. 1 or 2 characters more
than the number specified by the FB are sent to the partner, depending on the
number of end-of-text characters.
When you work with the end criterion “fixed frame length”, the number of data
bytes transferred in the send direction is as specified for the “LEN” parameter of
the SEND_440 FB. The number of data bytes transferred in the receive direction,
i.e. in the receive DB, is as specified at the receiver using the “fixed message
frame length” parameter in the parameterization interface. The two parameter
settings must be identical, in order to ensure correct data traffic. If an end code is
not detected when data is sent, a pause equal to the length of the monitoring time
is inserted between two message frames to allow the partner to synchronize
(identify the beginning of the message frame).
If some other method of synchronization is used, the pause in sending can be
deactivated by means of the parameterization interface.
Note
When XON/XOFF flow control is parameterized, the user data must not contain
any of the parameterized XON or XOFF characters. The default settings are DC1
= 11H for XON and DC3 = 13H for XOFF.