Command Timeouts
Overview
Command timeouts are used to protect from frozen frames from remote devices. This is accomplished by sending a changing value to the high-byte of Remote state command, typically a rolling high-byte is used. E.g. Incrementing the high-byte on each heartbeat (0x0100, 0x0200, 0x0300 ... 0xFF00), instead of alternating two values. The time between changing values of this high-byte are compared instantaneously against Command timeout threshold or the average of the last 100 samples against Average Command timeout threshold.
Application notes
Generally, you do not want to set the average to your actual heartbeat time-period or you risk nuisance trips. You might have a heartbeat of 200ms, set your average to 250ms and your instantaneous to 1000ms. So, that any 100 samples do not average greater than 250ms and any instantaneous heartbeat is not longer than 1000ms. Adjust these based on your safety requirements accordingly.
Configuration
- Set
Command timeout thresholdto a non-zero value for instantaneous timeout faults (1 sample). - Set
Average Command timeout thresholdto a non-zero value, for averaged timeout faults (100 samples).
To disable command timeouts, set both Command timeout threshold and Average Command timeout threshold to 0.
Comm loss limp mode
Comm loss limp mode reduces the vehicle speed and power when communication is lost, instead of stopping the motor. This feature is available in firmware 6.023 and higher.
Prerequisites
- The command timeout parameters must be configured as described in Configuration.
- The controller must not use a remote source for the throttle, analog brake or cutoff brake.
- Set
Comm Loss Limp Mode Speed(address 1971). This is the speed multiplier, in per unit, applied when limp mode is fully engaged. - Set
Comm Loss Limp Mode Power(address 1972). This is the power multiplier, in per unit, applied when limp mode is fully engaged. -
Set
Comm loss Limp Mode Interval(address 1973). This is the time over which the vehicle speed and power limits ramp linearly from their current values down to the limp mode values.The interval is in seconds.
The interval is in milliseconds.
-
Enable
Features3bit 14 Comm Loss Limp Mode.
controller flags2 bit 6 comm loss limp mode shows when limp mode is active.
Example
Comm Loss Limp Mode Speed and Comm Loss Limp Mode Power are both set to 0.4, and the interval is set to 5 seconds. If the vehicle is at 75% of its maximum speed and power because of the assist level when communication is lost, the speed and power limits ramp down linearly from 75% to 30% (0.4 × 75%) over 5 seconds.
FAQ
Can Command timeout threshold (1 sample) and Average Command timeout threshold (100 samples) be made to respect remote Modbus or CANopen writes or is there some other parameter we should use?
You must send a rolling counter on the high byte of Remote state command on a heartbeat within the timeout thresholds.
| Byte | Function | Notes |
|---|---|---|
| Low byte | Remote State Command | 0 = Off, 1 = Idle, 2 = Active |
| High byte | Watchdog Counter | Rolling Counter from 0 to 255 |
Can CAN sync loss fault motor?
If CAN sync loss timeout is not respected (RPDO), and Command timeout threshold (1 sample) and Average Command timeout threshold (100 samples) are set (typically 1000 ms and 250 ms respectively). It will trigger the Faults bit 8 Network communication timeout fault which causes the motor to be disabled until the controller is power cycled, and the LED should flash a 2, 1 sequence while faulted.
How do you use Remote Throttle Voltage for throttle when running in local mode (e.g. Control command source = throttle or pedal and throttle) when Command timeout threshold (1 sample) and Average Command timeout threshold (100 samples) are set?
You must send a heartbeat, rolling counter, on the Remote state command above 255. e.g., A rolling counter on the high byte (0x0100, 0x0200, 0x0300 ... 0xFF00)
Communication loss braking?
If the communication loss fault triggers, it will initiate braking to 0 only if in remote speed mode, Control command source = 0 (serial stream) and Speed regulator mode = 0 (speed). The braking current is limited by Remote comm loss current limit as a function of rated motor current for braking. Braking will occur for 10 seconds.
It does not trigger in other modes, i.e., Control command source is not set to 0 (serial stream)