tl;dr: i was able to make an acceptable solution using an arduino and a relay shield.
...I'm not sure this is the best solution, it does work in that you can latch the vise to that state it was in when the estop event occurred. Here i tried to make a holder for the a
holder for the arduino to stick on din 25 rail.
I made a video to show the clamp does not move from either state when the estop is pressed. In the test setup m8201 is closing the first vise and m8301 opens it. I hit estop in both states to show it does not affect the position.The final program was a bit more complicated than i originally thought bc my original idea had some gotchas and was not adequate for every situation.
In the end i used the mach3 outputs (4 of them, 1 for each vise) to send pulse signals to the arduino inputs, a momentarily high pulse toggles the state of the corresponding output relay. I used 4 outputs on the arduino to signal the relays state back to inputs of the mach3 control card. The signal on these connections is the state of the corresponding relay (ie latched or not).
The open sesame macros check the corresponding mach3 control card input to see if the vise is open or closed. If it is in closed state then a toggle pulse is sent to the corresponding arduino input, if it is already open no pulse is sent. The closed works in a similar manner. This allows me to control 4 vises with 4 output only, not 8 as would have been needed with actual latching relays. But at the cost of 4 inputs on the mach3 control card if you want mach3 to know the sate of the vise. The card has 16 inputs and i use only 5 before this, so not too bad in the end.
Again its a bit of a complicated solution but it seems to work
I also noticed in the modbus section there are many serial modbus firmwares for the arduino, so that might be another way to try to set it up as well which might not require any connections between the arduino and mach3 control card at all.
Anyway, thanks to Russ and others for their input.
s