Switching feedback on the fly can be implemented in the RMC via Custom Feedback. This topic describes how.
Tip: The Examples section of Delta's online forum includes a Switching Feedback example. You can use that example to help you get started.
Setting Up Switching Feedback
Read the Custom Feedback topic before completing this procedure.
1. Define a Control Axis with Custom Input
Define a control axis with the feedback type required (position, velocity, pressure, force, or acceleration). For the feedback source, choose Custom.
2. Define the Reference Axes
Create reference axes for each physical feedback input to be used.
3. Configure the Reference Axes
Configure the feedback parameters for the reference axes and verify that the transducer gives valid readings.
Set the Scale and Offset so that the reference axes provide correct values throughout the entire range of feedback.
4. Create a Variable
Create a variable in the Variable Table to specify which feedback will be used, for example ActiveFeedback. The type can be either REAL or DINT.
5. Create a User Program
Create a single-step user program with a Jump Link Type and a Repeat Jump To location.
Add an Expression (113) command.
Create an expression that assigns the feedback value from the reference axes to the CustomCounts of the control axis, based on the value of the ActiveFeedback variable.
Set the CustomErrorBits.NoTrans bit according to the state of the active feedback. This can be done by using the Feedback OK status bits of the reference axes.
For example:
6. Make Sure the User Program Always Runs
As described in more detail in the Custom Feedback topic, do the following:
Set the RMC to start in RUN mode.
Use a _FirstScan condition in the Program Triggers to start the user program when the RMC enters RUN mode.
Make sure the task does not stop when an axis halts.
7. Tune the Axis
Tune the axis manually (auto-tuning does not work in RUN mode).
8. Add Other Code
If other values need to be changed when the feedback is switched, add the necessary code to the expression. For example, some applications may require different tuning gains for each feedback.
Depending on the application, more programming may be needed to make a smooth transition when switching feedback.
See Also
Copyright © 2024 Delta Computer Systems, Inc. dba Delta Motion