Hi, I have a simulation I’m using to demonstrate how IndRMove works to a company that bought some equipment I integrated and they’re trying to program.
I’m having trouble simulating it, and unfortunately, I don’t have the real robot to determine if it is an issue with RS or this is how it actually will work if they used this example code. I have done this in numerous other systems and haven’t ever seen an issue before.
Code is below (removed TPWrite statements for clarity):
ActUnit M7DM1;
IndCMove M7DM1,1,200;
WaitUntil IndSpeed(M7DM1,1 \InSpeed) = TRUE;
WaitTime 5;
IndCMove M7DM1,1,0;
WaitUntil IndSpeed(M7DM1,1 \ZeroSpeed) = TRUE;
IndRMove M7DM1,1 \ToRelnum:=0 \short , 50;
WaitUntil IndSpeed(M7DM1,1\ZeroSpeed) = TRUE;
waittime .5;
IndReset M7DM1,1 \RefPos:=pTableZero \Short;
So depending on how fast I rotate, the axis will end up at different positions at the end of the 5 seconds obviously. But based on that rotational speed and where it ends up, the table will do different things when the IndRMove is executed. Sometimes, it goes right to the correct spot of a relative 0, and sometimes it moves to an incorrect spot of a relative 180. I have attached videos showing this. I would expect that anytime I execute to a relnum of 0, the axis position ends up at a multiple of 360.
Also, I have tried the \fwd and \bwd switches, and it never crosses the 180 mark. If I use fwd and the orange box on the table ends up in the blue zone, it rotates forward (CCW) but stops at the red line at 180 degrees. If it ends in the brown zone in the picture it goes to the right spot. Vice versa for \bwd.
I know I can easily figure out if it is at the right spot by checking the remainder of the current position / 360 and make a decision about how to IndReset based on that, but am I missing something?
I tried attaching videos of it in action using the same code but 2 different speeds, but it isn’t letting me attach them here. The link to them are here: https://photos.app.goo.gl/LXinPs2qCDSm43zG9
Thanks for the help!
-Brian
