Utilize Capture to achieve high-accuracy position latching with external inputs, available in position-based and time-based methods to suit various accuracy and motor requirements.
🔹 What is Capture?
Capture enables high accuracy position latching based on an external electrical input. Typical sources of external electrical inputs are home switches and encoder index pulses.
Capture will return the position and sample counter (time in servo samples) for each capture position latch. There is usually one capture object per motor.
🔹 Types of Capture
- Position-Based: where the motor number for the input sources must be the same as the feedback motor number.
- Time-Based Capture: where the motor number and feedback motor number can be different. This makes it possible to use inputs from one node to capture positions on another node.
🔹 Position-Based Capture vs. Time-Based Capture
There are two Capture types — Position-based and Time-based. The capture methodologies for these types differ and can affect performance. The table below summarizes Position-based and Time-based methodologies and their best use.
- Note
- Many drives have a proprietary serial encoder that decodes the encoder position and sends the position information to the FPGA once per sample. In these cases, time-based capture is more accurate than position-based capture.
🔹 Position-Based Capture
For Position-based Capture, the motor number for the input sources and the feedback motor number must be the same.
Position-based Capture with Quadrature Feedback
- Low 10s of nanoseconds capture latency
- Most accurate type of position capture
Position-based Capture with Drive Feedback
- This type of setup leads to very large position capture errors
- RSI strongly discourages using position capture with drive feedback
- Position-based capture is very accurate for systems that have continuous position information (i.e., Digital quadrature encoders, in most cases). Any encoder that is samples less frequently than the 10s of nanoseconds accuracy that is inherent to time-based capture will suffer poor accuracy with position-based capture. Any encoder using drive mode will be sampled at the drive update rate (usually 16kHz, or 62.5 microseconds).
- Sin/cos encoders are used in Drive Feedback mode.
- Position-based capture with encoders in drive feedback mode results in WORSE capture accuracy than drive feedback mode with time-based capture.
🔹 Time-Based Capture
For Time-based Capture, the motor number and feedback motor number can be different. This makes it possible to use inputs from one node to capture positions on another node.
Time-Based Capture
- Position is linearly interpolated.
- Calculated position is truncated to an integer.
- It only works correctly if the speed of an axis is less than 344 million counts per second.- Calculation is very accurate even in high acceleration systems.
- Time-based capture can be used across SynqNet nodes. (Trigger on one node, feedback position on a different node.)
- Time-based capture is ideal for encoders in drive mode.
- Time-based capture is accurate to40 nanoseconds in time. Latched positions are interpolated between adjacent position samples using this highly accurate time stamp. The position latch is subject to how well the encoder approximates a constant velocity trajectory between two adjacent samples.
Time-based Capture Accuracy
Because the time-based capture uses linear interpolation between two successive controller sample periods, there can be capture inaccuracies during very high acceleration or deceleration trajectories. The maximum capture position error can be calculated from:
Max Capture Position Error = $$1/8 * Accel * (1 / Sample Rate)²$$
- Note
- Suppose the axis is accelerating at 10,000,000 counts/sec² and the controller sample rate = 2kHz (default).
Max Capture Position Error = $$1 / 8 * 10,000,000 * (1 / 2000)²$$ = 0.31 counts