Hello Guest it is March 29, 2024, 10:40:13 AM

Author Topic: Probing wizard - no coroutine - no wait - no PLC script  (Read 1720 times)

0 Members and 1 Guest are viewing this topic.

Probing wizard - no coroutine - no wait - no PLC script
« on: January 25, 2018, 08:49:36 PM »
I have just spent the better part of a day examining the probing wizard and the mcProbing.lua file.  I have monitored and searched the many posts regarding both probing, g31 calls and locked GUIs.  I have used coroutines in a homing button script because there was a mcAxisHomeComplete that I could loop on.  

With regards to g31 calls, there seems to be no equivalent api function, ISIG, register or poundvar that you can poll to find out if it has finished moving.  There is a thread by Smurph that talks about using a plc script to monitor a register variable that seems viable.  

Did I miss an API, ISIG or some other method of determinig that a g31 call has completed, not whether it struck but whether it has completed its move? isStill and isInCycle don't work during a probe.

After going through the probing wizard buttons, the mcProbing.lua and mcMasterModule.lua functions I found no coroutines, no use of the PLC wait nor any reading or setting of registers.  Just successive calls to mcCntlGcodeExecuteWait...and it does not lock up the screen.

When I call a 'substantially' similar routine in a module I created, I get a locked screen until the module function finishes its mcCntlGcodeExecuteWait.

Any help?

TIA

RT



Offline Chaoticone

*
  • *
  •  5,624 5,624
  • Precision Chaos
    • View Profile
Re: Probing wizard - no coroutine - no wait - no PLC script
« Reply #1 on: January 25, 2018, 09:48:51 PM »
Have a look at the mcTouchOff module in the modules directory.

Open a mill profile and click the touch button. That will launch it.

Maybe better than that is just using Gcode.

;D If you could see the things I have in my head, you would be laughing too. ;D

My guard dog is not what you need to worry about!

Offline dude1

*
  •  1,253 1,253
    • View Profile
Re: Probing wizard - no coroutine - no wait - no PLC script
« Reply #2 on: January 26, 2018, 02:36:01 AM »
rhtuttle just go old school and use a macro b

Offline thosj

*
  •  532 532
    • View Profile
Re: Probing wizard - no coroutine - no wait - no PLC script
« Reply #3 on: January 26, 2018, 08:00:44 AM »
rhtuttle just go old school and use a macro b

Good if he has Mach4 Industrial, I think.
--
Tom
Re: Probing wizard - no coroutine - no wait - no PLC script
« Reply #4 on: January 26, 2018, 11:53:18 AM »
Macro B industrial.
Also, Didn't Daz put a video on youtube that used a coroutine that didn't lock up the gui using GCodeExecuteWait?
Chad Byrd
Re: Probing wizard - no coroutine - no wait - no PLC script
« Reply #5 on: January 26, 2018, 12:32:31 PM »
Dude1, As a pre-release licensee of Mach4 I am 'entitled' to an industrial license but then I just have to learn another language :-\  Maybe someday when I get to fully retire  :D

cbyrd, I've watched that video multiple times and it is very well done.

Brett, I never looked at that module before and as a non mill user I didn't see the 'Touch' button.  Very nice code and example of how to create and use a LUA UI.  Sure wish that had been ported to the wxLathe screenset  ;)

However, I think you all missed my main point.  I'm not just looking for a solution(smurph's plc 'state' paradigm is the most likely path), i'm looking to understand how the mcProbing.lua module gets by without using the PLC or coroutines and uses multiple mcCntlGcodeExecuteWait commands without locking the GUI.

TIA

RT

PS.  Why oh why is there not a mc.ISIG_ISPROBING signal?