An oDio1 Object's State property represents the electrical state of the I/O line specified by the IOLine property. The Direction property specifies if the I/O Line is an input or an output. The State property can be pointed to by a Virtual Circuit. This allows a Virtual Circuit to output a calculated value on the I/O Line once each Object List Loop. When the Direction property is 1 (an input), the electrical state of the specified I/O Line is copied to the State property once each Object List Loop. When the Direction property is 0 (an output), the electrical state of the specified I/O Line is set to the state of the State property once each Object List Loop. When the IOLine property is set, the Direction property is updated to reflect the current state of the specified I/O Line. Note that this means that you MUST set the IOLine property before you set the Direction property for the Direction property to affect the I/O line you want to use. The IOLine property is an instance of the oIOLine object which is created when the oDIO1 object is. The oDIO1 object uses the oIOLine Object to do the actual I/O to the I/O line. Since the default property of the oIOLine specifies which I/O line to work with, then the IOLine property can be directly specified. Example: IOLine = 1. (see oIOLine object for more detail) Thirty-one physical 1-bit I/O Lines are implemented within the ooPIC. Caution: the I/O lines in I/O lines 16 - 23 are used for special purposes such as PWM, serial input/output and DDELink. Be sure that you are not attempting to reuse them if the special functions are in use. |