T-Series/Commands/Set Closed-Loop Mode

From ZaberWiki
Jump to navigation Jump to search

Set Closed-Loop Mode - Cmd 118

Warning: This is an "include" page. As such, its contents may be included in multiple other pages. To see a list of all pages that include this page, click on "What links here" in the bottom left navbar. If you make changes to this page, be sure that your changes are appropriate to all pages on which this content will be included. You are also encouraged to review our Zaber Wiki Editing Guidelines. This header will not be included in other pages.

Instruction Name Set Closed-Loop Mode
Applies to A-Series and X-Series motorized closed-loop devices
Firmware Version 6.xx
Command Number 118
Command Type Setting
Command Data Closed-Loop Mode
Reply Data Closed-Loop Mode
Safe to retry? Yes
Returns Current Position? No
Persistence Non-Volatile
Summary Sets the closed-loop (slip, stall, and displacement detection and recovery) control mode for encoder embedded devices.

This command configures the closed-loop behavior of a device, determining its reaction to slips, stalls, and displacement conditions. Behavior and available settings vary by encoder type.

Devices with Motor Mounted Encoders

Closed-Loop Mode Slip Detected1 Stall Detected2 Displaced While Stationary
0 - Disabled
  • No action.
  • No action.
  • No action.
1 - Passive Mode
  • Blue LED cycles on and off every two seconds.
2 - Stall Detection
3 - Position Correction (Default)
4 - Stall Recovery
5 - Displace Recovery

1 - A stepper motor has slipped when the encoder feedback lags the Current Position - Cmd_60 by two full steps of the motor or more.
2 - A device has stalled when the motor has failed to make progress towards the targeted position for the Stall Timeout - Cmd 120 period.

Devices with Direct Reading or Linear Encoders

Closed-Loop Mode Approaching Targeted Position Stall Detected3 Displaced While Stationary
0 - Disabled
  • No action.
  • No action.
  • No action.
1 - Passive Mode
  • Not available.
  • Not available.
  • Not available.
2 - Stall Detection
  • No action.
3 - Position Correction (Default)
  • Device makes small movements to try to match the encoder's position to the targeted position.
  • If the encoder's position doesn't match the targeted position after the adjustments, Current Position (Cmd 60) is updated to match the encoder's position.
4 - Stall Recovery
  • Device makes small movements to try to match the encoder's position to the targeted position.
  • If the encoder's position doesn't match the targeted position after the adjustments, Current Position (Cmd 60) is updated to match the encoder's position.
5 - Displace Recovery
  • Device makes small movements to try to match the encoder's position to the targeted position.
  • If the encoder's position doesn't match the targeted position after the adjustments, Current Position (Cmd 60) is updated to match the encoder's position.

3 - A device has stalled when the motor has failed to make progress towards the targeted position for the Stall Timeout - Cmd 120 period.

Voice Coil Devices

Closed-Loop Mode Stall Detected4 Displaced While Stationary5
0 - Disabled
  • Not available.
  • Not available.
1 - Passive Mode
  • Not available.
  • Not available.
2 - Stall Detection
  • Not available.
  • Not available.
3 - Position Correction
4 - Stall Recovery
5 - Displace Recovery (Default)
  • Device always restores to its original location.

4 - A voice coil device is considered to have stalled when the motor has output its maximum force for over the Stall Timeout (Cmd 120) period during a position controlled movement.
5 - A voice coil device has been displaced if it has been held at a new location for the Stall Timeout (Cmd 120) period in position control mode.

Closed-loop (slip/stall/displacement recovery) mode can be enabled on devices with a built-in encoder.

To use closed-loop modes with a third party encoder, use ASCII mode to configure encoder.mode and all encoder related settings. Set encoder.dir so that encoder.count increments in the same direction as pos. Adjust cloop.steps and cloop.counts to reflect the correct ratio between motor full steps and encoder counts.