Hello Guest it is April 19, 2019, 06:55:16 AM

Author Topic: Enable output at startup and disable output at EStop  (Read 1391 times)

0 Members and 1 Guest are viewing this topic.

Re: Enable output at startup and disable output at EStop
« Reply #10 on: January 03, 2018, 10:41:22 AM »
Motor control
Use a relay or relays to swap rotation direction. It would be wired so that when the relay/s are off it rotates in the default direction (no output required). To change direction you fire a single output (which if I'm not mistaken will deactivate in an estop).

This would not work because Mach4 in combination with PoKeys does not deactivate the output in case of an estop. If you know how to change that, please let me know :).
By the way all other drives are deactivated via Safe Torque Off that is controlled by a PNOZ safety relay. The DC Motor driver does not offer such a funcionality and I think it is unnessecary because it has very little power. It can easily be stopped by hand. Also one second after the estop a contactor cuts the power supply to all drives and also the toolchanger. The contactor is monitored by the safety relais.
However, when the estop is cleared and the power is reconnected, the toolchanger starts turning again, because the output of mach is still enabled.
I will try your suggestions and let you know. Thank you very much for the help so far.

Martin
« Last Edit: January 03, 2018, 10:47:45 AM by Penguin »
Re: Enable output at startup and disable output at EStop
« Reply #11 on: January 03, 2018, 11:08:20 AM »
If you want to de activate an output with the e stop, you can put the estop in the signal library.  That's what I do with machines here in our shop.  If the Estop state = 1 then turn off outputs. 
Chad Byrd
Re: Enable output at startup and disable output at EStop
« Reply #12 on: January 03, 2018, 02:12:34 PM »
If you want to de activate an output with the e stop, you can put the estop in the signal library.  That's what I do with machines here in our shop.  If the Estop state = 1 then turn off outputs.  

Can you tell me where you edited the code? I tried adding the following lines to the screen load script but and then executed a macro to start an estop. The output stays enabled unfortunately...

Quote
[mc.ISIG_EMERGENCY] = function (state)
        if( state == 1) then
        local hReg = mc.mcSignalGetHandle(inst, mc.OSIG_OUTPUT1)
        mc.mcSignalSetState(hReg, false)
        end
end,

Quote
function m155 ()
      local inst = mc.mcGetInstance()
      rc = mc.mcCntlEStop(inst)
end
« Last Edit: January 03, 2018, 02:15:10 PM by Penguin »
Re: Enable output at startup and disable output at EStop
« Reply #13 on: January 03, 2018, 02:26:45 PM »
Found the problem: The M155 does not trigger the Emergency Input. I added a button for estop to the screen and now its working perfectly fine. When the estop is pressed, the output is disabled.

Thanks for the help, now i can continue writing the code for the toolchanger.  :)

Martin
Re: Enable output at startup and disable output at EStop
« Reply #14 on: January 03, 2018, 04:49:28 PM »
Okay.  Good deal.  I will need to get the code from a machine to remember exactly how I turn off outputs.  Just for a reference.
Chad Byrd