Hello Guest it is April 13, 2021, 09:33:39 PM

Author Topic: ESS Inputs and Outputs not doing anything  (Read 5235 times)

0 Members and 1 Guest are viewing this topic.

Re: ESS Inputs and Outputs not doing anything
« Reply #60 on: July 15, 2018, 08:07:03 PM »
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. 
   
Re: ESS Inputs and Outputs not doing anything
« Reply #61 on: July 15, 2018, 09:06:45 PM »
Hi,

Quote
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.
Yes, I agree. Not sure whats going on, I have never encountered a fault of that description and if there were
a problem as basic as this we would all have heard it!!

The only thing I can suggest that might explain it is that the input signal is flickering or bouncing at the time of signal
transition. May I suggest applying some filtering on the input pins in the ESS/PIN Config page, I would try a value of 500.

Craig
My wife left with my best friend...
     and I miss him!
Re: ESS Inputs and Outputs not doing anything
« Reply #62 on: July 15, 2018, 10:38:54 PM »
Hi,

Quote
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.
Yes, I agree. Not sure whats going on, I have never encountered a fault of that description and if there were
a problem as basic as this we would all have heard it!!

The only thing I can suggest that might explain it is that the input signal is flickering or bouncing at the time of signal
transition. May I suggest applying some filtering on the input pins in the ESS/PIN Config page, I would try a value of 500.

Craig

No joy on that one.  Tried 500, 1000, and 200 just for good measure.  None had too much of an effect.  It maybe got a bit more likely to happen on the first try but then would also have ones where I had to disconnect and reconnect 3 or 4 times to get a reaction from Mach4.   
Re: ESS Inputs and Outputs not doing anything
« Reply #63 on: July 16, 2018, 12:29:36 AM »
Hi,
I suppose its not impossible that Mach is going cranky but if that were so many hundreds of users would
be reporting such a fault.

Can you probe (carefully!!!) one of the signals but between the C25 and the ESS. Maybe get a really fine
needle or pin and push it through the insulation of the ribbon cable wire corresponding to the input you choose to monitor.

My reason for suggesting this is to establish whether the breakout board is faithfully transmitting TO the ESS.

I guess the next place to look is the ESS diagnostics page. Take a look at the page and see if the ESS is faithfully
reporting its state transmitted to it from the BoB.

Craig
My wife left with my best friend...
     and I miss him!
Re: ESS Inputs and Outputs not doing anything
« Reply #64 on: July 16, 2018, 06:14:36 AM »
Hi,
I suppose its not impossible that Mach is going cranky but if that were so many hundreds of users would
be reporting such a fault.

Can you probe (carefully!!!) one of the signals but between the C25 and the ESS. Maybe get a really fine
needle or pin and push it through the insulation of the ribbon cable wire corresponding to the input you choose to monitor.

My reason for suggesting this is to establish whether the breakout board is faithfully transmitting TO the ESS.

I guess the next place to look is the ESS diagnostics page. Take a look at the page and see if the ESS is faithfully
reporting its state transmitted to it from the BoB.

Craig

I have the C25 just plugged straight into the ESS ports.  Didn't use any ribbon cables.  Guess I could make some cables corresponding to just the inputs I'm using to start checking things there.
Re: ESS Inputs and Outputs not doing anything
« Reply #65 on: July 16, 2018, 09:06:13 AM »
Hi,
OK you could probe the board direct but its easy to slip and create a fault. Fitting two short ribbon cables and then piercing the insulation
is safest. In absence of that have a look at the ESS diagnostic.

Craig
My wife left with my best friend...
     and I miss him!