Hi everyone!
I'm starting out with motion and was given someone else's program to try and add features. Basically, there is a spool that turns and gets material fed on. It spins in only one direction and is sitting on a axis that goes from left to right, right to left, until the system is stopped. This distributes the product evenly on the spool. They want me to add a way to immediately change the direction (going left or right) from a press of a button, without stopping the spool from rotating. In the MAPC for the camming, the axis for the L-R move is set as a slave and the spool encoder as master. The encoder is reset to 0 at every cycle (L-R-L)
My issue is, I can't find a way to stop my slave axis and change the direction.
This is the sequence i've been trying to do:
1- find out if im going from L to R / R to L
2- MAS on my slave axis
3- when my axis stops(MAS.PC), check my encoder position for the master and calculate what it should be if it was at the other point of the path (If L to R, encoder will be set higher, if R to L, lower).
4- MRP to the encoder to the position found above
5- MAPC with the same settings the original MAPC, with the difference being the cam lock position set to the position found above so that it doesnt have to pass by the positions before
My MAPC gets an error 5 (Servo Off State Error) and it just start moving again towards the right, regardless of the direction it originally had and just rams into the side of the spool.
Am I in the right direction with what im doing?
Thanks for the help!
I'm starting out with motion and was given someone else's program to try and add features. Basically, there is a spool that turns and gets material fed on. It spins in only one direction and is sitting on a axis that goes from left to right, right to left, until the system is stopped. This distributes the product evenly on the spool. They want me to add a way to immediately change the direction (going left or right) from a press of a button, without stopping the spool from rotating. In the MAPC for the camming, the axis for the L-R move is set as a slave and the spool encoder as master. The encoder is reset to 0 at every cycle (L-R-L)
My issue is, I can't find a way to stop my slave axis and change the direction.
This is the sequence i've been trying to do:
1- find out if im going from L to R / R to L
2- MAS on my slave axis
3- when my axis stops(MAS.PC), check my encoder position for the master and calculate what it should be if it was at the other point of the path (If L to R, encoder will be set higher, if R to L, lower).
4- MRP to the encoder to the position found above
5- MAPC with the same settings the original MAPC, with the difference being the cam lock position set to the position found above so that it doesnt have to pass by the positions before
My MAPC gets an error 5 (Servo Off State Error) and it just start moving again towards the right, regardless of the direction it originally had and just rams into the side of the spool.
Am I in the right direction with what im doing?
Thanks for the help!