Hello Guest it is April 27, 2024, 07:11:04 AM

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - bdring

Pages: « 1 2 3
21
VB and the development of wizards / Re: Percent Complete
« on: December 03, 2007, 08:39:25 AM »
Excellent...that did it.  In case it does not show...this is my first day tweaking Mach.  I am a seasoned programmer, but I am having difficulty tracking down some of Mach's finer details.   

I am not sure what you mean with the "load GCode" button.  I was trying to redo the Load button so it loads the file then calculates the length.  It tried a DoOEMButton(216), but it would hang on a part generation dialog box.

Anyway...I decided to try to take it one step further.  I programmed a quick PIC chip to output a byte received on the serial port to a pair of seven segment LEDs. 
I got Mach to output on the serial port the percent remaining.  I changed the value to an integer and tested it for change to prevent it from sending it too often. 
I assumed an unused SetVar number to hold the value.  I could not find details on what numbers to use. 

I found some cheap huge LEDs at www.futurlec.com.  I will use them if everything proves reliable and useful.


Code: [Select]
filesize = GetOEMDRO(1200)
filecurrent = GetOEMDRO(816)

'=== Get percent ===
If filesize <> 0 Then
completed = CInt((filecurrent / filesize) * 100)   
Else
completed = 0
End If 

If GetVar(2002) <> completed Then
Call setuserDro(1201,completed )
SendSerial(Chr(completed))
Call SetVar(2002, completed)
End If


22
VB and the development of wizards / Re: Percent Complete
« on: December 02, 2007, 06:01:53 PM »
Thanks...I did not see that DRO to enter the total number of lines. 

It works now, but the If statement is needed to prevent the error on start-up.

I knew the issue of accuracy would come up.  I really don't care if it is very accurate.  I just want to get an idea of when the end is near.  I ran a few files today and found the line count method appears to be more accurate than the estimate method on my files and setup.  I also really only care if 90-100% area is accurate.

I tried to add button to get the file length with the following VB code.

Code: [Select]
Dim I
Dim textLine

Open "c:\mach3\gcode\roadrunner.tap" For Input As #1

While Not EOF(1)
Line Input #1, textLine
I = I + 1
Wend

Close #1

Call setuserDro(1202,I)
   


It works, but I need to know how to get the filename automatically.

23
VB and the development of wizards / Re: Percent Complete
« on: December 02, 2007, 09:30:54 AM »
Thanks for the help, but it is not working.  The macro gets a divide by zero error as soon as mach loads.  I surrounded the calculation with "If filesize <> 0".  That stopped the error, but it appears filesize is never non zero because the DRO never changes.  I am having trouble finding documentation on the codes.  Where do you find the code to get the filesize?

24
VB and the development of wizards / Percent Complete
« on: December 01, 2007, 10:54:11 AM »
Is there a way to determine what percent of the g-code has run?  (i.e.  current line / total lines * 100).  I would like to make large display that I can see from across the room that gives me a rough idea how far I am through the job.

25
General Mach Discussion / Re: Charge Pump Frequency
« on: September 07, 2007, 01:53:18 PM »
I don't need it accurate.  It was falling below the threshold of my detection circuit.  I can lower the threshold easily.  I was just hoping someone clarify the issue.

26
General Mach Discussion / Re: Charge Pump Frequency
« on: September 06, 2007, 02:29:49 PM »
The 12.5kHz shown on the right side is for the cursors.  i manually set them at 12.5kHz for reference.  The actual frequency is the 6.49kHz as shown below that.  The 5kHz for 'Laser Standby' is not checked.  Is Mach toggling the pin at 12.5kHz?  I checked it on Mach2 and got the same frequency.

27
General Mach Discussion / Charge Pump Frequency
« on: September 05, 2007, 10:42:40 PM »
I turned on a charge pump signal and output it to an oscilloscope.  The frequency I got is half of the 12.5kHz.  Is this correct and just a different definition of frequency?  The frequency of transitions voltage transitions is 12.5kHz.


28
General Mach Discussion / Re: Mach users in Chicago
« on: October 03, 2006, 06:06:00 PM »
River Forest, IL...Home built CNC router....Mach 3, LazyCAM, VCarve and some MasterCAM.  About 6 weeks experience.

Honestly, It only took about an hour to turn my motors and cut 'Hello World' into a piece of wood.  It is a lot easier than it appears at first, but I'll help if needed.

I have no experience with Servo's, but it looks like Tormach uses steppers.

29
General Mach Discussion / Separate Deceleration?
« on: September 23, 2006, 10:20:00 PM »
Has anyone ever suggested having deceleration as as separate parameter from acceleration.  A lot of the factors that go into choosing an acceleration don't apply for deceleration such as friction, weight, etc. It would make tuning a little more complicated for some people, but in the case of my machine it could result in a measurable improvement in performace.

30
General Mach Discussion / Re: New PlugIn just about done..
« on: August 30, 2006, 08:46:14 PM »
Got mine running and I love it!  The spinners are perfect.  They have just the right feel.  They are perfect for sneaking up on that work zero.

Keep up the good work

Pages: « 1 2 3