How to Dumb down an RMC

I have an application that will mostly be following an analog signal for position command. This command will make step changes to different positions for the cylinder but obviously, I want the cylinder to move with a defined accel/decel and max velocity. Is there an easy way to link and analog input to the command position register?


Normally to follow an analog signal you would use a gear command. The controller would try to match the analog voltage exactly. This does not work so well when you are just using the analog output as a commanded position and it does not follow a motion profile, so we need to use a different method.

I will make the following assumptions for the purpose of this example:

  1. The system is scaled in inches
  2. When the control signal is 1 V (to the analog input) the system should move to 1 in.
  3. The smallest move that needs to be made is greater than 1/8". If the control signal moves by less than 0.125 V we will maintain position.

We can use the PreScan table to detect changes to the control signal and trigger a motion command. The Condition will look like this:

ABS(_AI[0] - _Axis[0].TarPos) > 0.12

note: _AI[0] is only available in the RMC75, and refers to analog input 0 (See the help topic on Analog Input Registers). The same results can be achieved in a RMC150 by creating a reference axis and using the ActPos register.

You would then need to write a user program to decide what to do with the new input signal. The first step, you might want to wait for the input to settle, and then issue a command to move the axis to the new position. Your program might look somethings like this:
Step 1: No Command, Link Type: Delay 100 ms
Step 2: Move Absolute (20)

  • Position: ROUND(_AI[0] * 8.0) / 8.0
  • Speed: 10
  • Accel: 50
  • Decel: 50

note: the ROUND function requires RMCTools and Firmware version 3.40.0 or newer. Both can be downloaded from our website.
The purpose rounding the control signal is to make sure the axis goes to a multiple of 1/8"

This example could be easily adapted many different systems. If you are not using the maximum number of axes on your controller, it is a good idea to set up a reference axis instead of using the analog input registers because then you get many options for scaling and conditioning the input signal.

Thanks John,

I’ll give it a try.

There are some simple solutions. One is two turn on the low pass filter ( four pole Butterworth ) on the analog reference and set the band width to something that limits the velocity and acceleration to acceptable levels. This filter is built in. The filtered value will be the target values on an analog input so gear to the analog reference’s target position. This is simple but it really doesn’t give you complete control of velocity or acceleration. Also the bandwidth must be high enough so the actuator can move the full stroke in the required amount of time. This is by far the easiest solution if it works well enough. This low pass filter will always lag the analog reference.

A not so dumb method is similar in that the analog reference must be processed/filtered before gearing to it. Basically it is a 3 pole low pass filter with velocity, acceleration and jerk limits and a time constant for the 3 poles. This is implemented in user programs. Now the analog reference gets smoothed by this new filter. This filter does not lag the analog reference unless the analog reference exceeds the velocity, acceleration and jerk limits. The filter runs all the time. I need to turn this into a function that can be simply called now that we have user functions.