Greetings, Many UIs (Halui, Emcrsh, Touchy, Axis, Mini) make use of activeSettings[2] to return the S word (spindle speed g code command). For example, Axis and Touchy use this to display the current S word in the active G codes string (although in Axis the active g codes field isn't quite big enough to display it, as it's the last item on the string).
Switching modes (say from MODE_MANUAL to MODE_MDI) nullifies the S word as returned by activeSettings[2] if the spindle is not running during the mode switch. This is only a display problem - the motion controller retains the command. You can reproduce this easily in any sim configuration (e.g. Mini) that displays the active G codes string - enter an S500 in the MDI line, switch to manual, then back to MDI and issue any other MDI command to refresh the active G codes string. The new string will show S0 - this is incorrect for the S word which should be modal. Furthermore, if you issue an M3, the spindle would start at 500 RPM, even though the active g codes string displays S0. I've created a patch to fix this (attached) only to be stymied by another problem: activeSettings[2] does not necessary reflect the current S command, but instead is the last S word commanded before a "queue buster". For example, when running the following code: M3 S350 Some code S500 Some code T2 M6 G43 S500 will be displayed in the active G codes string as soon as the Run button is pressed, but the UI should display S350 until the machine encounters the S500 line. The interp.active_settings method (which stuffs status.activeSettings[]) is called by emctask.cc, and I'm assuming that this happens in interpreter queue time, not in machine time. Therefore, because the interpreter races as fast as possible to the next queue buster, the S350 is overwritten by the S500 before the user has had a chance to see the S350 in the active G codes string. I know Michael H has been heavily involved in the interpreter recently, and I'd love some input from him and/or any other interested parties before I make any further changes. Thanks! Daniel Rogge
0001-fix s-word deletion on mode switch.patch
Description: 0001-fix s-word deletion on mode switch.patch
------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________ Emc-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-developers
