Difference between revisions of "Digital IO"

From ArcoWiki
Jump to: navigation, search
 
(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:
External '''[[Digital IO]]''' can be managed by the program with a series of Non-Standard [[DMIS]] commands.<br/>
+
[[it:IO Digitale]]
These commands can be applied to IO at controller level (when supported) or to an external IO card (Verify on Arco control Panel for suitable cards).<br/>
+
[[zh-cn:数字IO]]
 +
[[pt:Digital IO]]
 +
[[de:Digitale IO]]
 +
[[es:IO Digital]]
 +
[[en:Digital IO]]
  
 
+
[[Category:Dmis_Tutorial]]
== Reading the value of an Input ==
 
These commands read the value of an input at the moment the command is executed.<br/>
 
 
 
The sintax is : <code>INPUT_READ(input_number,card_name)</code></br>
 
 
 
Where
 
::''input_number'': is the number of the input to be read<br/>
 
::''card_name'': is the label of the additional card as described in Arco Control Panel.<br/>
 
If the ''card_name'' value is not specified, then the input is read from the controller and not from the additional board.<br/>
 
 
 
Example:<br/>
 
::<code>DECL/BOOL,RSLT</code>
 
<code><span style="color: green; text-decoration: none;">$$ read Input n° 5 from the controller </span><br/></code>
 
::<code>RSLT=ASSIGN/ INPUT_READ(5) </code>
 
 
 
<code><span style="color: green; text-decoration: none;">$$ read Input n° 5 from the external board with label ‘MyBoard’ set in the control panel.</span><br/></code>
 
::<code>RSLT=ASSIGN/ INPUT_READ(5,’MyBoard’) </code>
 
 
 
===Important Note===
 
The command <code>IOTEST(n) </code> from version 3.6 has been obsoleted and it is no longer available.<br/>
 
 
 
==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 : <code>CALL/EXTERN,DME,'logical_IO','wait_for_input_mask','card_name', input_number,value, input_number,value</code></br>
 
 
 
Where<br/>
 
 
 
::''card_name'': is the label of the additional card as described in Arco Control Panel.<br/>
 
::''input_number'': is the number of the input to be read<br/>
 
::''value'': is the expected value from the input (.true. or .false.)<br/>
 
 
 
If the ''card_name'' value is not specified, then the input is read from the controller and not from the additional board.<br/>
 
 
 
Example:<br/>
 
::<code>DECL/BOOL,RSLT</code>
 
<code><span style="color: green; text-decoration: none;">$$ wait until input 5 is true and 6 is false on the controller IO board</span><br/></code>
 
::<code>CALL/EXTERN,DME,'logical_IO','wait_for_input_mask',5,.true.,6,.false.</code>
 
 
 
<code><span style="color: green; text-decoration: none;">$$ wait until input 5 is true and 6 is false on the external board called ‘myBoard’ in the control panel</span><br/></code>
 
::<code>CALL/EXTERN,DME,'logical_IO','wait_for_input_mask',’myBoard’,5,.true.,6,.false.</code>
 
 
 
==Writing the value in an Output==
 
This command sets the value of an output.<br/>
 
The sintax is : <code>CALL/EXTERN,DME,'logical_IO','output_set', 'card_name', input_number,value</code></br>
 
 
 
 
 
Where<br/>
 
 
 
::''card_name'': is the label of the additional card as described in Arco Control Panel.<br/>
 
::''input_number'': is the number of the input to be read<br/>
 
::''value'': is the value to be set (.true. or .false.)<br/>
 
 
 
If the ''card_name value'' is not specified, then the input is read from the controller and not from the additional board.<br/>
 
 
 
Example:<br/>
 
::<code>DECL/BOOL,RSLT
 
<code><span style="color: green; text-decoration: none;">$$ set the output 5 to true on the controller IO board</span><br/></code>
 
::<code>CALL/EXTERN,DME,'logical_IO', 'output_set',5,.true.</code>
 
 
 
<code><span style="color: green; text-decoration: none;">$$ set the output 5 to true on the external board called ‘myBoard’ in the control panel</span><br/></code>
 
::<code>CALL/EXTERN,DME,'logical_IO', 'output_set',’myBoard’,5,.true.</code>
 
 
 
 
 
===Important Note===
 
The command:<code>IOSET,n</code> and <code>IORESET,n</code> from version 3.6 has been obsoleted and it is no longer available.
 

Latest revision as of 13:06, 6 June 2018