ndInb
(Library)
Converts the input of a designated port to a decimal number and treats it as a binary number.
ndlnb (<Integer variable number>, <Least significant digit output port number>, <Most significant digit output port number>)
This statement provides a similar function to an INB instruction in the conventional language.
The system reads the status of a designated input port signal and converts it to a decimal number by treating it as a binary number.
The system assigns a converted value to the integer variable.
You can define the same function with DEFIO and IN instruction in the PAC language. Use DEFIO and IN instructions because this method is more effective.
For input ports, use 16 ports or less in series. If you designate more than 16 ports, no processing will be done.
CALL ndInb(1,552,567)
|
'Reads the status of input ports 552 to 567 as a 16-bit
'binary, converts it to decimal, and assigns it
'to the integer variable (1).
|