Editing Digital I/O
External Digital IO can be managed by the program with a series of Non-Standard DMIS commands.
These commands can be applied to I/O at controller level (when supported) or to an external I/O card (Verify on Arco control Panel for suitable cards).
Contents
Reading the value of an Input
These commands read the value of an input at the moment the command is executed.
The sintax is : INPUT_READ(input_number,card_name)
Where
- input_number: is the number of the input to be read
- card_name: is the label of the additional card as described in Arco Control Panel.
- input_number: is the number of the input to be read
If the card_name value is not specified, then the input is read from the controller and not from the additional board.
Example:
$$ read Input n° 5 from the controller
DECL/BOOL,RSLT
RSLT=ASSIGN/ INPUT_READ(5)
$$ read Input n° 5 from the external board with label ‘MyBoard’ set in the control panel.
RSLT=ASSIGN/ INPUT_READ(5,’MyBoard’)
Important Note
The command IOTEST(n)
from version 3.6 has been obsoleted and it is no longer available.
Waiting a mask of input to be set
This command waits until the mask of input is active, after that, the execution continues.
The sintax is : CALL/EXTERN,DME,'logical_IO','wait_for_input_mask','card_name', input_number,value, input_number,value
Where
- card_name: is the label of the additional card as described in Arco Control Panel.
- input_number: is the number of the input to be read
- value: is the expected value from the input (.true. or .false.)
- card_name: is the label of the additional card as described in Arco Control Panel.
If the card_name value is not specified, then the input is read from the controller and not from the additional board.
Example:
$$ wait until input 5 is true and 6 is false on the controller IO board
CALL/EXTERN,DME,'logical_IO','wait_for_input_mask',5,.true.,6,.false.
$$ wait until input 5 is true and 6 is false on the external board called ‘myBoard’ in the control panel
CALL/EXTERN,DME,'logical_IO','wait_for_input_mask',’myBoard’,5,.true.,6,.false.
Writing the value in an Output
This command sets the value of an output.
The sintax is : CALL/EXTERN,DME,'logical_IO','output_set', 'card_name', input_number,value
Where
- card_name: is the label of the additional card as described in Arco Control Panel.
- input_number: is the number of the input to be read
- value: is the value to be set (.true. or .false.)
- card_name: is the label of the additional card as described in Arco Control Panel.
If the card_name value is not specified, then the input is read from the controller and not from the additional board.
Example:
$$ set the output 5 to true on the controller IO board
CALL/EXTERN,DME,'logical_IO', 'output_set',5,.true.
$$ set the output 5 to true on the external board called ‘myBoard’ in the control panel
CALL/EXTERN,DME,'logical_IO', 'output_set',’myBoard’,5,.true.
Important Note
The command:IOSET,n
and IORESET,n
from version 3.6 has been obsoleted and it is no longer available.