Hello everyone, I want to move the X axis of the robot at some point according to the data coming from the plc.
My codes are as follows. Can you help me how to do this? For example, which command should I use, or is there an example?
Thank you from now.
MODULE w1
VAR num x_axis_shift;
PROC Axis_shift()
! Get data from plc to Group input and transfer this data to “x_axis_shift”.
x_axis_shift:= GInput (eksno);
! First Step
MoveJ [[405.52,9.16,1237.59],[0.00409069,-0.558241,0.829556,-0.0136706],[0,-1,-1,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]], v1000, z50, tool0;
! Second Step
MoveJ [[1192.06,8.86,1237.58],[0.00408985,-0.55824,0.829557,-0.0136663],[0,-1,-1,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]], v1000, z50, tool0;
! Step 3
! Move j or moveAbsJ, whichever is appropriate, will be used in the following steps.
! Shift the x axis according to the data in “x_axis_shift”, for example if the value is “10”,
! 10mm. to the right I want it to scroll.
! *****************************************************************************************************************************************************
!Move J
MoveJ [[1384.03,-113.00,565.26],[0.00703595,0.547633,-0.836655,-0.00751999],[-1,0,-1,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]], v100, fine, tool0;
!Move Absj
MoveAbsJ [[-4.67897,41.0717,3.25588,0.250736,46.8381,-71.2686],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]]\NoEOffs, v100, fine, tool0;
! *****************************************************************************************************************************************************
! Step 4
MoveJ [[1384.03,-113.09,554.50],[0.00704569,0.547649,-0.836645,-0.00752378],[-1,0,-1,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]], v1000, z50, tool0;
ENDPROC
ENDMODULE