Jump to content

Digital Output Behavior: Difference between revisions

From Wiki
No edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
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.
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 =
= Disabled State =
Line 10: Line 12:


= Configuration =
= Configuration =
From iRC V15 the behavior of the digital IO modules can be configured to the following modes:
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": 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, re-enable outputs only on communication timeout
* "reenable": Keeps outputs enabled when motors are disabled, enables outputs on startup, re-enables outputs on any error


In iRC V14 and earlier the behavior is "always", from V15 it is "reenable_com".
{| class="wikitable"
|+ Digital output behavior in different situations
|-
! !! 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 an edge in any high signal. Re-enabling may fail, if the error can not be resolved by a reset.
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.:
The behavior can be configured in the [[Robot Configuration File]]. Find the line starting with "<BusConfiguration" and add the parameter "DOutBehavior", e.g.:

Latest revision as of 14:15, 30 March 2026

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".

Digital output behavior in different situations
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"