Digital Output Behavior
When digital IO modules are disabled all digital outputs, even if set, are disabled, while digital inputs can still be read. This article explains how to influence this behavior depending on your application's needs.
Disabled State
Digital IO modules may be disabled in 3 situations:
- Immediately after startup
- When the module detects an error situation
- When disabling motors
In these situations all outputs are disabled by the hardware, even if they are set by the software. In contrast the "Reset and Error States" (see the IO configuration in iRC) can enable or disable individual outputs on software errors.
Configuration
From iRC V15 the behavior of the digital IO modules can be configured to the following modes:
- "always": Disable outputs on "disable motors", does not enable on startup, does not re-enable on error
- "nodisable": Keeps outputs enabled when motors are disabled, does not enable on startup, does not re-enable on error
- "reenable_com": Keeps outputs enabled when motors are disabled, enables outputs on startup, does not re-enable on error
- "reenable": Keeps outputs enabled when motors are disabled, enables outputs on startup, re-enables outputs on error
In iRC V14 and earlier the behavior is "always", from V15 it is "reenable_com".
Note that re-enabling outputs after an error caused by the IO module may cause an edge in any high signal. Re-enabling may fail, if the error can not be resolved by a reset.
The behavior can be configured in the Robot Configuration File. Find the line starting with "<BusConfiguration" and add the parameter "DOutBehavior", e.g.:
<BusConfiguration Protocol="CPRCANv2" CycleTimeMS="10" GapMS="0" DOutBehavior="reenable"