3 . I ns t r uc ti on Se t3- 1 9 9API Mnemonic Operands Function ControllersES2/EX2 SS2 SA2SESX272 DSW DIP SwitchTypeOPBit Devices Word devices Program StepsX Y M S K H KnX KnY KnM KnS T C D E F DSW: 9 stepsS *D1 *D2 * * *n * *PULSE 16-bit 32-bitES2/EX2 SS2 SA2SE SX2 ES2/EX2 SS2 SA2SE SX2 ES2/EX2 SS2 SA2SE SX2Operands:S: The Start of input devices D1: The Start of output devices D2: Device for storing switch inputvalue n: Groups of switches (n = 1~2)Explanations:1. This instruction creates 1(2) group of 4-digit DIP switch by the combination of 4(8) consecutiveinput points starting from S and 4 consecutive output points starting from D1. The set value willbe read in D2 and the value in n specifies the number of groups (1~2) of the DIP switch.2. n = K1, D2 occupies 1 register. n = K2, D2 occupies 2 consecutive registers.3. There is no limitation on the times of using this instruction in the program, however only oneinstruction is allowed to be executed at the same scan time.Program Example:1. The first group of DIP switches consists of X20 ~ X23 and Y20 ~ Y23. The second group ofswitches consists of X24 ~ X27 and Y20 ~ Y23. When X10 = ON, the instruction will beexecuted and the set value of the first switch will be read and converted into BIN value thenstored in D20. BIN value of 2nd switch will be stored in D21.X0DSW X20 Y20 D20 K22. When X0 = ON, Y20~Y23 are scanned repeatedly. M1029 = ON for a scan time when a scancycle from Y20 to Y23 is completed.X0Y20Y21Y22Y23M10290.1s0.1s0.1s0.1s0.1s 0.1sinterruptexecution completedoperation start