RSLogix 5000 Calculate Cam Profile

MATT116

Member
Join Date
Dec 2009
Location
Dallas, TX
Posts
330
Studio 5000 Pro V24
Kinetix 350 drive
TLY motors
X axis 8" overall travel +4" and -4"
Y axis 8" overall travel +4" and -4"

I need to build a cam profile that then can be used by the MAPC instruction to "draw" an oval.
I know the finished required oval diameters.
The center of the oval will always be 0,0.
I guess where I'm stuck at is the equation required to take the know diameters and build the cam profile?
 
I had already looked at that but couldn't figure out how to apply it. The MCCP instruction needs to know: when X is "here" Y should be "here" since X is my master axis.
On the attached pic I would need to know how to compute the location of Y (red circle) based on X. So X is at -3 Y should then be at 2.90. Or when X is at 0 Y should be at 3. The number of times/points will determine the smoothness of the arc.

Capture.PNG
 
Maybe I'm wrong but you need to use MCCM instruction not MAPC.
Taken from Rs5k help:
Use the MCCM instruction to initiate a two or three-dimensional circular coordinated move for the specified axes within a Cartesian coordinate system. New position is defined as either an absolute or incremental position and done at the desired speed. The actual speed of the MCCM is a function of the mode of the move (commanded speed or percent of maximum speed). The speed of the move is based on the time it takes to complete the circular move using the programmed axes. Each axis is commanded to move at a speed that allows for all axes to reach the endpoint (target position) at the same time.
The dimension of the circle is defined by the number of axes contained within the coordinate system. For example, if you have a coordinate system that contained three axes with an MCCM instruction that has motion in only two dimensions, the resultant move is still considered a three-dimensional arc or circle
 
Widelto is right -
Use the MCCM first, to calculate the cam table then use the MAPC to execute it.
The compete sequence would be:
Calculate your Y positions from a table of X positions using the size of the ellipses, use this data to populate your cam table. I think the CPT below should help.
Then execute the MCCM
Then execute the MCP

I am certain that someone with more math experience could reduce / simplfy my formula, but I think it will work.

EllipseCalc.jpg
 
Thanks guys.
I'm going to try and implement your ideas. May take me a day or two to get back but I will post my results.
 
Keep in mind that your two "r"s need to be different or you will get a circle.

Also, unless you think there is a possibility that the X axis may not be able to follow its command profile I would set this up as two separate cams with a separate master axis generating the master position. In the end I think it will make determination of the master position profile more straightforward.
 
Last edited:
Keep in mind that your two "r"s need to be different or you will get a circle.

Also, unless you think there is a possibility that the X axis may not be able to follow its command profile I would set this up as two separate cams with a separate master axis generating the master position. In the end I think it will make determination of the master position profile more straightforward.

Right the two "r"s are different.
The machine extrudes a branch on a run of pipe (Google T-Drill).
The required ellipse size changes based on the run pipe and branch pipe size.
The required ellipse is stored in a recipe, A=x.xx" B=x.xx"

I don't think X will have a problem following the profile
 
Still haven't got a fully working solution but I figured I would post up what I have so far.
Formula wise I ended up with:
Theta will be my "steps" which will control the smoothness of the ellipse.
X=r*cos(theta*3.14/180)
Y=r*sin(theta*3.14/180)
I was going to run the equation in structured text using the Repeat Until. I would increment theta until I reach 180, then End Repeat. What I'm not sure about is how do I increment the "destination" of the equation.
Example
Theta is at 0; store result at array[0]
Theta is at 1; store result at array[1]
Theta is at 2; store result at array[2] and so on.
My first though is to indirectly address my storage array with a counter.acc that is incremented at the same rate as theta?o_O
Am I on the right path?

Thanks all who have helped
 
How about this method

I am assuming that the X and Y axis of the ellipse match the physical X and Y axis of your machine.

Use polar coordinates to calculate your CAM table
let a = radius of ellipse on X axis
let b = radius of ellipse on Y axis

http://www.mathopenref.com/coordparamellipse.html


Create a Virtual Axis - This axis is your (t) Deg axis, set its units to 360 Deg and a rotary axis

Create a UNIT CAM table based on the x = COS(Deg) Where the MASTER units are Deg and the slave units are 1 (watch later how the radius is brought in)


