Hello Guest it is April 25, 2024, 07:45:56 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 - DennisCNC

Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 »
81
VB and the development of wizards / Re: Saving DRO values in .txt file?
« on: February 06, 2008, 05:37:51 PM »
I kind of figured that variables don't go from one button to the next.  I think I need to put this in a macro and have it run a part of the code when a button is pressed,  something like GetUserButton() or GetUserLed()?

I looked at the jog to gcode plugin but you need to jog for it to take the dro value and save it, I need to save the encoder dro's that are on setting tab.

82
VB and the development of wizards / Re: Saving DRO values in .txt file?
« on: February 01, 2008, 10:01:05 PM »
Few more question on this VB stuff.  I have this code working and dong exactly what I want in VB software:


Dim sFileText As String
Dim iFileNo As Integer
Dim myvar As String
Dim place As String


Private Sub Command1_Click()

iFileNo = FreeFile
myvar = InputBox("Enter place")
place = "c:\" + myvar + ".txt"

Open place For Output As #iFileNo


End Sub

Private Sub Command2_Click()

xd00d = 123
yd00d = 123
Print #iFileNo, "X= ", xd00d
Print #iFileNo, "Y= ", yd00d


End Sub

Private Sub Command3_Click()

Close #iFileNo
End Sub


When you click the first button a window comes up to type in File name.   Then the second button saves "123" in a vertical column as many times as you click it.  The last button Closes the file.

Now I moved this code to Mach the first button and the last button work fine but the button to save the coordinates from GetOEMDro (800) and (801) instead of the the "123" value does not work.
I think it's because the Open command is a private deal.  How do I make the second button work?


What I did was made one button and put this code in it:

Dim sFileText As String
Dim iFileNo As Integer
Dim myvar As String
Dim place As String


iFileNo = FreeFile
myvar = InputBox("Enter place")
place = "c:\" + myvar + ".txt"

Open place For Output As #iFileNo


For the second button this part of the code:

xd00d = getoemdro (800)
yd00d = getoemdro (801)
Print #iFileNo, "X= ", xd00d
Print #iFileNo, "Y= ", yd00d


Last button:

Close #iFileNo

83
VB and the development of wizards / Re: Saving DRO values in .txt file?
« on: January 31, 2008, 08:19:00 PM »
Nick,

Thank you very much for the code example!

Also a big Thank you to Scott for helping all the learners here with your time and examples!


84
VB and the development of wizards / Saving DRO values in .txt file?
« on: January 30, 2008, 09:25:53 PM »
Is there any code examples for saving DRO values in a .txt file that can opened later for review?  For instance  GetDRO x and y (encoder values) and save to a .txt file when a input is activated. 

Thanks

85
General Mach Discussion / Re: mach3 on kent mill
« on: January 30, 2008, 03:13:20 PM »
The control box looks nice and compact but it will not work with Mach directly, you will need different motor drives that take step/dir signals or get 3 DC servo motors and 3 drives and go this route.

Like the motors here:
http://cgi.ebay.com/3-DC-Servo-Motors-with-Encoders-1340-Oz-in-CNC-Router_W0QQitemZ290200887361QQihZ019QQcategoryZ78195QQssPageNameZWDVWQQrdZ1QQcmdZViewItem

Drives:
I'm using these:
http://www.larkencnc.com/viper/v100.htm

or these for less:
http://www.geckodrive.com/product.cfm?pid=13

You can probably get good money on eBay for the Servo II stuff. 

Did you ask the Servo people what it will cost to get the system going if you were to buy what ever is needed from them?

86
SmoothStepper USB / Re: I want my SmoothStepper!
« on: January 30, 2008, 02:57:27 PM »
I want one too!

87
General Mach Discussion / Capturing Encoder DRO's?
« on: January 26, 2008, 07:22:52 PM »
Can some point me in the right direction on how to make this happen:  I want to be able to save the encoder dro values that are in the setting tab (OEMDRO#x= 29,y=30)   in a way that they can be loaded in to a cad program to be used there.  Basically like a digitizer.  So i would go to a position press a button then x and y value is stored then next point and so on.   I can figure out the button part but not sure where to send the dro values to be stored?

Thanks

88
General Mach Discussion / Re: What does the "To Go" button do?
« on: January 25, 2008, 10:46:44 PM »

89
Brains Development / Brain and G code?
« on: January 25, 2008, 10:10:57 PM »
I need to put the Z axis at "g53 g0 z0"  How is that done with a brain?  Do I need to make a button and attach a VB script saying:  code "g53g0z0" and have the brain activate the button?


Thanks

90
General Mach Discussion / Re: mach3 on kent mill
« on: January 25, 2008, 02:47:07 PM »
I often use this site for pics, http://imageshack.us/  just remember to copy the URL after it uploads the picture so you can find it again.

Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 »