Saia-Burgess
Controls Ltd.
Manual Modem PCDxx7 Serie│Doc. 26/793; Ed. E2│30.04.2005
Example: Starting an application
5
5-6
Switching the protocol
The protocol is configured as follows:
Protocol RK512R, 9600 Baud, 8 data bits, 1 stop bit, no parity. All other parameters
are the default one. More details about it can be found in the manual 26/794.
5.4.2 Protocol enabling
To enable a protocol, the function of the library needed is the FC900. This FC needs
the inputs:
●
the
ENABLE_PROTOCOL
signal which is edge sensitive. Here it is created
with
CONNECT
(M50.2) and
INCOMING
(M50.3), this has the effect to enable
the protocol after connection, only for outgoing calls. Then it’s possible to en-
able a different protocol for incoming calls.
●
PROTOCOL_DB
, which contains the protocol configuration parameters.
●
DB_DRIVER
, which is the DB_MODEM containing the information of the buffer
size.
When the function is executed once, the protocol is enabled if no error was done in
the configuration parameters, then the output
PROTOCOL_ON
is set to 1. If an ER-
ROR happened during enabling the protocol, the output
ERROR
is set, the
STATUS
includes the error code.
You do not have to execute this function every cycle after enabling the protocol, only
if you want the output
PROTOCOL_ON
updated.
At this point, the example is finished, the project contains the minimum required for
the communication through a modem. Of course, in the final application the error bit
and status have to be considered.