Home
Downloads
Mach3
Plugins
CAM Post Processors
Screensets
Purchase
Support
Forum
Tutorial Videos
Documentation
Yahoo Group
Mach Wiki
Resources
Contact Us
Links
CNCZone
German Forum
Italian Forum
Korean Forum
Portugese (Brazil) Forum
Russian Forum (RSK CNCROUTER)
Thai Forum
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
May 28, 2012, 11:59:43 AM
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Search:
Advanced search
Select from and to languages
Chinese-simp to English
Chinese-trad to English
English to Chinese-simp
English to Chinese-trad
English to Dutch
English to French
English to German
English to Greek
English to Italian
English to Japanese
English to Korean
English to Portuguese
English to Russian
English to Spanish
Dutch to English
Dutch to French
French to English
French to German
French to Greek
French to Italian
French to Portuguese
French to Dutch
French to Spanish
German to English
German to French
Greek to English
Greek to French
Italian to English
Italian to French
Japanese to English
Korean to English
Portuguese to English
Portuguese to French
Russian to English
Spanish to English
Spanish to French
Machsupport Forum
Mach Discussion
VB and the development of wizards
Internal variables
Pages:
1
Go Down
« previous
next »
Author
Topic: Internal variables (Read 1851 times)
0 Members and 2 Guests are viewing this topic.
muecker
Active Member
Offline
Posts: 8
Internal variables
«
on:
January 04, 2007, 09:05:19 AM »
Is there a list anywhere of the internal variables that can be accessed via GetParam and SetParam?
Thanks,
Max
Logged
poppabear
S S SYSTEMS, LLC
Global Moderator
Offline
Posts: 1,707
Briceville, TN, USA
Re: Internal variables
«
Reply #1 on:
January 04, 2007, 09:30:33 AM »
Yes, the "Mach Mill manual" Has the Parameters and their formats listed.
Logged
Commercial Mach3: Screens (regular and flash), Wizards, Plug-ins, Brains, PLCs, Macros, ATC's, machine build, retrofit and Prototyping
http://sites.google.com/site/volunteerfablab/
muecker
Active Member
Offline
Posts: 8
Re: Internal variables
«
Reply #2 on:
January 04, 2007, 11:09:13 AM »
I cant seem to find this "Mach Mill manual". The only thing i have found is listed in the customizing mach 2 manual, section 4.4.3, page 4-6, referencing the stepsperaxisX and accelerationX parameters. And some parameters listed in a table in the mach3 mill manual Fig 10.1, pg 10-8, listing some parameters that pertain mostly to offsets. Any help with finding this manual?
Thanks again
-Max
Logged
poppabear
S S SYSTEMS, LLC
Global Moderator
Offline
Posts: 1,707
Briceville, TN, USA
Re: Internal variables
«
Reply #3 on:
January 04, 2007, 12:09:34 PM »
Assuming your talking about accessing Machine code parameters (since you didnt specify), this Part 1:, and Part 1a: adresses it. If you are talking about VB scripting Parameters Part 2: addresses that, both are from the WIKI.
Part 1:
Access to the machine G-code parameter block
Mach3 has a block of variables which can be used in part programs. They are identified by # followed by a number (the parameter address). The contents of the Tool and Fixture tables are in these parameters but there are many values that can be used by the writer of a part program. These machine variables can be accessed within macros by GetVar and SetVar.
Function GetVar (PVarNumber as Integer) as Double
Sub SetVar (PVarNumber as Integer, newVal as Double)
The predefined parameter variables are defined the manuals Using Mach3Mill and Using Mach3Turn.
Examples:
FixNumb = GetVar (5220) ' get current fixture number
Rem set X offset of fixture 2 to be same as fixture 1
Call SetVar (5241, GetVar (5221))
Rem increment a counter, say in a multiple part layout
Call SetVar (200, GetVar (200) + 1))
Part 1a:
(This is the section in the Mach3 Mill Manual that addresses Machine code Parameters
See section:
10.5.3.2
10.5.4
Part 2:
Parameters as it applies to VB code (from the Wiki)
Interrogating Mach3 internal variables
The current value of Mach3 internal variables can be read using the GetParam function.
Function GetParam (name as String) as Double
This returns a numeric value corresponding to the name of the given variable which is provided as a string (constant or variable)
The corresponding routine SetParam sets the value of the variable to newVal.
Sub SetParam (name as String, newVal as Double)
Examples:
Rem interrogate drive arrangements
mechProp1 = GetParam ("StepsPerAxisX")
Rem make C acceleration be same as X for slaving
Call SetParam("AccelerationC", GetParam ("AccelerationX"))
Notice that the word "Param" is used here in a different sense to the Machine Parameters accessed by the # operator from within a part program and in accessing the Q, R & S word "parameters" to a macro call.
Scott
Logged
Commercial Mach3: Screens (regular and flash), Wizards, Plug-ins, Brains, PLCs, Macros, ATC's, machine build, retrofit and Prototyping
http://sites.google.com/site/volunteerfablab/
muecker
Active Member
Offline
Posts: 8
Re: Internal variables
«
Reply #4 on:
January 04, 2007, 01:05:27 PM »
Sorry for not specifying, but i am refering to the VB scripting. With the information that i have found, the only two variables that i am aware of are StepsPerAxisX, and AccelerationX. I was hoping to find a full list of these variables.
-Max
Logged
poppabear
S S SYSTEMS, LLC
Global Moderator
Offline
Posts: 1,707
Briceville, TN, USA
Re: Internal variables
«
Reply #5 on:
January 04, 2007, 04:31:54 PM »
YOU, make up your own variables.
i.e.
Format: SetParam (name as String, newVal as Double) Thus,
SetParam(Whatever, 10) 'This would set your Parameter called "Whatever" to the value of 10
Logged
Commercial Mach3: Screens (regular and flash), Wizards, Plug-ins, Brains, PLCs, Macros, ATC's, machine build, retrofit and Prototyping
http://sites.google.com/site/volunteerfablab/
muecker
Active Member
Offline
Posts: 8
Re: Internal variables
«
Reply #6 on:
January 04, 2007, 05:49:23 PM »
I dont think that is completly correct in regards of what im looking for.
I can create a button with the following code.
Steps = GetParam("StepsPerAxisX")
MsgBox(Steps)
I can do this without ever using a SetParam, and the button will return the steps per inch that are input in the motor tuning section. Those are the parameters that i am trying to get a list of. i.e. , how would i know what the velocity of the x-axis is? Would it be "VelocityAxisX", or could it be "VelocityX"? I have no way of knowing without a list.
-Max
Logged
poppabear
S S SYSTEMS, LLC
Global Moderator
Offline
Posts: 1,707
Briceville, TN, USA
Re: Internal variables
«
Reply #7 on:
January 04, 2007, 06:15:23 PM »
Oh.........THAT list..........
Yeap, I have wanted that one too.
Logged
Commercial Mach3: Screens (regular and flash), Wizards, Plug-ins, Brains, PLCs, Macros, ATC's, machine build, retrofit and Prototyping
http://sites.google.com/site/volunteerfablab/
Chaoticone
South Carolina, US
Administrator
Offline
Posts: 3,598
Precision Chaos
Re: Internal variables
«
Reply #8 on:
January 04, 2007, 06:49:03 PM »
Would the MACH 3 SDK version help?
Brett
Logged
If you could see the things I have in my head, you would be laughing too.
www.precisionchaos1.com
My guard dog is not what you need to worry about!
Brian Barker
Administrator
Offline
Posts: 3,383
Re: Internal variables
«
Reply #9 on:
January 07, 2007, 11:24:05 AM »
I would have a look at the code in the Calc steps per unit button on the settings page. I used some of that stuff in there...
Logged
Fixing problems one post at a time
www.newfangledsolutions.com
www.machsupport.com
Pages:
1
Go Up
« previous
next »
Jump to:
Please select a destination:
-----------------------------
Mach Discussion
-----------------------------
=> General Mach Discussion
=> Mach3 under Vista
=> Quantum
=> Mach SDK plugin questions and answers.
===> Finished Plugins for Download
=> VB and the development of wizards
=> Brains Development
=> Video P*r*o*b*i*n*g
=> Mach Screens
===> Screen designer tips and tutorials
===> Works in progress
===> Finished Screens
===> Flash Screens
===> JetCam screen designer
===> Machscreen Screen Designer
===> CVI MachStdMill (MSM)
=> Feature Requests
=> Non English Forums
===> Italian
===> French
===> Spanish
===> Chinese
===> German
===> Russian
===> Romanian
===> Japanese
===> Vietnamese
=> FAQs
-----------------------------
*****VIDEOS*****
-----------------------------
=> *****VIDEOS*****
-----------------------------
General CNC Chat
-----------------------------
=> Share Your GCode
=> Show"N"Tell ( What you have made with your CNC machine.)
=> Building or Buying a Wood routing table.. Beginnners guide..
=> Show"N"Tell ( Your Machines)
-----------------------------
G-Code, CAD, and CAM
-----------------------------
=> G-Code, CAD, and CAM discussions
=> LazyCam (Beta)
-----------------------------
Third party software and hardware support forums.
-----------------------------
=> LazyTurn
=> GearoticMotion Preliminary testing
=> Tempest Trajectory Planner
=> Contec
=> dspMC/IP Motion Controller
=> HiCON Motion Controller
=> Third party software and hardware support forums.
=> Galil
=> Newfangled Solutions Wizards
=> Mach3 and G-Rex
=> Mesa
=> Modbus
=> NC Pod
=> PoKeys
=> SmoothStepper USB
=> Sieg Machines
=> Promote and discuss your product
-----------------------------
Tangent Corner
-----------------------------
=> Tangent Corner
=> Competitions
=> Polls
=> Bargain Basement
-----------------------------
Support
-----------------------------
=> Downloads
===> XML files
===> Post Processors
===> Macros
===> Tutorials
===> Others
===> Beta Brains
===> Screen Sets
===> Documents
===> MACH TOOL BOX
=> One on one phone support.
=> Forum suggestions and report forum problems.
-----------------------------
Mach4
-----------------------------
=> Mach4 pre-Alpha Testing
Loading...