This page describes the device driver and the device window for the Toggle-Switch logical device. This device controls a latching relay providing only one drive coil and one or two position indication circuits. Such a switch works like a ball pen mechanics, each current pulse to the drive coil toggles the switch position once.
The Toggle-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 device supports the usage of one or two position indication ports which tell the device in which position the switch actually is. You may define either the indicationAPort or the indicationBPort, depending on the polarity of the signal. If there are both position indication inputs configured, the device checks these to be oppositional, states an position indication fault if they are equal.
The Toggle-Switch logical device does not check if the commanded position matches the indicated position. You may use the device to generate an output pulse without reading back anything. For this, configure one of the indication ports to an arbitrary input signal and ignore the 'position' value. Instead use the 'toggle' parameter which generates an output pulse any time it gets written.
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.
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 | 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 Toggle-Switch logical device internally controls and monitors the switch position as A/B, following the names of the port configuration parameters 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".
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.drivePort | 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.commFaultId | TEXT | SAVE SETUP | StringRange |
| position | CHOICE | EnumRange (A B) | |
| toggle | TEXT | NOPRESET | StringRange |
| faults.01 | ALARM | R/O | AlarmFlagRange R/O (Position Indication) |
| faults.02 | ALARM | R/O | AlarmFlagRange R/O (Configuration Setup) |
| faults.99 | ALARM | R/O | AlarmFlagRange R/O (Communication) |