This page describes the device driver and the device window for the WG-Switch logical device. This device controls a latching relay providing two drive coils and two position indication circuits. In most cases this relay will be a wave-guide transfer switch, but the WG-Switch device is not limited to this application.
The WG-Switch logical device is part of the sat-nms framework for M&C of plain digital I/O functions. It does not interrogate a PLC device directly, but requires a low level device driver to do the physical communication. Examples for such drivers are the Fanuc-PLC9030 and the NAIS-FP0 PLC device drivers.
The relay to be controlled with the WG-Switch device must be a latching type. This means, the relay gets set to a certain position by activating one of the drive inputs with a short (e.g. 500msec) pulse. The relay moves to the commanded position and remains there without further activation until another position is commanded. Position indication contacts must be provided by the relay to make the VLC/M&C know at which position the relay actually is.
Device window pages
The following table shows which device window pages are available with this individual device type. Tool-bar functions not mentioned here are described at the general description of device windows .
--- Sets / shows the actual switch state.
--- The faults page.
--- The device info page.
--- The maintenance page. The configuration parameters described below are set at this page.Configuration parameters
At the maintenance page of the device window there are a couple of configuration parameters which must be set to integrate the device into the VLC/M&C.
parameter --- description
driveAPort --- The address of the PLC port which sets the switch to the "A" position. See the paragraph 'Port addressing' below for details. For a read-only switch leave this field empty
driveBPort --- The address of the PLC port which sets the switch to the "B" position. See the paragraph 'Port addressing' below for details. For a read-only switch leave this field empty
indicationAPort --- The address of the 'position A' indication port, which tells that the relay / wave-guide switch is in "A" position.
indicationBPort --- The address of the 'position B' indication port, which tells that the relay / wave-guide switch is in "B" position.
pulseWidth --- The activation pulse width (msecs) to be sent to the switch for a position change. When setting this parameter, you should be aware that pulses which are shorter than the IDLE time of the PLC driver's thread may get lost. If in doubt, set the pulse width to 1100 msecs or in the VLC interface/device setup screen tune the IDLE time of the PLC driver thread to e.g. 200 msecs. If used with the SatService IO-FEP, the pulse width must be set to 1500 msecs.
positions --- By default the device reports the state of the output as 'A'/'B'. You may specify arbitrary texts for these states. 'positions' contains the two descriptions, separated by a comma. Please note, that the graphical "Switch" element at the sat-nms user interface requires the switch to use the 'A'/'B' selections.
enableQuery --- Selects if the switch position selector at the first page of the device window shall query the operator before it actually switches. Default value is "NO".Please note, that changing this parameter only applies to device windows which are opened after the parameter has been changed.
positionCheck --- Selects how the device compares the commanded switch position and the position detected by the position indication contacts:
commFaultId --- By default (commFaultId is empty) the device signals a communication fault if the summary fault of the PLC device get active. This may not be exactly what you want, because the PLC device may signal a fault which does not inhibit the switching or input sampling process. You may set commFaultId to the parameter ID of a fault flag which signals the desired condition. This makes the device ignore the PLC's summary fault and use the state of this fault flag as communication fault. The SatService IO-FEP driver for example offers such a fault flag which signals that actually no switching an no input interrogation is possible (faults.17 at the IO-FEP).
Fault flags
| fault flag | fault name | description |
|---|---|---|
| faults.99 | Communication | Unless the the setup parameter commFaultId is set, faults.99 is set if the PLC device which manages the physical ports signals a fault. With commFaultId set, the fault state addressed by this parameter is replicated as communication fault of the device. |
| faults.01 | Position Indication | This fault is set if the switch position cannot be determined unambiguously. This is if not exactly one of the indication ports is 'high'. |
| faults.02 | Wrong Position | This fault is set if the indicated switch position does not match the commanded one. The fault remains active until either the switch position is changed or a new position is commanded. |
| faults.03 | Configuration Setup | This fault signals that the at least one of the xxxxPort parameters listed above ist not properly configured. The device requires that both drive ports and both position indication ports are set to values which matches the syntax description shown below. |
Port addressing
A device driver for a PLC gives access to it's I/O ports through a number of integer variables. Each variable stands for up to 64 input or output ports which are addressed by the bit position within the variable.
Port (bit-) addresses in the configuration of the logical I/O devices refer to such a variable which is provided by the PLC driver and also to the bit position within this variable. The syntax of a port address specification is:
<variable-identifier> + <bit-offset>
<bit-offset> is a decimal constant in the range 0 .. 63. You may replace the + character in the port address by a percent sign ( % ) and specify the bit offset in hexadecimal notation. This may be helpful for PLC types which use hexadecimal addresses.
Example: The port address ' FANUC.Q00065+1 ' refers to the 2^1 bit in the variable ' Q00065 ' provided by the ' FANUC ' device. In fact this addresses the output table register '%Q00066' at the PLC. Other PLC drivers may use a different naming scheme for the variables, but the concept always is the same.
Switch positions
The WG-Switch logical device internally controls and monitors the switch position as A/B, following the names of the port configuration parameters driveAPort , driveBPort , indicationAPort and indicationBPort . This internal (not translated) switch position may differ from the switch position signalled with the position selection at the device.
Using the positions configuration parameter, the switch positions may be renamed to arbitrary values. E.g. the positions of a switch may be labelled "DUMMY LOAD" and "ANTENNA". You should however consider, that the graphical "Switch" element at the sat-nms user interface only works, if the selections for the switch are names "A" and "B".
Read-only mode
The switch may be configured to act as a read-only switch. The switch cannot be commanded / actuated in this mode, but it shows the actual position of the switch. For switches which are actuated by an external source, a reasonable delay time for faults.01 (Position Indication) should be set to avoid spurious faults during the actuation if the switch.
A WG-Switch is configured read-only by leaving both drive port configuration parameters ( driveAPort , driveBPort ) empty.
Variables defined by this device driver
| name | type | flags | range |
|---|---|---|---|
| info.driver | TEXT | R/O | StringRange R/O |
| info.type | TEXT | R/O | StringRange R/O |
| info.port | TEXT | R/O | StringRange R/O |
| info.frame | TEXT | R/O | StringRange R/O |
| info.indication | TEXT | R/O | StringRange R/O |
| config.driveAPort | TEXT | SAVE SETUP | StringRange |
| config.driveBPort | TEXT | SAVE SETUP | StringRange |
| config.indicationAPort | TEXT | SAVE SETUP | StringRange |
| config.indicationBPort | TEXT | SAVE SETUP | StringRange |
| config.pulseWidth | INTEGER | SAVE SETUP | IntegerRange (200 .. 5000) |
| config.positions | TEXT | SAVE SETUP | StringRange |
| config.enableQuery | CHOICE | SAVE SETUP | EnumRange (OFF ON) |
| config.positionCheck | CHOICE | SAVE SETUP | EnumRange (ALWAYS AFTER-SWITCHING) |
| config.commFaultId | TEXT | SAVE SETUP | StringRange |
| position | CHOICE | EnumRange (A B) | |
| faults.01 | ALARM | R/O | AlarmFlagRange R/O (Position Indication) |
| faults.02 | ALARM | R/O | AlarmFlagRange R/O (Wrong Position) |
| faults.03 | ALARM | R/O | AlarmFlagRange R/O (Configuration Setup) |
| faults.99 | ALARM | R/O | AlarmFlagRange R/O (Communication) |