Purpose: To achieve binary state read and output
Use port 000.07-000.11 as a 5-digit binary input interface (000.00 is low)
The data of 000CH is first read, but the .00-.06 and .12 bits in 000CH cannot be read. So you can't transfer data directly with MOV.
XFFB (multi-bit transfer) should be used to transfer 7-11 bits of the 000 word.
XFRB#05 (take 5 digits) 00 (target first digit) 07 (source first digit) 000 (source word) D1 (target word)
This will give you a 7-11 bit status.
But just now, the current state is just the opposite, that is to say, when the external data is 0 (0000), it is 15 (FFFF).
Can only perform the -BCD operation again,
15-(0 (external data) = 0000 (external data state) = 1111 (state received by plc) = FFFF (internal data state) = 15 (internal BCD)) = 0 (operation result)
This gives you the same results as external data. You can start the next step in the BIN output processing of the data.
Such as output to the 07CH bit of 100CH
Then is: XFRB#040007D1100
Output completed
Dial Type Liquid Level Gauge,Fuel Level Gauge,Ultrasonic Level Gauge,Magnetic Level Gauge
Taizhou Jiabo Instrument Technology Co., Ltd. , https://www.taizhoujiabo.com