Hello Guest it is January 29, 2020, 02:26:18 AM

Author Topic: Viewing Parameters  (Read 4201 times)

0 Members and 1 Guest are viewing this topic.

Viewing Parameters
« on: August 31, 2009, 01:52:57 AM »
Is it possible to view the parameter list in Mach3?
Using parameters is no problem, but for debugging I need to be able to look at a few and I don't see any way to view one.

vmax549

*
Re: Viewing Parameters
« Reply #1 on: August 31, 2009, 09:56:24 AM »
oK WHICH parameters are you speaking of??

(;-) TP
Re: Viewing Parameters
« Reply #2 on: August 31, 2009, 10:08:23 AM »
The space of 10,000+ "#*********" parameters.

vmax549

*
Re: Viewing Parameters
« Reply #3 on: August 31, 2009, 05:23:44 PM »
OK you mean Gcode Parameters , They call them Vars in the Mach world?.

Yes there is a VAR monitor. From the top bar select user, then Var monitor. You can veiw 5 vars at a time . Type in the var Number(do not hit enter) then update. It updates live after that. You can pull the monitor screen over out of the way and watch the vars update.

Hope that helps, (;-) TP
Re: Viewing Parameters
« Reply #4 on: November 14, 2009, 01:54:47 PM »
I am not a big Gcode expert, but I am trying to put together a small program within the Gcode file...

For this I need to know how to store POSITION value of an axis to a parameter.

What I have found in the manual is that I can use parameter value as a coordiante (so computer puts the actual value of the parameter to the given axis position) but I just wan the other way around...

this should be possible from gcode, I just do not know how...

I have quickly put together the math for what i want, but I have this obstacle now...
I want to probe a few points, then record the probed coordiantes, make some calculations (add, subtract, divide, multiply, arctan) and then use the results for coordinate shifting and rotation....
Re: Viewing Parameters
« Reply #5 on: November 14, 2009, 03:37:04 PM »
I am not a big Gcode expert, but I am trying to put together a small program within the Gcode file...

For this I need to know how to store POSITION value of an axis to a parameter.

What I have found in the manual is that I can use parameter value as a coordiante (so computer puts the actual value of the parameter to the given axis position) but I just wan the other way around...

this should be possible from gcode, I just do not know how...

I have quickly put together the math for what i want, but I have this obstacle now...
I want to probe a few points, then record the probed coordiantes, make some calculations (add, subtract, divide, multiply, arctan) and then use the results for coordinate shifting and rotation....

I asked that question awhile back:
http://www.machsupport.com/forum/index.php/topic,11333.0.html

The answer wasn't so good.  There is a solution which involves reconfiguring Mach3 with something they called "macro pumping" IIRC to connect the code, however, there was a problem in that it would read the instantaneous DRO value of the axis when the line was read, not the logical value.  The axis is in motion and in fact the exact acceleration at any given point requires reading lines ahead to time to know if it must slow down to a stop make a right angle turn, or pass straight through the next point for example. 

But the way it linked up, the logical coordinate still could not be accessed.  So, the way I read it- and I'm not totally certain- is that "emptying the buffer" means that we have to come to a full stop so the DRO equals the logical coordinates.  Which can have consequences for the finish of the part and speed of the code.

Offline Graham Waterworth

*
  • *
  •  1,934 1,934
  • Yorkshire Dales, England
    • View Profile
Re: Viewing Parameters
« Reply #6 on: November 14, 2009, 04:24:49 PM »
If you only want to keep the values for calculations then you can store them in DRO's

Mach3 allows you to use DRO 1000 onward for this, if you have a value stored in a variable called 'x_pos' within VB then all you have to do is command SetUserDRO(1000,x_pos) and the value is stored.

To read the value back into a variable its var=GetUserDRO(1000)

I hope this is what you wanted.

Graham
Without engineers the world stops
Re: Viewing Parameters
« Reply #7 on: November 14, 2009, 04:42:06 PM »
IF you don't need an on-screen DRO, then Vars are really a better place to store things, and they are accessible both to VB and G-code.  DROs are not accessible in G-code.

Regards,
Ray L.
Regards,
Ray L.

Offline Graham Waterworth

*
  • *
  •  1,934 1,934
  • Yorkshire Dales, England
    • View Profile
Re: Viewing Parameters
« Reply #8 on: November 14, 2009, 08:13:35 PM »
Now I have read your whole topic I think I get what you want.

What you need to do is create a macro like this :-

Enter the following lines into notepad and save them as M1800.m1s in the macro folder inside the profile folder you are using e.g. C:\Mach3\Macros\Mach3Mill making sure the last line has a return on the end.

SetVar(100,GetoemDRO(83))
SetVar(101,GetoemDRO(84))
SetVar(102,GetoemDRO(85))

Now in your g-code program when ever you want the current position of the machine relative to the home position command M1800

Then #100 will be equal to the x position #101= to y and #102 = to z

So your program would look like this

G00 X0 Y0 Z10.
M1800
(Do calculations here)
#100=[#100/2]
#101=[#101/2]
#102=[#102/2]
G00 X#100 Y#101 Z#102
M1800
Etc.

Graham
Without engineers the world stops