TsctlAIOReadyDesc

From embeddedTS Manuals

Returns a negative error code if the AIO unit does not support polled conversion. In that case you must call one of the blocking functions instead, i.e. Get, Put, Gets, or Puts as appropriate.

If the specified channel is currently active, returns 0.

If a different channel is active, or an invalid channel was passed, returns a negative error code.

If the specified channel was the last channel active but has now finished, returns a positive value.

If no channel is currently active, makes the specified channel active and returns 0.

A channel goes through the following states:

  1. When a channel is first made active, it waits for its trigger to occur. If its trigger is "on demand" then not wait is done at this step.
  2. The channel remains active while conversion begins and proceed.
  3. When conversion is finished, the channel becomes inactive as well as the last channel active.

A non-positive return value indicates that a subsequent call to Get (for ADC) or Put (for DAC) will block, unless the error code indicates an invalid channel was passed, in which case nothing can be deduced about whether the Get or Put call will block.

Calling Gets (for ADC), Puts (for DAC), or Readys (for either) will override the behavior of this call.