Serial-Communication>Caravan SIO Protocol
Caravan Business Server>Help>Serial-Communication>Caravan SIO Protocol |
Syntax
|
Caravan Business Server has inbuilt facility to receive and transmit data using serial communication. (SIO.exe should be in your installed directory and needs to be executed alongwith Caravan Business Server). Presently CBS supports serial communication, using add on multiserial cards. IT DOES NOT SUPPORT COM1 OR COM2 SERIAL PORTS. You need a MOXA make either a4 port or 8 port serial card to use the serial communication feature. Support for COM1 or COM2 will be introduced in later releases. <caravan> PROTOCOL = PROTOCOLNAME
EVENTS: <EVENT1> ---- <EVENTn>
ACTIONS: <ACTION1> ----- ----- <ACTIONn>
STATES: <STATE1> ----- ----- <STATEn> </caravan>
|
Text
|
A protocol name is defined in the beginning of the file as <caravan> PROTOCOL = PROTOCOLNAME </caravan> A protocol definition contains EVENTS, ACTIONS and STATES all of which need to be defined.
The system is in the first state that is declared at startup. Actions are executed in the order given. The system remains in the current state until an event causes it to change to a new state. The two predefined events TIMEOUT and FINAL can be used to change a state.
Timeouts and Retries The TIMEOUTVAL (milliseconds) is a number specified along with the statename and denotes the timeout interval.
The RETRIES value is a number specified along with the statename and denotes the number of times the state can be repeated. If the RETRIES number is not specified, a value of one is assumed. The TIMEOUT event occurs at regular intervals specified by the TIMEOUTVAL(milliseconds). No user defined event can have the name TIMEOUT. The TIMEOUT event is predefined.
The FINAL event occurs when the RETRIES number has been reached. No user defined event can have the name FINAL. The FINAL event is predefined. Explanation If a TIMEOUTVAL interval and a TIMEOUT event is defined for a state, then the system changes the state to the specified NEXTSTATE after a time equal to TIMEOUTVAL.
If a TIMEOUT event is not defined, but a Final event is defined, then the state does not change at TIMEOUT but the actions specified in the state definition are repeated. The RETRIES number decides the number of repetitions. The FINAL event occurs when the RETRIES number is reached. The system changes the state to the specified NEXTSTATE.
If both FINAL and TIMEOUT events are not defined then the TIMEOUT event repeats infinitely at the set interval. The ACTIONS are executed every time TIMEOUT occurs.
If TIMEOUTVAL is not defined, then it is necessary to define the FINAL event. The state switches to the NEXTSTATE immediately after the actions are executed if no user defined events are specified. This is useful when some actions have to be executed without changing the state.
Note: It is not possible to define RETRIES without defining TIMEOUTVAL.
|
Properties
|
Events
Actions
States
|
Back
|
|