- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Using MCSV - MATC to control velocity
[ Edited ]- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
09-25-2009 06:27 PM - last edited on 09-25-2009 06:28 PM
So here's the deal; I want to build a nice cubic cam for stepping the velocity of a rotating mass. It is going to cruse along at, say, 1000 FPM. When triggered, I want to drop it down to ~ 800FPM for a short period of time, and then accelerate it back to 1000FPM.
Yes, I can do this with a MCD or an additional MAJ box, but that's ghetto and we all know it. I want to build a nice cam that I can tweak and then use as a model.
Here's the issue.
When you build a cam that does this with the cam editor, you don't get a velocity cam, you get a position cam. So if you point a MATC instruction at that profile, you're going to get something that looks like this (see the red dotted line in the cam editor?)
Pay attention to the first derivative, because that's our velocity output. What does a trend look like of that axis? Just like you would expect it to:
Remember, d(s)/dt = dv/dt.
Is there some way I can grab that position cam, dump in into the velocity profile and have the controller calculate a NEW position cam? I know that you can use MCSV to pull the velocity and accel (slope, slope derivative) but how can I push that back at MCCP to derive positions?
Re: Using MCSV - MATC to control velocity
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
09-26-2009 10:25 AM
Hi Vong,
Agree with the ghetto statement - though the simple things work for 80% of the cases.
Sounds like what you could really do with is building up your own profiles (either 5th, 7th order etc) - and making multi segment cams to follow, or even switching (pending )cams - You typically specify the boundaries of your segments (position, velocity and accelerations) - though this sort of stuff isn't going to get explained in a forum answer on how to do it from 1st principles.
You can find an introduction here Cam Maths
BTW, a cubic position profile will always have a 2nd derivative as a linear segment (the accel of ax^3 + bx^2 + cx + d is 6ax + 2b and therefore will always be a step change, so even a cubic isn't the best solution).
You can try this trick which allows you to run and execute two position cams at the same time on an axis to get an overall profile.
You can execute a direct position cam on an axis no issues, and have this following either another axis or a virtual axis. On top of this you can overlay MAMs, MAGs, MAJs etc but not directly another MAPC.
What you can do is create a virtual axis specifically for a position CAM duplication, gear your axis to this virtual and run position cams on that virtual. The end result is that you can have two (or more if you want to create more virtual axis) position cams running independently to generate an overall motion on one axis.
Maybe this may get you somewhere if you want to generate some motion a bit more precisely, still keep things to the AB blocks and not have to write your own polynomial profile generation?
You can't actually change a cam during 'mid flight' with the AB instructions. What you can do is control your motion throughout by positions cams, and load pending cams that take over at the cam boundaries. With the above trick two, you can also overlay multiple cams onto one axis.
There is also an Add on instruction AOI that calculates complexed moves over a time period (Sine, 5th, 7th, 9th order). Although I haven't look at this at all (just the write up), this AOI may give you something? You will find this on the AB site \ support \ downloads \ sample code \ Motion Profile generator for 8 cam laws
Hope you can make something usefull out of all this.
Re: Using MCSV - MATC to control velocity
[ Edited ]- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
09-26-2009 11:59 AM - last edited on 09-26-2009 01:27 PM
Have a look at this AOI - its Rockwells and if I shouldn't have posted it, the moderators can remove it. Its effectivey a complexed move instruction based on time required to move a distance (it generates a complexed profile to take place over a time period like an MATC).
You didn't actually state what motion is currently running (MAPC, MAJ, MAG etc) to et your rotting mass moving and up to speed.
Judging by your last paragraph, it sounds like its currently already running an MAPC?
So the thing to try is to maybe use the AOI, calulate the AOI profile such that when it is run over your existing profile (which for cruising would be a linear cam 1:1), the result give the required drop in speed.
Whats shown below is what I think you desire, and shows a slave axis following a master at an equal velocity, dropping to 0.8 of the velocity for a period (distance of travel) and then accelerating again to match the master with unity? You can do this with a complexed profile generator, and segment compiler - anyone know where Vong can get a free one thats in the public domain?
Re: Using MCSV - MATC to control velocity
[ Edited ]- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
09-28-2009 12:25 PM - last edited on 09-28-2009 12:29 PM
That's some pretty good info, I'll mess with these AOIs. I'm going to have to figure out some type of position cam, I guess. Not a big deal. Right now it's just a geared roll with a clutch that steps down to ~ a 0.8 gear ratio that's triggered off of a PLS. I'm going to make it a servo and just trigger it off of a new electronic PLS. Some of this work has been done with a previous upgrade (PLS is now in the CLX).
So I was hoping to do it as a velocity loop, because that's all that really matters, but I think that some kind of hybrid position / speed loop would be best.
Right now I'm testing it with a virtual axis that follows machine speed, and a MAG to the virtual that has it's gear ratio passed though an SCRV instruction. I just change the input to the SCRV when the PLS triggers, and re-enable the MAG on a 2ms periodic task. It looks pretty nice and smooth, but it's still ghetto!
