Hello Guest it is October 19, 2019, 06:53:32 PM

Author Topic: Comments about Mach4 in Demo  (Read 64811 times)

0 Members and 1 Guest are viewing this topic.

Re: Comments about Mach4 in Demo
« Reply #120 on: May 01, 2014, 10:08:14 PM »

By the way the LEDS on the screens do not work, I cannot telll IF Single block mode is on or off.

(;-) TP

Hi TP  :)
I found several buttons and led's assigned wrongly and just change them.
Russ

Offline smurph

*
  • *
  •  1,138 1,138
  • "That there... that's an RV."
    • View Profile
Re: Comments about Mach4 in Demo
« Reply #121 on: May 01, 2014, 10:24:59 PM »
I think an old screen set was in the build.  It is probably a LED signal is wrong.  Edit the screen and check it out.  In any case, the screen set I'm using will be in the next update and all of that stuff will be fixed.
Re: Comments about Mach4 in Demo
« Reply #122 on: May 01, 2014, 11:10:09 PM »
That would explain it, thanks.
Some of the DRO's are wrong as well.
Been fixing them as I come across them.

Thanks again,
Russ

Offline simpson36

*
  •  1,374 1,374
    • View Profile
Re: Comments about Mach4 in Demo
« Reply #123 on: May 02, 2014, 04:46:18 AM »
Is MACH4 suspended while a SUB is running (as with MACH3 named SUBS) or is it still necessary to insert pauses/delays?

And as long as were on the topic, does MACH4 support named SUBS?

Mach 4 is not suspended.  But I'm not sure what you mean.

And by named subs do you mean the sub file named in the comment?  If so, then Mach 4 supports that.

Steve
Sorry for confusion. I tend to think of macros as subroutines and intermix the terms.  

When I started modifying MACH3, macros could only be 'named' as 'M*********x'. When called from G-code, the MACH3 interpreter would pass the script execution to VBscript and then immediately move on to process the next G-code block. If the script was producing data used by subsequent G-code, the data might not be updated prior to the G-code block grabbing the data.

The only cure for this was to insert delays to give the VBscript time to execute before the G-code block needing the data was parsed by the MACH interpreter.

By 'named' I refer to scripts contained in external files having any legal windows file name instead of the restrictive 'M*********'.  The behavior of RunScript differed in that MACH3 waited (suspended the g-code interperter) until the script returned before continuing to the next G-code block. Here is the description from the Programmer's reference


RunScript
Function RunScript(ByVal QFN as string) as Integer
This function can be used to run the script in the specified filename.
The qualified file name (QFN) parameter is relative to the Mach install directory.
The function will load the specified script file, compile it, execute it and return when the
script has completed.
Prior to the addition of this call, it was common practice to put script code into a
M*********.m1s macro, and use the Code call to execute the M********* macro. The execution of an
M********* macro involves the use of the Mach GCode interpreter (as what you are really doing is executing a GCode M word block) and can result in the programmer having to
invent and handle semaphores to coordinate the asynchronous execution of the M*********
macro.
It is recommended that the use of the Code “as a subroutine call method” be avoided and
that, when possible, the RunScript call should be used instead.y

First Mach3 version with API:
This API was first implemented in Mach3 version 3.43.06.
On 3.43.6 the API was defined as a Boolean function
Return Value:
True = Script was found and invoked.
False = Script was not found.
This API was revised in Mach3 version 3.43.19 to be an integer function.


When this was implemented, I changed dozens of macros to this method and a lot of timing issues were eliminated and the system as a whole became more stable and reliable, particularly with complex rigid tapping macros. It gets ugly when MACH3 moves while the tap is still in the hole, for example.

So, with Lua replacing VBscript, how is the above described process handled by MACH4? Specifically, does MACH4 suspend the G-code execution until macros return or will the programmer still have to test and insert delays to assure this happens?

Secondly, will macros be able to have any legal windows file name and be called by a 'RunScript' (or equiv) call?
« Last Edit: May 02, 2014, 04:55:27 AM by simpson36 »

Offline simpson36

*
  •  1,374 1,374
    • View Profile
Re: Comments about Mach4 in Demo
« Reply #124 on: May 02, 2014, 05:11:51 AM »
Windows 7 pro 64 bit - dual processor - Inlel CPU - Intel MB - 8MB RAM - Intel RAID active - Intel NIC - Nvidia graphics

MACH4 will not start if a Virtual PC is running. Likely would not be an issue for a dedicated PC running a machine tool, so just an FYI

Offline simpson36

*
  •  1,374 1,374
    • View Profile
Re: Comments about Mach4 in Demo
« Reply #125 on: May 02, 2014, 05:17:58 AM »
MACH Config - Input signals tab - first column is not resizable - text truncated

Offline Dan13

*
  •  1,244 1,244
    • View Profile
    • DY Engineering
Re: Comments about Mach4 in Demo
« Reply #126 on: May 02, 2014, 07:32:29 AM »
MACH Config - Input signals tab - first column is not resizable - text truncated

Don't see it here...

Offline Dan13

*
  •  1,244 1,244
    • View Profile
    • DY Engineering
Re: Comments about Mach4 in Demo
« Reply #127 on: May 02, 2014, 07:36:42 AM »
Asked this before, but it again got missed - is there a way to have the DRO's persistent like it is in Mach3?

Also, a few other things:

1. Are there no settings for CV like there used to be in Mach3?
2. While running a program, all the buttons under the the File Ops tab should be grayed out or at least shouldn't do anything if clicked on, like it is in Mach3. Clicking one of them in Mach3 returns a message that you should first Stop the programme running.
3. Can the file loader be made to remember the last location and not default to the root directory of Mach4?
4.

Dan
« Last Edit: May 02, 2014, 07:50:50 AM by Dan13 »

Offline simpson36

*
  •  1,374 1,374
    • View Profile
Re: Comments about Mach4 in Demo
« Reply #128 on: May 02, 2014, 08:28:31 AM »
MACH Config - Input signals tab - first column is not resizable - text truncated

Don't see it here...

The issue is also present on Axis Mapping, Homing, Input, Output and Spindle tabs.

By 'first column, I refer to the gray colored column that has, for lack of a better term, the 'titles' for each line. This column cannot be resized on my system. Some of the 'titles' exceed the available space and are therefor truncated. In most cases, this is not much of a problem, but some of the titles need to be guessed at, which is not a good thing.
Re: Comments about Mach4 in Demo
« Reply #129 on: May 02, 2014, 08:37:20 AM »
Worked on a quick little routine this morning while watching the news.

I like to know the percent of completion the program I am running.

Added the Dro's and text to the tab then
Added this to the PLC Script

Code: [Select]
local TotalLines = mc.mcCntlGetGcodeLineCount(inst);
local GcodeCurrentLine = mc.mcCntlGetGcodeLineNbr(inst);
scr.SetProperty('droTotal', 'Value', tostring(TotalLines));
local GcodePercent = (GcodeCurrentLine/TotalLines) * 100;
scr.SetProperty('droPercent', 'Value', tostring(GcodePercent));

Works well, but I did notice a gcode file this big sure slows down everything you try to do.