Machsupport Forum
Mach Discussion => Mach4 General Discussion => Topic started by: Splint 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
-
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 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.
-
You can do this with a dummy panel and wxTimer
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