7 Application Instructions API 50-99 API 72 Operands: S : Start device for switch scan input D 1 : Start device for switch scan output D 2 : Device for storing the set value of switch n : Groups of switches Explanations: 1. Range of n : 1 ~ 2 2. S and D 1 in SA/SX/SC series MPU do not support E, F index register modification. 3. See the specifications of each model for their range of use. 4. Flag: M1029 (DSW execution completed) 5. This instruction designates 4 or 8 consecutive external input points starting from S and 4 consecutive external input points starting from D 1 to scan read 1 or 2 4-digit DIP switches.The set values of DIP switches are stored in 6.
There is no limitation on the times of using this instruction in the program. However, for SA series MPU, only one D 2 . n decides to read 1 or 2 4-digit DIP switches. instruction can be executed at a time. For EH series MPU, two instructions are allowed to be executed at a time. Program Example: 1. The first group of DIP switches consist of X20 ~ X23 and Y20 ~ Y23. The second group of switches consist of X24 ~ X27 and Y20 ~ Y23. When X10 = On, the instruction will be executed and the set values of the first group switches will be read and converted into bin values before being stored in D20.
The set values of the second group switches will be read, converted into bin values and stored in D21. X10 2. When X10 = On, the Y20 ~ Y23 auto scan cycle will be On. Whenever a scan cycle is completed, M1029 will be On for a scan period. 3. Please use transistor output for Y20 ~ Y23. Every pin 1, 2, 4, 8 shall be connected to a diode (0.1A/50V) before connecting to the input terminals on PLC. DVP-PLC APPLICATION MANUAL 7-79 Mnemonic Operands Function DSW Digital Switch Type OP Bit Devices Word Devices Program Steps X Y M S K H Kn X KnY KnM KnS T C D E F DSW:
9 steps S * D 1 * D 2 * * * n * * PULSE 16-bit 32-bit SA SX SC EH SV EH3 SV2 ES EX SS EH3 ES EX SS SA SX SC EH SV EH3 SV2 ES EX SS SA SX SC EH SV SV2 DSW X20 Y20 D20 K2