eg MyCosCAM[361] is of datatype CAM
MyCosCAM[0].Master = 0
MyCosCAM[0].Slave = 1
MyCosCAM[0].SegmentType = 1 ' cubic
MyCosCAM[1].Master = 1 ' Deg
MyCosCAM[1].Slave = 0.999847695 ' = COS(1 deg)
MyCosCAM[1].SegmentType = 1 ' cubic
etc to 360 deg (remember 0 base and now you are back at your start position so you have 361 entries)

Execute the MCCP command to create the CAM table
MCCP (MyCosCAM, 360,0,0,MyCosCAMProfile) ' it may be 361 I cannot remember the details
Note: here I used the COS so the slope (speed) of the cam table at the start and the end are 0


Move Both Axes to your start position (Coordinate X = a,Y=0)
Stop both axis
Engage X axis using a MAPC where the Slave Scaling = a (your ellipse X axis Radius)
Engage Y axis using a MAPC where the Slave Scaling = b (your ellipse Y axis Radius) AND the CAM Master lock Position = 270 Deg (the start of a SIN curve)

Now do a MAM on the virtual axis forward 360 Deg - Ellipse is created for you
 
Last edited:
First thanks for the method but I'm still having trouble getting it to work.
How about this method

I am assuming that the X and Y axis of the ellipse match the physical X and Y axis of your machine.
That is correct

Use polar coordinates to calculate your CAM table
let a = radius of ellipse on X axis
let b = radius of ellipse on Y axis

http://www.mathopenref.com/coordparamellipse.html
Are you saying just the find the radius of my ellipse?

Create a Virtual Axis - This axis is your (t) Deg axis, set its units to 360 Deg and a rotary axis
Set the “Position Units:” to Deg ? I don’t see where I would enter the number 360.
Create a UNIT CAM table based on the x = COS(Deg) Where the MASTER units are Deg and the slave units are 1 (watch later how the radius is brought in)


eg MyCosCAM[361] is of datatype CAM
MyCosCAM[0].Master = 0
MyCosCAM[0].Slave = 1
MyCosCAM[0].SegmentType = 1 ' cubic
MyCosCAM[1].Master = 1 ' Deg
MyCosCAM[1].Slave = 0.999847695 ' = COS(1 deg)
MyCosCAM[1].SegmentType = 1 ' cubic
etc to 360 deg (remember 0 base and now you are back at your start position so you have 361 entries)

Execute the MCCP command to create the CAM table
MCCP (MyCosCAM, 360,0,0,MyCosCAMProfile) ' it may be 361 I cannot remember the details
Note: here I used the COS so the slope (speed) of the cam table at the start and the end are 0


Move Both Axes to your start position (Coordinate X = a,Y=0)
Stop both axis
Engage X axis using a MAPC where the Slave Scaling = a (your ellipse X axis Radius)
Engage Y axis using a MAPC where the Slave Scaling = b (your ellipse Y axis Radius) AND the CAM Master lock Position = 270 Deg (the start of a SIN curve)
I see the options; “Master Lock Position” or “CAM Lock Position” but not “CAM Master Lock Position”
Now do a MAM on the virtual axis forward 360 Deg - Ellipse is created for you
My virtual axis .ActualPosition just seems to move from 0 to 1 back 0 over and over. My X and Y .ActualPositions just move in a linear fashion (see screen shot of graph)



Graph.jpg Cam Profile.PNG MAM.PNG MAPC.jpg
 

Similar Topics

Hello, I'm trying to understand a servo motion system. I want to know the motor speed in RPM at a given speed setpoint entered in a MAJ...
Replies
4
Views
2,201
Have to perform an operation based on the equation: y = x^0.993 Is it possible for the PLC to compute this ? CPT instruction doesnt seem to cut...
Replies
4
Views
13,315
Hello all, I have a question in regards to RSlogix 5000. I am having issues with the program force closing when I try to make online edits. We...
Replies
0
Views
95
Greetings ... someone sent me a request for some student handsouts that I developed ... turns out that I had this hosted on my business website...
Replies
0
Views
111
Thank you for any and all responses/help. I have an RSLogix 5000 v20 and a Cognex In-Sight v5.9 spreadsheet (8502P). I can not figure out how to...
Replies
0
Views
101
Back
Top Bottom