Hi,
have you read the section on signals yet?
The Machine Diagnostics screen is to help you, a visual representation of what's going on inside. If you deleted the entire Machine Diagnostics tab Mach would carry
on working. You are getting hung up on the visual display of your settings rather than what Mach does with them.
Have you put any code in the SigLib table yet? If so what code? It might be worth putting a wxMessageBox type statement in your code to confirm that
Mach is triggering and acting on your signals. Forget the Machine Diganostics for the moment, they are causing you more confusion than they are worth.
Concentrate on getting the snippets of code in the SigLib table sorted out.
Craig
So I read through everything and looked at your other posts to check the code. Add I have things working, but only about 33% of the time. Meaning Mach4 will only respond to the HLFB signal about 1 or 3 times.
So right now I have the pin for X set to active Low and the pin for Y set to active High, doing this just to test and see if there is a difference in readability of response which there isn't. When they work both will E-Stop when the 5v from the HLFB drops out. Problem is sometimes that happens on the first try and others it may take 3 times. Meaning, after the machine is enabled, I will actually disconnect the wire, the board LED goes out but nothing happens, then I will reconnect, board LED comes back on and still nothing (which is good), then I will disconnect the wire again, and then Mach4 will respond and E-Stop. Sometimes it works on the first disconnect, other times I have to reconnect and disconnect 2 or 3 times for Mach4 to respond.
Here is the code I am using for X and Y right now. It is in the SigLib and saves and runs fine.
[mc.ISIG_INPUT2] = function(state)
if (state==1) then
mc.mcCntlEStop(inst)
mc.mcCntlSetLastError(inst,'X axis HLFB asserted')
else
mc.mcCntlSetLastError(inst,'X axis HLFB de-asserted')
end
end,
[mc.ISIG_INPUT3] = function(state)
if (state==0) then
mc.mcCntlEStop(inst)
mc.mcCntlSetLastError(inst,'Y axis HLFB asserted')
else
mc.mcCntlSetLastError(inst,'Y axis HLFB de-asserted')
end
end,
If it just worked or didn't that would be one thing, but the fact that it works sometimes and not others seems really odd to me.