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, 12:23:04 PM
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
Well this counter has officially got me stumped....please help a poor soul...
Pages:
1
Go Down
« previous
next »
Author
Topic: Well this counter has officially got me stumped....please help a poor soul... (Read 1564 times)
0 Members and 2 Guests are viewing this topic.
Darc
Active Member
Offline
Posts: 177
Well this counter has officially got me stumped....please help a poor soul...
«
on:
October 06, 2007, 02:22:41 AM »
Any thoughts as to why I can't get this counter to display correctly?
SetOEMDRO(1214,Remain)
Code "M98 P1 L10"
Code "O1"
Code "Z[#1-[#1*2]]"
Remain= Remain - 1
SetOEMDRO(1214,Remain)
Code "M99"
Logged
Graham Waterworth
Administrator
Online
Posts: 1,665
West Yorkshire, England
Re: Well this counter has officially got me stumped....please help a poor soul..
«
Reply #1 on:
October 06, 2007, 09:01:17 AM »
Hummmmmmmm, yes it was a thought, not had a genuine one for a while.
The top and bottom of it is it will not work.
If it was a normal program it would look something like this :-
O0001
#1=1
M98 P2 L10
M30
O0002
G00 Z[#1-[#1/2]]
#1=[#1-1]
M99
The way you are doing it the sub dose not exist until the VB script creates it line by line.
Go back to the start and tell us what you are trying to do, there will be a way but I don't think this is it.
Graham.
«
Last Edit: October 06, 2007, 09:16:41 AM by Graham Waterworth
»
Logged
G-Code is on the cutting edge
Autovalues Engineering, CNC machining specialists, Bradford, England
Darc
Active Member
Offline
Posts: 177
Re: Well this counter has officially got me stumped....please help a poor soul...
«
Reply #2 on:
October 06, 2007, 09:37:16 AM »
Thanks for the reply Graham.
Basically I'm trying to display in a DRO how many repitions of a sub routine remain using a script.
So to use your example program:
O0001
#1=1
M98 P2 L10
M30
O0002
G00 Z[#1-[#1/2]]
#1=[#1-1]
SetOEMDRO(1214,#1) ' I know this isn't correct syntax, but if it was, this is exactly what I was hoping I could do.
M99
Is it possible to display in a DRO the valueof a variable? e.g #1
Logged
Graham Waterworth
Administrator
Online
Posts: 1,665
West Yorkshire, England
Re: Well this counter has officially got me stumped....please help a poor soul..
«
Reply #3 on:
October 06, 2007, 09:52:46 AM »
What you can do is this :-
Set up a M code macro that reads the parameters from a M code call, e.g.
'M1010.m1s
Dim P as Integer
P=Param1()
SetOEMDRO(1214,P)
End
Then in your G_code call M1010 P#1
Not done this in a while but I think its right.
If it works, where do I send the bill
Graham.
Logged
G-Code is on the cutting edge
Autovalues Engineering, CNC machining specialists, Bradford, England
poppabear
S S SYSTEMS, LLC
Global Moderator
Offline
Posts: 1,707
Briceville, TN, USA
Re: Well this counter has officially got me stumped....please help a poor soul...
«
Reply #4 on:
October 07, 2007, 02:43:08 PM »
Darc,
Try this Make and put the macros 200 and 201 in your macro folder
O0001
#1=1
M98 P2 L10
M201 'reset counter macro after subroutine exits
M30
O0002
G00 Z[#1-[#1/2]]
#1=[#1-1]
M200 'counter macro
M99
'M200.m1s counter Macro
Remain=GetOEMDRO(1214)
Remain=(Remain+1)
SetOEMDRO(1214,Remain)
'M201.m1s reset counter macro
SetOEMDRO(1214,0)
'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/
poppabear
S S SYSTEMS, LLC
Global Moderator
Offline
Posts: 1,707
Briceville, TN, USA
Re: Well this counter has officially got me stumped....please help a poor soul...
«
Reply #5 on:
October 07, 2007, 06:47:26 PM »
Oppsssssss,
Darc, didnt pay attention to the dro range make that "SetUSERDRO(1214,x)"...........
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/
Darc
Active Member
Offline
Posts: 177
Re: Well this counter has officially got me stumped....please help a poor soul...
«
Reply #6 on:
October 09, 2007, 06:48:39 AM »
Thanks alot guys, it works well, I used Scotts M200 & M201, it took me a while to realise I needed
If IsLoading()Then
Else
******
End If
But it works great.
Thanks again.
Logged
Vogavt
Active Member
Offline
Posts: 95
Re: Well this counter has officially got me stumped....please help a poor soul...
«
Reply #7 on:
August 24, 2008, 07:20:58 PM »
So can we get the working code all in one place/post? Never having done this sort of thing, I don't know where to put what. Really need this sorted out to help another poor soul...
Thanks in advance,
Vogavt
Logged
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...