Difference between revisions of "MC-Basic:SYSTEM.DIPSWITCH"
(Created page with '{{MC-Basic |SHORT FORM= |SYNTAX= System.DipSwitch{.''<bit number>''}<br> Sys.DipSwitch{.''<bit number>''}<br> ?System.DipSwitch{.''<bit number>''}<br> ?Sys.DipSwitch{.''<…') |
m (1 revision) |
(No difference)
|
Revision as of 16:10, 13 December 2010
SYSTEM.DIPSWITCH reads the value of one or more of the 8 DIPswitch inputs. The variable contains the values of the individual bits in the DIPswitch byte. If SYSTEM.DIPSWITCH is qualified by a bit number, only that input bit is read. SYSTEM.DIPSWITCH returns the value 1 or 0, depending on the setting of the switch.
Bit # 6 directs the system not to load the Config.prg file during system startup.
0= Config.prg is not loaded.
1 = Config.prg is loaded. Default value should be 1 during normal operation.
Bit # 7 directs the system to run using the firmware backup file (VxBackup) during system startup.
0 = VxWorks is loaded. Default value should be 0 during normal operation.
1= VxBackup is loaded
Bit # 8 is reserved for system use.
Syntax
System.DipSwitch{.<bit number>}
Sys.DipSwitch{.<bit number>}
?System.DipSwitch{.<bit number>}
?Sys.DipSwitch{.<bit number>}
Availability
All versions; PCI and Standalone only
Type
<bit number>: Long
Value: Long
Range
<bit number>: 1 to 8
Value: 0 to 255 (0xFF)
Default
See description.
Scope
Configuration, Task or Terminal
Limitations
Read-Only
Examples
MyVar = System.DipSwitch
'MyVar is assigned the value of the input word
MyVar = System.DipSwitch.1
'MyVar is assigned 0 or 1, according to the value of the switch