Hello Guest it is April 23, 2024, 12:23:40 PM

Author Topic: Enable momentary on reset  (Read 778 times)

0 Members and 1 Guest are viewing this topic.

Offline mark4

*
  •  167 167
    • View Profile
Enable momentary on reset
« on: June 29, 2019, 11:53:39 PM »
Hello
I am upgrading a Cincinnati Millicron with kollmorgen motors and added a dspmc controller. It is starting to come together with some help from vital systems. Anyway here is my problem for the spindle upon startup I need to turn on a reset for a few seconds on startup to start the spindle. The catch is the input cannot stay on it has to turn off. I tried using an enable but by not turning off it doesnt start. the spindle is actually quit sophisticated glad I have drawings.

How to accomplish this in mach4 ? I have an idea of how to program the script. Only an idea. But where to put the script and have the reset call it up and execute I am unsure how to do. And I am fuzzy as to where to program this script. The plc script comes to mind but maybe screen load will be better.
Thank you for any advice
Mark
Re: Enable momentary on reset
« Reply #1 on: July 01, 2019, 07:37:33 AM »
Hi,
how about something simple like waiting for a second or two after Mach fires up, turn on an output pin for 2 seconds
then off again. This could go in the PLC script, it waits until tescount (the number of times the script has run since the beginning
of the session) is 50:

Code: [Select]
if (testcount==50)then
local outHandle=mc.mcSignalGetHandle(inst,mc.OSIG_OUTPUT5)
mc.mcSignalSetState(outHandle,1)
wx.wxTimer(2000)
mc.mcSignalSetState(outHandle,0)
end

Craig

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

Offline mark4

*
  •  167 167
    • View Profile
Re: Enable momentary on reset
« Reply #2 on: July 01, 2019, 10:14:58 PM »
Thank you for the reply I will give that a shot. Looks like its exactly what I need. Never had one so far that needed the reset turned on then off just for start before. Quite the suprise. This machine a Cincinati Milicron. Nice steel but the computer was trashed with no hope. So I have never heard or seen any of this run. Silver lining 3 axis's and a spindle test run was good.
Mark