An RMC75E will be used for dual control (position / single input force). For simulation purposes, a curve has been created to generate a force as a function of position. A ‘Move Absolute (20)’ causes a variable tied to the curve to change as the position changes. By setting the Secondary Feedback, ‘Using:’ selection to custom, the ‘Custom Counts (C)’ variable is available and is set in a continuously running program to the force value. What would be the next step to get the Actual Force to reflect this? We would like to simulate a sequence where we move to a position, change to force control and drive up to some limit, stop, and return.
The expression that assigns a value to the custom counts should be sufficient. That expression will use the _CrvInterpY function to get the force from the curve, given the current x value of the curve. I assume the currect x value is the Actual Position, but I am not entirely sure from your explanation. Once that calculated value is assigned to the Custom Counts tag, it should appear in the Actual Force. Keep in mind that the Force Scale and Offset will affect the value. If the Force Scale is 1 and the Force Offset is 0, then the Actual Force will be the same value as the Custom Counts were assigned by the expression.
-Jacob
Did you notice that when you use the simulation wizard on a pressure/force axis it will setup simulated springs at both ends of the cylinder travel? If your position force profile is linear (or close to it) this would be an easier approach for testing purposes.
By default it will give you springs at both ends with 10,000 force units of resistance over 0.5 position units. This force increases linearly as the position moves into and through this range. You can customize these values in the Simulation Wizard.
The way you describe sounds way more fun but I have used this method to simulate position / force axes many times with success.
This is the approach I’ll be taking if I can’t figure it out! In the final working program though, I will be passing variables from the PLC to define where the changeover should occur and setting a few bits to pass back and forth regarding the status of the process (in position, force reached, etc). I wanted to vary those to make sure all that logic was working as well. I figured I could test all sorts of crazy scenarios with the curve beyond just what I expect to see.
I suspect it is not updating because I am in Simulate Mode?
Unfortunately I do not have anything connected to the controller yet… so simulation is my only option.
Oh, yes, that would be a problem. Simulate Mode totally takes over and ignores the real feedback, including custom counts.
You could possibly set up the primary feedback as custom as well, and simply set the primary Custom Counts to the Target Position. Then you should be able to run the axis without simulate mode.
That seems to work… I setup a slope / intercept equation to figure out the counts on the position feedback and knocked the simulate bit off. I added that to my ‘always running’ routine…
(my range of movement is arbitrarily set for 0-30mm with 61400 counts at 30 and 1400 at 0)
so now I should be able to experiment with my actual routines!!! If this is of interest to anyone and ya need more details, let me know! Thanks!
I must say that I don’t think I have ever run across anyone doing this before!
One of the engineers here pointed out a couple of issues:
- Open loop won’t work.
- In force control, the Target Position won’t change, so the force won’t either. I think that you could possibly switch to calculating the position based on the force. This would require getting the x value of the curve, given the y value. This only works if the curve is monotonic. Here is a link to a user function for finding the x value: Crv_interp_x
I hadn’t got that far into the process yet - but I see the issue… The goal is not necessarily to create a particularly accurate simulation - but instead to create reasonable approximations to what may be encountered during operation so we can update our logic on the PLC side. We have some indicators on our HMI for when a force has been reached, a position is exceeded, etc… I figured while I wait for those long lead time items we can get this work knocked out! Out of curiosity - how does the simulation generate the feedback for the end of travel feedback? I can use that suggestion to accomplish my goal. (@ndzied1)
The simulator uses a first-order or second-order formula to calculate the position based on the Control Output. At the ends of travel, the formula is modified by adding a simulated spring.
You tagged me so I thought I’d make a little video showing the position / force simulation in RMCTools. I didn’t check the video so if something seems off or doesn’t make sense, just let me know. Hope you find it informative.
Thanks for the tutorial!



