Hello Guest it is April 20, 2024, 12:30:45 PM

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - rileyknox

Pages: 1 2 3
1
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.

2
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.   

3
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. 
   

4

The simple explanation is that ANYTIME a signal, ANY SIGNAL, in Mach changes state the Signal Script runs. The Signal Script in turn looks
in the SigLib table to see if there is an entry there which matches the changed signal. That is the SigLib table contains only the signals we are interested
in. Thus in this case lets say one of your servos fault in operation....the HLFB will de-assert.....the Input#n to which it is attached will change state....the Signal
Script will run....the SigLib table has an entry [ISIG_INPUTn] and will therefore execute the function attached to the table entry, which will stop Mach and
post a fault report on the status line or in the log if you wish it.

Craig

But shouldn't Mach4 still be responding to the input in the machine diagnostics window after the machine is enabled?  Even if they are unassigned general inputs won't the machine diagnostics LEDs change if the input changes?  Or will those inputs, and their corresponding machine diag LEDs, only change after enabling the machine if there is a Sig Lib entry?

5
Hi,

Quote
Was trying to get it setup so that the lights would only come on in Mach4 when the input losses the 5v. 
That is possible but why bother? In very short order you are going to reprogram HLFB to 'In Range', its the real use of the HLFB
and if it goes active it will stop the machine. Who cares about the LEDs. Additionally if you follow the same advice I gave Tom about handling
HLFB which servo has faulted will be reported to Mach in the status line.

As one last argument, having the LEDs for the first half a dozen inputs, Input#0 though Input#5, is really handy. But once you have worked out how
to handle HLFB properly you'll no longer need the LEDs and so you will redo the assignments to Input#20 through Input#25 say which leaves the
LEDs un-attached so you can use them for the new thing you are working on today.

Craig

Well this is just a prototype, and I really only care that it works long enough to demonstrate the proof of concept.  Just need to know the motors are working so the machine doesn't rip it self apart if one drops out.  Also, that wouldn't fix the problem of Mach4 not responding to changes in those inputs after the machine is enabled, right?  Because that's really the big problem I'm having. 

The only reason I started with Input 2 was when I looked in the Sig Lib there was already entries for Inputs 0 and 1.  Just figured it would be easier not to mess with those. 

6
I have HLFB+ connected to 5v and HLFB- connected to the inputs.  The LEDs I was talking about are the ones on the C25 showing that they are seeing 5v once the motors are enabled.  Which I am sure that they are, green lights on the motors are blinking and more importantly they move.  And as far as the HLFB state goes I'm just using the Servo On, since that is really all I care about right now.   That's why I put those inputs as active low in the ESS plugin so they would be showing "all good" as long as the 5v was there.   Was trying to get it setup so that the lights would only come on in Mach4 when the input losses the 5v. 

7
So right now I have Port1 pins 10, 11, 12, 13 getting 5v when the motors are enabled.  I also have them set to active low.  When I enable the machine all the LEDs on the board come on.  Whats really odd is port2 pin11 is always on in mach4, as in the LED in machine diagnostics is always on both before and after enabling the machine.  The others turn on, in mach4, when the machine is enabled but then won't always turn off even when the wires are disconnected from the board and the board LEDs are off.   

8
Ok, I can switch port2 pin 2 to High. 

When you say "at start up" do you mean when the machine is enabled or when Mach4 is opened and starts running?  Because it registers the change in the inputs before the machine is enabled but it misses things that change right when the machine is enabled, like the error signal now coming from the motors.  Also it seems to only sometimes recognize the change in the inputs once enabled.   

9
Hi,
what pin on the BoB are you using?. Remember these are pulled low and need to be supplied current
to make them go high. Remember also that some pins had one inverter whereas other pins had two.

The setting active high-active low in the ESS plugin doesn't change the pin or signal, just reverses the logic
that Mach applies to the signal.

Craig

They are wired to port 1 pins 10, 11, 12, 13 and port 2 pin 2.  They are all being supplied 5v from the board to make them go high and all the corresponding input LEDs on the board are lit when enabled.  The servos close the circuit when working properly which is why I tried having it active low so the LED in Mach4 should turn off when the ESS no longer sees the 5v.   

10
Also just tried switching to active low in the ESS plugin.  That got the light to turn on when the machine is enabled but it wont always turn off then the error signal goes low.  Meaning if I disconnect the wire. sometimes the LED will go out, other times it won't. 

Pages: 1 2 3