1
Mach4 General Discussion / Re: Toolpath drawing style
« on: March 25, 2018, 01:47:50 AM »
Thank you! I will try.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
inst = mc.mcGetInstance()
local profile = mc.mcProfileGetName(inst)
local path = mc.mcCntlGetMachDir(inst)
local stuff="--one,two,three"
local filetoget=path .. "\\testfile.csv"
io.output(io.open(filetoget,"a+"))
io.write(stuff)
io.close()
function m101()
if not ew.isMachineInSpotMode() then
ew.onIncorrectCommand()
return
end
ew.sigVars['tbToUp'] = 1
repeat
wx.wxMilliSleep(100)
until (ew.sigVars['tbIsUp'] == 1) or not ew.isWorking()
end
if (mc.mcInEditor() == 1) then
m101()
end
This script turn on table up valve and wait upper position responce. And it work! No freeze UI and it realy wait table upper position or machine stopped. If I disconnect position switch it wait infinitely, and UI responce OK.
yes there are two Lua chunks at runtime, of course only one can run at a time.- why only one at a time? Does this mean that M command execution freeze PLC script? As I assume this two interpreters run in separate threads, one - for UI and PLC staff, other - machine interpreter (MDI or File).