Hello Guest it is March 29, 2024, 05:20:11 AM

Author Topic: Display a variable on the status line  (Read 5795 times)

0 Members and 1 Guest are viewing this topic.

Display a variable on the status line
« on: May 02, 2014, 11:54:44 AM »
Does anyone know if (and how) to have the value of a variable ( like [#101] ) be displayed and updated on the status line in Mach3?

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: Display a variable on the status line
« Reply #1 on: May 02, 2014, 03:56:29 PM »
Please explain what ,when, from where, and why you need to do this. Then perhaps we can help you work it out. It all depends.

(;-) TP
Re: Display a variable on the status line
« Reply #2 on: May 02, 2014, 04:43:01 PM »
When I do a M98 P1234 Lxx it would be good to know how many cycles the sub has done. I add a line like:

#10 = [[#10] + [1]]
M99

to the O1234 sub and set #10 = 0 before the M98 call.

I can go into the OPERATOR tab and read the value of #10 and it updates with each sub call, but it would be neat to have that value in the status line just like static comments.

I hope this give you an idea of why and how I would use this feature.

THANKS for looking and responding!
Re: Display a variable on the status line
« Reply #3 on: May 02, 2014, 05:22:55 PM »
Create a DRO on your screen and use

GetOemDro (222)

that is the number of cycles left to do in a loop

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: Display a variable on the status line
« Reply #4 on: May 02, 2014, 09:10:07 PM »
The problem with the DRO is that is you MUST put a G4P0 at the end of the looped code. Otherwise mach3 cycles all the loop numbers and you never get to see them process.

You can add code to the Macropump that will UPdate the message line BUT it overwrite all your status and comment messages from Gcode.

You can do as YANVR said and use a the (222) dro to display the count, don;t forget the G4p0.

You can add code to the macropump to update a new USER message line or DRO from the #vars Update count.

You can even make it show it count UP and/or  Count down.

(;-) TP
Re: Display a variable on the status line
« Reply #5 on: May 02, 2014, 10:15:37 PM »
Terry I've used it for 4 years and never used the G4p0 code
It worked fine for me
Re: Display a variable on the status line
« Reply #6 on: May 02, 2014, 10:39:31 PM »
Hi, and thanks to both of you.
 I like the idea of having a permanent counter on the main display, my problem is that I have no clue how to add the DRO. 
 I'm sure that there is plenty tutorials to lead me "hopefully" down the right path. 
BW Jeff

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: Display a variable on the status line
« Reply #7 on: May 02, 2014, 11:15:02 PM »
Here it never worked without the G4p0. Art is the one that explained to me how to make it work. The problem was HOW the MACH3 saw the loop indicator. It was NOT when the operation actually ran BUT when it was loaded into the buffer.  The G4p0 stopped the buffer load at that point allowing teh indicator to be seen.  Otherwise the count was processed all at once and the DRO actually displayed them all at WARP speed and you could not follow it.

(;-) TP

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: Display a variable on the status line
« Reply #8 on: May 02, 2014, 11:27:15 PM »
(;-) I am BAD, I just tested it and it was fixed somwhere along the line to work right.

Sorry, (;-) TP