Manual

8-4 Using the Digital Outputs and Inputs
It is this declared value which drives all seven non-MN ways of using the Digital Inputs.
Thus a False-to-True transition can produce an immediate result, whereas a True-to-False
transition will not be responded to for at least 20 milliseconds. If possible, you should
arrange the logic sense (via personality parameter 38) so that any transition requiring
immediate response is False-to-True.
If your switch contacts bounce for more than 20 milliseconds you can do one of two things.
Either add external hardware to debounce the switches, or use careful programming in your
ACL move sequence, to ensure that the switch bounce does not have bad effects. For
example, make sure that the response to a switch closure takes longer than the bounce time,
and that the switch is ignored during the response (i.e., don't retest the switch immediately
and don't use interrupts).
During the 20 milliseconds following any True-to-False transition the VGP is busy watching
the Digital Inputs. Therefore there will be a slight delay in your move sequence. In most
cases this delay will not be objectionable, but in some applications you may need to arrange
your external hardware so that the Digital Inputs do not dither unnecessarily.
If the Automove System is used in an electrically noisy environment you may need to shield
the cable connected to the Digital Inputs. Otherwise, electrical noise may cause inaccurate
responses as well as unnecessary debounce delays.
Sending Them Back To The Host
By using the ON ("Output Digital Inputs State") command the host computer can determine
the current (debounced) state of the Digital Inputs. This can be used for: displaying system
status on a screen; executing conditional branches within the host software (perhaps to
simulate the behavior of XI in a Download Sequence); waiting for other hardware to finish
some action; determining the state of a configuration or mode switch.
If you use ON to perform conditional branches in the host you will probably get the same
results as if you had put an XI command into a Download Sequence. However, the ON/host
scheme does not run as fast as the XI command would; so under some conditions the timing
differences might cause different behavior. You might avoid this problem by using partly
downloaded ACL and partly "live" ACL; the host sends an XI command which executes a
previously-downloaded sequence.
In general, however, it is wise to eliminate those situations in which timing is critical,
because a front-panel PAUSE or an interrupt might cause them to break down anyway.
Don't confuse the ON command with the OD command, which sends back the last value
applied to the Digital Outputs.
Waiting
The WN ("Wait For Digital Inputs") command is useful when you need to delay or hold off
the move sequence until some action is complete or until some triggering event occurs. For
example, suppose a Digital Output is connected to a solenoid valve which controls a
pneumatic cylinder. After actuating the cylinder you must wait until it completes its travel
before beginning to move the motors.