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:57:28 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
Can I Make OEMDRO Count?
Pages:
1
Go Down
« previous
next »
Author
Topic: Can I Make OEMDRO Count? (Read 1258 times)
0 Members and 1 Guest are viewing this topic.
sunmix
Active Member
Offline
Posts: 35
Can I Make OEMDRO Count?
«
on:
May 10, 2007, 11:07:45 AM »
Hi guys, i want to make a DRO count, let say from 100 count to the value of X, i've no idea what seems the problem 0.0, can you help me out? thanks!
Option Explicit
Declare Sub Sleep Lib "Kernel32" (ByVal dwMilliseconds As Long)
Dim X As Integer
Dim C
Sub main ()
X = getOEMDRO(1005)
For C = 100 To X
SetOEMDRO(1006,C)
Next C
End Sub
PS: As in i can see the moves from 100 to x, and i can see it reducing to x?
Logged
poppabear
S S SYSTEMS, LLC
Global Moderator
Offline
Posts: 1,707
Briceville, TN, USA
Re: Can I Make OEMDRO Count?
«
Reply #1 on:
May 10, 2007, 03:42:43 PM »
Oh you want to decrement, in your email you weren't specific, instead put C=C-1 instead of the other.
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/
Ron Ginger
V4 Screen Contributor
Offline
Posts: 568
Re: Can I Make OEMDRO Count?
«
Reply #2 on:
May 10, 2007, 04:28:54 PM »
This may be a problem. The call to SetOEMDRO is going to take some time before it appears on the screen. VB may keep running and count down before you even see a display, or maybe you will get a few random numbers as it counts down.
You need some kind of delay in the loop. Im not sure While Ismoving waits for DRO calls, but as a test maybe just add a loop like
For I= 1 to 10000
Next I
A sleep would be the best way to wait.
Logged
poppabear
S S SYSTEMS, LLC
Global Moderator
Offline
Posts: 1,707
Briceville, TN, USA
Re: Can I Make OEMDRO Count?
«
Reply #3 on:
May 10, 2007, 06:39:53 PM »
If you need a pause between counts that is tied into mach, then put a:
code "G4 P#" '# is some interger that is equal to seconds ie 1=one second
While IsMoving()
Wend
'Another option is you can call the "System clock" (see cypress manual), and do some time value statements that every so
'often or values of the clock, it will increment your counter.
'Or you could "SetTimer(0)" then call timer 0, and with case or if then statements at certain values increment your counter
Scott
«
Last Edit: May 10, 2007, 08:43:08 PM 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/
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...