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 (AACNC)
Korean Forum (JI Robotics)
Portuguese (Brazil) Forum
Russian Forum (RSK CNCROUTER)
Thai Forum
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
June 19, 2013, 11:32:32 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
VB syntax
Pages:
«
1
2
3
Go Down
« previous
next »
Author
Topic: VB syntax (Read 3395 times)
0 Members and 1 Guest are viewing this topic.
poppabear
S S SYSTEMS, LLC
Global Moderator
Offline
Posts: 1,795
Briceville, TN, USA
Re: VB syntax
«
Reply #20 on:
March 22, 2009, 09:14:56 AM »
Jusst another side note:
you have to set the vars before you can use them.
you have this:
'M79.m1s
GetVar (550)
Code"#551=[#550/2]"
You need this:
'M79.m1s
Var1 = GetVar (550)
SetVar (551, (Var1/2))
'When ever you use a "Get" something, you have to set it = to something, OR, put the Get as the parameter of another function.
'for example
SetVar (551, (GetVar (550)/2))
'scott
«
Last Edit: March 22, 2009, 09:17:27 AM by poppabear
»
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/
MachineMaster
Active Member
Offline
Posts: 151
Re: VB syntax
«
Reply #21 on:
March 22, 2009, 10:50:50 AM »
I think you may be missing the fact that
Code"#551=[#550/2]"
does set 551. In reality, I don't need
GetVar (550)
Variable 550 is set in the calling G-code and I could either set 551 as I am doing in the macro or with
#551=[#550/2]
in the G-code following the #550= line.
Logged
MachineMaster
Active Member
Offline
Posts: 151
Re: VB syntax
«
Reply #22 on:
March 22, 2009, 03:21:03 PM »
Quote from: melee on March 21, 2009, 07:44:17 AM
Hi
You appear to be confusing integers with strings and are showing a integer value within string quotes
The below is not strictly necessary but clearly shows the difference between the 2 types of data you are combining.
( Str() converts an integer to a String and Val() does the reverse )
Dim V As Double
Dim s1 As String
V= GetVar (550)
s1 = "G90 G00 X" &Str(V) & " Y" &Str(V)
Code s1
regards
Melee
Actually, when I first set V with
V= GetVar (550)
I am implicitly declaring V as Double. The same is true when I then set V1 with
V1=[V/2]
because the value being set is Double.
Logged
poppabear
S S SYSTEMS, LLC
Global Moderator
Offline
Posts: 1,795
Briceville, TN, USA
Re: VB syntax
«
Reply #23 on:
March 22, 2009, 09:24:14 PM »
Well all righty then, you got it all figured out then
Good luck
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/
Pages:
«
1
2
3
Go Up
« previous
next »
Jump to:
Please select a destination:
-----------------------------
Mach Discussion
-----------------------------
=> General Mach Discussion
=> Mach3 under Vista
=> 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
=> CS-Lab
=> dspMC/IP Motion Controller
=> HiCON Motion Controller
=> Third party software and hardware support forums.
=> Galil
=> Newfangled Solutions Mach3 Wizards
=> Newfangled Mill Wizard
=> 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...