Hi Tom,
as it stands with my lathe, I have an estop_test
monitor function (it get's called continually by the
main init loop), which monitors for the various estop
conditions, if one occurs, it sets a message flag,
handles the estop, then displays the message.
However once the message gets displayed, any printf
statements from elsewhere in the main init loop stop,
until the message has been acknowledged.
Am I correct in assuming that because the printf
stream to the console has stopped, that the thread is
currently blocked? Or is it simply the communication
between the KFlop and the PC that's blocked?
I've got a printf that displays the Modbus
status/tool change positions every few seconds, and they
certainly stop for the duration a message is displayed,
and they don't seem to get buffered.
I've attached an older copy of the estop file (only
difference I'm aware of is it lacks break statements in
the message switch), along with the header file, but the
constant/enum names should be self explanatory.
For my mill, I'd like to make things a bit more
robust, and then work the required changes into the
lathe, so the machines use a similar code structure.
The mill will also have the added complexity of the
KFlop controlling the ATC directly, as the lathe uses a
PLC controlled via Modbus.
Moray