Hello Guest it is December 26, 2024, 11:59:18 AM

Author Topic: converting from PDMX 411 to ESS and using g540  (Read 5572 times)

0 Members and 1 Guest are viewing this topic.

Re: converting from PDMX 411 to ESS and using g540
« Reply #10 on: November 14, 2017, 06:33:04 PM »
Hi,
normally we expect an Estop to disable Mach including shutting down any motion but it doesn't have to or lets say
that its not hardwired so to do. You can for instance have it stop the motors but not shut the rest of the machine down.

I think dude1 is on to it, it may well be that your Estop is in fact removing the Enable signal to your drivers but not
stopping Mach. Best idea is to answer dude1's question and that will probably lead to  a solution.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'

Offline dude1

*
  •  1,253 1,253
Re: converting from PDMX 411 to ESS and using g540
« Reply #11 on: November 14, 2017, 06:56:27 PM »
I will have to have a look tomorrow how I set the estop and enable signal on my big machine, it was over a year ago that I did it, the geckos stepper drivers all are pretty much the same they need that enable signal to work to start with, on the G540 it's the estop and the enable
Re: converting from PDMX 411 to ESS and using g540
« Reply #12 on: November 14, 2017, 10:56:42 PM »
Hi,
on a large industrial machine having an Estop completely and imediately stop Mach is probably not safe at all.

You might need time for the spindle to de-accelerate, then the Z axis brake come on before the Zaxis motor is depowered
or risk having the 1000kg spindle head slump down on to the table and risk crushing the operator who is already in some
sort of trouble hence the Estop.

I suspect to have your Estop button disable Mach4 as you are acustomed to in Mach3 you will have to place a couple of lines
of Lua code in your signal script.

Mach4 signals are handled quite differently than they were in Mach3. In Mach4 any time a signal changes the signal script runs.
There are many hundreds of signals, including input/output signals, Estop for example but many many more inside Mach itself.
When the signal script runs all that is known that a signal has changed. The script runs through a list of signals you are interested in to
see if any one of them has changed and if so what it changed to.

To enact the behaviour you want you will need to put some code in the signal script that achieves the following logic:
1) Has the Estop signal changed?
2) If it has, is it now active?
3) if its active execute an API call to disable Mach4

I know it seems a bit weird that you have to program Mach4 to disable when an Estop occurrs but it is a consequence of the need
for OEM machine builders to have the felxibility to have some specific behaviour that their machine needs to be safe. Whatever
may be said about Mach4 is that it great strength is the flexibility with which it can be programmed and its greastest weakness
is that its so flexible that it can make it tricky to do ordinary stuff.

A signal like Estop is a perfect example...you might think that if you activate that signal a certain function would happen
automatically...it doesn't. You have to decide and program the function you wish to have happen. Don't be too alarmed,
once you get used to thinking that way, namely a signal object is distinct  from its function or action it gets a lot easier.

I will help and I'm sure others will chime in to help as well with the actual code.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: converting from PDMX 411 to ESS and using g540
« Reply #13 on: November 15, 2017, 12:07:31 PM »
Hi Charlie,
if you slip this into the SigLib table in he screen load script:

Code: [Select]
[mc.ISIG_EMERGENCY]=function (state)
    if (state==1) then
        local inst=mc.mcGetInstance()
        mc.mcCntlEStop(inst)
    end
end,

You're done.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'

Offline dude1

*
  •  1,253 1,253
Re: converting from PDMX 411 to ESS and using g540
« Reply #14 on: November 15, 2017, 02:49:51 PM »
Nice 1
Re: converting from PDMX 411 to ESS and using g540
« Reply #15 on: November 17, 2017, 09:00:56 AM »
Right now,  I have the estop connected between pin 10 and 12 on the g540.   There is really no connection directly to the ESS for the EStop, so I guess it's no surprise that ESS doesn't know it's been activated.  Unless I am mistaken though, that's the way it was wired when I used the PDMX 411, and Mach4 seemed to be aware of the EStop status.

Re: converting from PDMX 411 to ESS and using g540
« Reply #16 on: November 17, 2017, 12:15:38 PM »
Hi,
if the G540 is plugged into port 1 of the ESS then pin 10 of he G540is connected to pin 10 of the ESS, pin12 of the G540 is connected to pin2 of the ESS.
When I say 'connected' I actually mean buffered. So an input on pins 10 or 12 will be amplified and hooked to the ESS pins.

Mach4 recognizes the signal but YOU have to tell it what to do with it....ergo those few lines of code.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'

Offline dude1

*
  •  1,253 1,253
Re: converting from PDMX 411 to ESS and using g540
« Reply #17 on: November 17, 2017, 03:54:13 PM »
terminal 10 is the Estop/disable pin, terminal 12 common on the G540, terminal 10 translates to pin 15 on the DB25 and you can loop the Estop with the enable line in Mach as long as it is the same state it works.
                                              
 If the motors are disabled in M4 it wont move the motors, that's what the disable is for E stop is the G540 going into a fault state you also need mach to go into the same state at the sametime with the motors being disabled then the power going out.

You need the motors stopping first then power other wise you might blow the G540 fuse what's rear as hens teeth to start with.
Re: converting from PDMX 411 to ESS and using g540
« Reply #18 on: November 17, 2017, 05:53:17 PM »
Hi Charlie,
dude1 is 100% correct. My laptop had a meltdown and I lost everything, including a copy of thr G540 manual. I assumed....and we know 'assumption
is the mother-of-all-f....ups'.

With the Estop button hoked to your regular teriminal 10, it corresponds to pin 15 in the DB25 connector and will be seen by the ESS as port1 pin15.
Set Machs Estop signal usiing the ESS set-up dialogue, that is Configure/Plugins/ESS/Input Signals Estop <enable> <ESS> <port1 pin15>.
Load the Lua code previously posted and you done.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'