6 - 150
6 MOTION PROGRAMS FOR POSITIONING CONTROL
6.16.13 Bit set and reset for word devices (BSET, BRST)
Code BSET,
BRST
Function
Bit operation of the ward
devices
Sets or resets the specifies bit in the word device.
Format
S
Set bit number (0 to15)
B
n
D
ET
;
Word device which operates bit. (#D, #W, #@)
B
n
D
;
RST
Reset bit number (0 to15)
Word device which operates bit. (#D, #W, #@)
[Explanation]
(1) BSET sets the specifies bit in the word device.
(2) BRST resets the specifies bit in the word device.
[Program Example]
Set the 10th
bit of D2000.
BSET #D2000 10 ;
Reset the 12th
bit of #@100.
BRST #@100 12 ;