Hitachi HIDIC MICRO-EH Applications Manual page 120

Table of Contents

Advertisement

Item number
Application instructions-3
Ladder format
BTS (d, n)
Instruction format
BTS (d, n)
Usable I/O
d
I/O to be tested
n
Bit location to be tested
Function
Checks the contents of the nth bit of the I/O (word or double word) specified by d, and if the result is "1," '1' is set to C
(R7F0). If the result is "0," C (R7F0) is reset to "0."
The contents of d remains unaltered.
. . . . . . . . . . . . . . . . . .
n+1
n
If d is a word:
Designates the bit location depending on the contents (0 to 15) of the lower 4 bits (b3 to b0) of n (WX,
WY, WR, WM, TC). (Upper bits are ignored and considered as "0.")
The n (constant) can be set to 0 to 15 (decimal).
If d is a double word:
Designates the bit location depending on the contents (0 to 31) of the lower 5 bits (b4 to b0) of n (WX,
WY, WR, WM, TC). (Upper bits are ignored and considered as "0.")
The n (constant) can be set to 0 to 31 (decimal).
Program example
X00000
DIF200
BSET (DR0100, WR0001)
BRES (DR0102, WR0001)
BTS
R000 = R7F0
Name
Condition code
R7F4
R7F3
R7F2
DER
ERR
SD
Number of steps
Condition
Bit
R,
TD, SS,
X
Y
M
CU, CT
WX WY
d
. . . . . . . . . . . . . . . . . . . . . . . .
n-1
C (R7F0)
(DR0104, WR0001)
5-70
Chapter 5 Instruction Specifications
Bit test
Processing time (µs)
R7F1
R7F0
Average Maximum
V
C
31
Steps
3
38
Word
Double word
WR,
DR,
WM TC DX DY
DM
5
4
3
2
1
0
LD
X00000
AND DIF200
[
BSET (DR0100, WR0001)
BRES (DR0102, WR0001)
BTS
(DR0104, WR0001)
R000 = R7F0
]
Remark
Upper case: W
Lower case: DW
Other
The constant is set in
decimal.

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents