1) Introduction:
The purpose of this device server is to control a vacuum valve.
Controlling a valve means the following actions:
- "Open" or "Close" it.
- Get its "State".
- "Reset" the interlocks if
any.
2) Hardware:
- At startup time the program imports a PLC device server which
physically drives the hard associated to the vacuum valves (up to 12
valves can be controlled by one PLC).
- Commands are transmitted to the PLC by setting the relevant value
to the dedicated internal bits.
- The state is obtained from the PLC after the reading of some
dedicated words (1 word = 16 bits).
- The present interface is as follows:
- Word #1: Mainly reports the status of the PLC itself (not yet
used in this device server).
- Word #3 to word #8: They contain the status of the valves. One
word contains the status for 2 valves, this is the reason why 6 words
are enough for 12 possible valves. Here after the detail of the status
byte:
Bit #0
|
Bit #1 |
Bit #2 |
Bit #3 |
Bit #4 |
Bit #5 |
Bit #6 |
Bit #7 |
1=>Open
0=>Close
|
1=Open
|
1=Closed
|
1=Interlock
|
1=Moving
|
1=Unplugged
|
1=>Reset itlk
|
1=Problem Opening/Closing
|
- Word #15 to word #26: They contain the interlocks for each of
the valves. One word contains the 16 possible interlocks for 1 valve.
Here after the detail of the interlock word:
Bit #0
|
Bit #1
|
Bit #2
|
Bits #3 to #15
|
Upstream penning itlk
|
Downstream penning itlk |
Air pressure itlk
|
Unassigned
|
3) Software:
- The PLC device server is imported once at startup time.
- The "State" is read from the PLC at a time rate determined by a
property (set to 2 seconds in our case). To read the state just one call
is sent to the PLC asking for the contents of the 26 first words (this
is not more time and resources consuming than several shorter calls).
- The status is built from strings that can be set as a property
(default strings are implemented in the code).