I share your frustration with the problem. It sounds as if the UC300 is not giving the same behavior as the mach 3 parallel port driver.Treb63 wrote: I'm guess you haven't seen anything like this beforeI'm guessing the fault likes with the UC300? I can see some more emails to the manufacturer in the near future.
Regards
Rob
Problems like this are why I had to limit official MSM support to a few well known and well supported motion devices. We could not afford to act as the test & debug center for other companies products.
I do have an idea - if the device is skipping the first line or couple of lines after an M6, try to see if it is skipping a fixed number of gcode lines. If it is a single of fixed number of lines, say for for example 3 lines, then maybe you could put 3 "no-op" lines after the M6. a goog no-op code would be a short dwell (G4).
And writing that makes me think of another idea... Mach has a problem syncing some sequential operations. Internally it gets confused and forgets to finish one operation before it starts the next. This sounds like it could be what it happening to you... maybe the gcode interpreter is not waiting for the M6 to finish and is going on before the M6 is done. That could show up as some number of lines after the M6 not being executed (it tries, but the internal queues are out of sync).
Consider this little utility I use inside of MSM:
Code: Select all
Sub MachRefWait()
' ok the following is a mach hack....
' (relevant to mach 3.x.x)
'
' it turns out that Mach reference operations do not wait for the action to be complete before returning to the calling script.
' Yet, the calls are commonly used as if they are blocking calls (even though they turn out not to be) - 1024.set also uses them as if they are blocking
' Add to this the fact that there is no built in API to wait in a script for a reference operation to be complete...
' and we have a timing hole that the script can fall into.
'
' But we can trick mach by inserting a short dwell into the Gcode queue,
' the dwell will show up internally to mach as a gcode movement that IsMoving() API ***will*** wait on,
' AND (this is key) mach will ***not*** start executing the dwell command until the reference op is done....
' thus we can force a wait until the ref (and dwell) operation is completed.
'
' The dwell time amount is not important. I used P0.1, the time unit (sec or ms) depends on the mach config setting.
' Either way the added delay will not be noticed as part of the overall homing sequence time.
Code("G4 P0.1")
While IsMoving()
sleep 10
Wend
Exit Sub
End Sub
Code: Select all
Code("G4 P0.1")
While IsMoving()
sleep 10
Wend
Dave