iannicholson Posted September 28, 2020 Posted September 28, 2020 We use Turbo Clipper, and it runs fine. Recently we had a need to assign positions on-the-fly to only two (out of four) axes in a coordinate system. So I wrote the following line in my PLC code: CMD"&1X=29.5Y=29.5" I thought this was working fine for several months (it does have the desired effect). Seemingly unrelated until now, we've had several random customers complain that sometimes they were seeing the A and Z axes (not really a cartesian coordinate system in our case) get offset to strange positions. We've been unable to see this happen until last week, when I was told the feature which used the above CMD seemed to cause major problems with motor positioning. The eventual solution for this customer was to re-home both the A and Z axes to correct their positioning, anytime the mentioned feature was used; due to the uncertainty they have essentially abandoned the feature (it is used during a manual-run mode for our machine which isn't usually necessary). What I found, is that the above CMD seems to also reset the positions of axes A and Z to whatever they last homed to (regardless of their current positions), even though they are not directly called out. I found that even if I simply type for instance "X=29.5" in PEWIN32Pro, the A axis position changes to "90.0" (degrees), and the Z axis changes to "0.0" (inches). These axes should not be changing when I tell the X axis to change! I have circumvented the problem by writing a short motion program which issues the following command in place of the PLC CMD: PSET X(29.5) Y(29.5) This does *not* trigger changes on the un-referenced A and Z axes. We have used this code pattern before, but as it seems a little hacky, I was going for something a little in-line. Is this a known issue with the online axis assign {axis}={constant} CMD? Is there something that could be set wrong that would negatively affect the online command but still allow the PSET command to be limited to the axes specified in the instruction?
steve.milici Posted October 1, 2020 Posted October 1, 2020 It should work. Make sure no motion is in progress when the PLC executes this statement. Also, follow it with a “single loop” WHILE statement to ensure it execute ASAP: CMD"&1X=29.5Y=29.5" P99=1 WHILE (P99=1) P99=0 ENDWHILE The motion program usage is recommended.
Recommended Posts