This page describes the device driver and the device window for the N-Way-Switch logical device. This device controls a non-latching n-way switch which is controlled by a dedicated drive circuit for each input.
The N-Way-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 n-way switch must be wired in a way that the drive coils of the switch are connected to consecutive output ports which appear in the same output register variable of the PLC driver.
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 end shows the (translated) PLC port 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 |
|---|---|
| firstDrivePort | The address of the PLC which activates lowest switch position. The output ports for the subsequent switch positions are evaluated automatically. See the paragraph 'Port addressing' below for details. |
| includeOff | If you set this parameter to NO, the first selection from the 'positions' list activates the output port addressed by 'firstDrivePort'. With includeOff = YES, the first selection from the 'positions' list switches off all drive outputs. In this case the second selection activates the first output port. monitor. |
| positions | By default the device reports the state of the switch as '0' ... '4'. You may specify arbitrary texts for the switch positions. 'positions' contains a list of descriptions, separated by comma characters. The number of list elements also set the number of output ports, the N-Way-Switch uses. |
| 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 | Drive Combination | This fault is set if more than one output port is activated, or - with includeOff=NO - not port at all is set. |
| faults.02 | Configuration Setup | This fault signals that the 'firstDrivePort' parameter ist not properly configured. The device expects, that 'drivePort' is set to a value 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.
In case of the N-Way-Switch device, the configured port address specifies the first of the (totally n ) output ports which drive the switch. Configuration example:
firstDrivePort = PLC.Q00001+0
includeOff = YES
positions = 0,1,2,3,4
This example configures a 4-way switch with an additional 'all-off' setting. It uses the output ports ' PLC.Q00001+0 ' .. ' PLC.Q00001+3 '. The switch position ' 0 ' clears all four output signals, switch position ' 3 ' for example activates the output port ' PLC.Q00001+2 '.
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 |
| config.firstDrivePort | TEXT | SAVE SETUP | StringRange |
| config.includeOff | CHOICE | SAVE SETUP | EnumRange (YES NO) |
| config.positions | TEXT | SAVE SETUP | StringRange |
| config.commFaultId | TEXT | SAVE SETUP | StringRange |
| position | CHOICE | EnumRange (0 1 2 3 4) | |
| faults.01 | ALARM | R/O | AlarmFlagRange R/O (Drive Combination) |
| faults.02 | ALARM | R/O | AlarmFlagRange R/O (Configuration Setup) |
| faults.99 | ALARM | R/O | AlarmFlagRange R/O (Communication) |