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.
This article only applies to CPR CANv2 IO modules (i.e. all CPR IO modules except CANopen modules).
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 modes "always", "nodisable", "reenable_com" and "reenable". In iRC V14 and earlier the behavior is "always", from V15 it is "reenable_com".
| always | nodisable | reenable_com | reenable | |
|---|---|---|---|---|
| on "disable motors" | disabled | enabled | enabled | enabled |
| on startup | disabled | disabled | enabled | enabled |
| on COM error | disabled | disabled | enabled | enabled |
| on error | disabled | disabled | disabled | enabled |
Note that re-enabling outputs after an error caused by the IO module may cause a short 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"