Linear displacement

Hello, I have this linear displacement my problem is like this: I need to be able to control the servomotor so that the given linear displacement moves in the given positions ( as in the picture) could someone help me with this. I tried to write a script according to the instructions but it didn’t work.
Thank you for your help.
0344024000500_02292548_skuska.vcmx (5.8 MB)

Hello 98.
If you just want to control the servos via python script, you can just refer to the vcServoController content in the help file, which has methods like move, moveJoint, moveImmediate, etc. This is one of the most convenient methods, but this method is actually a little bit flawed, I mean, when you use a method like move, the programme waits for the move to finish before continuing the following movement, which is actually not common in normal production (ground track).
Similarly with MoveJoint in the Processes function, but it’s much smoother than controlling the servo directly with a Python script. Or you could add an actuator and let the robot edit the moves using the PROGRAM module, it still depends on your problem and you can choose a more appropriate method depending on the problem.
I believe all this knowledge should be covered in the Visual Components Academy, so if it’s convenient for you, you can find out for yourself. :melting_face:

Hi Bad thank you for your quick reply. I have studied those videos and my problem is that I have to use KUKA robot and my linear feed is for the motor not for the robot. That means my linear motion has to move when my robot gets to that position. I apologize if I misunderstood the video but it doesn’t work for me.
Thank you

I still have a bit of a problem with your question, my question is whether your final goal is to use a PLC-like controller to control the floor rails in conjunction with the robot’s motion or to just use the floor rails as an additional axis for the robot, so I’ll talk to you roughly about the options for both.
If you wish to use a PLC to control the floor track, then you need to connect the float variable in the PLC to the Dof of the joints via a connectivity module, after that it’s the PLC that controls the axis movement in conjunction with your robot, which requires your own logic.
If what you want is for this component to exist as an additional axis to be controlled by the KUKA robot, then you just need to set up the unidirectional interface for the joints of this floor rail, and then mount the robot on the floor rail with PnP to do the additional axis control in the PROGRAM module.
If I understand you correctly and one of the two options I mentioned is what you need, feel free to ask and I’ll explain it to you in more detail.

Given that I won’t be able to reply to messages for a while, if you’re using the add-on axes scenario, you could check Robot Positioners in eCatalog, which has settings for add-on axes (I’m not sure if it’s in KUKA Sim Pro). :melting_face:

Hi Bad thank you for your help. My main problem is that I am only working in Process Simulate in which it would be very easy to do ( I would do the kinematics and make single poses, for example POSE1 linear displacement would go to 50%, the second POSE2 linear displacement would go to 80% and then in the operation tree make a program and in the opl comands put pose1 ). Just since in kuka sim. I don’t know how to do at all so I don’t know who to ask for help.
Thank you very much