Hello Guest it is June 19, 2024, 05:52:53 AM

Author Topic: PLC to start cycle and rewind g-code?  (Read 1871 times)

0 Members and 1 Guest are viewing this topic.

PLC to start cycle and rewind g-code?
« on: February 17, 2018, 08:22:14 AM »
Hi All,

Is it possible to have PLC operate the cycle start, rewind and reset  functiions?

Thanks
Splint
Re: PLC to start cycle and rewind g-code?
« Reply #1 on: February 17, 2018, 12:15:47 PM »
Hi,
I'm not sure why, the PLC script runs every 10milliseconds or so, you don't think it might be a bit much to hit the cycle start button 100 times
a second?

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: PLC to start cycle and rewind g-code?
« Reply #2 on: February 18, 2018, 05:02:38 AM »
I certainly wouldn't need a frequency that high, probably once every 10 seconds, if that. I was thinking of running a robot in a production environment, using a plc to have control of everything other than the robot then sending a start signal to mach to make the robot play its part. So this would be possible? I'm aware of the kinematics issues with mach and robots, I'm thinking of using the Jcode plugin to teach the robot.

Offline DazTheGas

*
  •  778 778
  • DazTheGas
Re: PLC to start cycle and rewind g-code?
« Reply #3 on: February 18, 2018, 05:29:20 AM »
You can do this with a dummy panel and wxTimer

Code: [Select]
TimerPanel = wx.wxPanel (wx.NULL, wx.wxID_ANY, wx.wxDefaultPosition, wx.wxSize( 0,0 ) )
BotTimer = wx.wxTimer(TimerPanel)
TimerPanel:Connect(wx.wxEVT_TIMER,
function (event)
    -- send something to bot
-- process any returns from bot
BotTimer:Start(10000, true) --restart BotTimer if required
end)

BotTimer:Start(10000, true) -- start BotTimer on a RunOnce

DazTheGas
New For 2022 - Instagram: dazthegas