Command timeouts
Overview
Command timeouts protect the system from a remote device that stops sending new commands (a frozen frame). The remote device sends a changing value in the high byte of Remote state command. Usually, this is a rolling counter. For example, increase the high byte at each heartbeat (0x0100, 0x0200, 0x0300 ... 0xFF00). Do not alternate between two values.
The controller measures the time between changes of the high byte. It compares each time with Command timeout threshold. It compares the average of the last 100 times with Average Command timeout threshold.
| Byte | Contains | Values |
|---|---|---|
| Low byte | Remote state command | 0 = Off, 1 = Idle, 2 = Run |
| High byte | Watchdog counter | Rolling counter from 0 to 255 |
Remote state command (address 493)
Send Remote state command at each heartbeat of your control unit, with a new watchdog counter value each time. This applies to all remote interfaces, including CANopen. For CANopen, refer to ASI CANopen Programming Guide.
Application notes
Do not set the average threshold equal to the heartbeat interval, because this can cause unwanted faults. For example, with a heartbeat of 200 ms, set the average threshold to 250 ms and the instantaneous threshold to 1000 ms. Then the average of 100 samples cannot be more than 250 ms, and no single heartbeat interval can be more than 1000 ms. Adjust these values to your safety requirements.
Recommended thresholds
Base the thresholds on T, the interval at which your control unit sends Remote state command with a new watchdog counter value.
| Parameter | Recommended value | Reason |
|---|---|---|
Average Command timeout threshold |
1.25 to 1.5 × T | Finds a control unit that operates slowly or loses many messages. Usual timing jitter does not cause faults. |
Command timeout threshold |
3 to 5 × T | Permits 2 to 4 lost messages in sequence. Do not set it longer than the time that your vehicle can safely operate on the last command that it received. |
Recommended command timeout thresholds
| T | Average Command timeout threshold |
Command timeout threshold |
|---|---|---|
| 20 ms | 25 ms to 30 ms | 60 ms to 100 ms |
| 100 ms | 125 ms to 150 ms | 300 ms to 500 ms |
| 200 ms | 250 ms | 600 ms to 1000 ms |
Example thresholds
Configuration
DANGER
Set Command timeout threshold and Average Command timeout threshold. If you do not set them and communication stops, it can be impossible to stop the motor.
- Set
Command timeout thresholdto a value that is not zero. This gives instantaneous timeout faults (1 sample). - Set
Average Command timeout thresholdto a value that is not zero. This gives averaged timeout faults (100 samples).
To disable command timeouts, set Command timeout threshold and Average Command timeout threshold to 0.
Comm loss limp mode
Comm loss limp mode decreases the vehicle speed and power when communication stops, but does not stop the motor. This function is available in firmware 6.023 and later.
Prerequisites
- The command timeout parameters are set. Refer to Configuration.
- The controller does not use a remote source for the throttle, the analog brake or the cutoff brake.
- Set
Comm Loss Limp Mode Speed(address 1971). This is the speed multiplier, in per unit, when limp mode is fully engaged. - Set
Comm Loss Limp Mode Power(address 1972). This is the power multiplier, in per unit, when limp mode is fully engaged. -
Set
Comm loss Limp Mode Interval(address 1973). This is the time in which the vehicle speed and power limits decrease linearly from their current values 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 0.4, and the interval is 5 seconds. Communication stops when the vehicle is at 75% of its maximum speed and power because of the assist level. The speed and power limits decrease linearly from 75% to 30% (0.4 × 75%) in 5 seconds.
FAQ
Can Command timeout threshold (1 sample) and Average Command timeout threshold (100 samples) use remote Modbus or CANopen writes, or must I use a different parameter?
You must send a rolling counter in the high byte of Remote state command, at a heartbeat that is in 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 |
High and low bytes of Remote state command
Can a CAN sync loss cause a motor fault?
Yes, if Command timeout threshold (1 sample) and Average Command timeout threshold (100 samples) are set (usually 1000 ms and 250 ms). If the RPDOs do not arrive in CAN sync loss timeout, the controller shows the Network communication timeout fault (Faults bit 8). This fault disables the motor until you disconnect and connect the power again. The LED flashes a 2, 1 sequence during the fault.
How do I use Remote Throttle Voltage for the throttle in local control (for example, Control command source is Throttle, or Throttle OR pedal sensor) when the command timeouts are set?
Send a heartbeat with a rolling counter in the high byte of Remote state command (values more than 255). For example: 0x0100, 0x0200, 0x0300 ... 0xFF00.
Does the controller brake when communication stops?
The controller brakes to 0 speed only in remote speed mode: Control command source is 0 (Remote) and Speed regulator mode is 0 (Speed). Remote comm loss current limit, as a percentage of Rated motor current, limits the braking current. The braking continues for 10 seconds.
In all other modes, the controller does not brake.