Hello Guest it is March 28, 2024, 05:14:12 PM

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 - Greolt

511
VB and the development of wizards / Re: Input Box Function
« on: March 30, 2009, 07:07:07 PM »
Thanks Scott

It was fairly obvious once I saw it.  Usually is isn't it.  ;D


Dim P583 As Integer

Title$ = "Box to ask for a number"
Prompt$ = "Enter the number"
Default$ = ""
X% = 200
Y% = 200
P583 = InputBox$(Prompt$, Title$, Default$, X%, Y%)

Greg

512
Is there any license condition that precludes me making my own alterations to the code.

For my own personal use of course.

I do hold a license for the addons and can find no license conditions of use.

Greg

513
General Mach Discussion / Re: Touch Probe Problem
« on: March 29, 2009, 08:32:50 PM »
I have the touch probe setup on my machine and sometimes it feeds down touches and comes up .300 and stops as it should

But sometimes it goes up 2 inches dwells and goes up again.....Why is it doing this...?

Possibly because you are starting the script when in a G91 condition.

If you are using a Z zero routine (not clear if that is what you are asking about) then the post Budman pointed to shows a script which covers for that situation.

A lot of the script examples that are around, don't.

Greg

514
I see TP has posted an example of how to do it with a single text box on the other bolt hole circle thread.

I have edited the above post so as not to clutter this thread.

Greg


PS:  How do I have it enter a default value for a text box?  EG, zero for angle.

515
I have edited this post so as not to clutter up TP's excellent thread.

This is my attempt to alter TP's code to have it ask for the parameters.

I have blatantly used TP's other threads as a guide.

The good parts are all TP's.  The not so good bits are mine.  ;D ;D

This is simply a learning exercise for me. 

Thanks again for your efforts TP. 



'Macro M2224  Bolt circle Drill Manual Quill/SPindle
Sub main
Dim P101 As Integer
Dim P11 As Integer

Begin Dialog DiaLogName1 60,60,80,150, "Drill Circle"

TEXT 10,10,100,10, " Number of Holes"
TEXT 10,40,100,10, "Bolt Circle Radius"
TEXT 19,70,100,10, "Start Angle"
TEXT 18,82,100,10, "0 = 3 oclock"
TEXT 15,94,100,10, "CCW   0 - 360"

TEXTBOX 20,22,35,10, .Nholes
TEXTBOX 20,52,35,10, .RadBC
TEXTBOX 20,106,35,10, .Sangle

OKBUTTON 20,130,35,12
End Dialog

Dim Dlg1 As DialogName1
Dialog Dlg1
 
SetVAR(24,Getdro(1))
Setvar(25,Getdro(2))
Setvar(11, Dlg1.Nholes)
SetVar(1, Dlg1.Sangle)
SetVar(18, Dlg1.RadBC)

Code" #101=0 (Initialize counter)"
Code" #102=#1 (Initialize current angle To A)"
Code" #103=[360 / #11] (Constant For incremental angular distance between holes)"
Code" G0 Z#104 X#24 Y#25"
N1:
Code" #110=[#24 + COS[#102] * #18] (Calculate X position for current hole based on current angle)"
Code" #111=[#25 + SIN[#102] * #18] (Calculate Y position for current hole based on current angle)"
Code" G0 X#110 Y#111 (Machine current hole)"
MsgBox "Drill HOLE    " &" Then Press OK to continue"
Code" #101=[#101 + 1] (Step counter)"
Code" #102=[#102 + #103] (Step current angle)"
P101= GetVAR(101)
P11= GetVAR(11)
While Ismoving()
Wend
If P101 <= (P11-1) Then GoTo n1 Else GoTo N99
N99:
Code" G0 Z#104 X#24 Y#25"
Code "M30"
End Sub





516
VB and the development of wizards / Input Box Function
« on: March 29, 2009, 12:58:33 AM »
I found this on the Cypress Enable Language document.

Sub Main ()
  Title$ = "Box to ask for a number"
  Prompt$ = "Enter the number"
  Default$ = ""
  X% = 200
  Y% = 200
  N$ = InputBox$(Prompt$, Title$, Default$, X%, Y%)
End Sub 

When this Input Box is run where is the answer?

How do I retrieve it?   Where is it stored?  In a parameter?  I am looking for an integer.

I hope that makes sense.  I don't even know enough to ask the right question.   ;)

Greg

517
I am probably a bit odd and different.   ;D

I often want to drill a series of holes and use the CNC side of things to accurately  position each hole but I then use the quill to manually drill the hole.

I just find this way of doing it is often quicker and easier than getting the drill feedrate just right, the depth of dril, etc in the code for just a simple one off job.

So my suggestion is where the selection is made, in the wizards, for G81, G83 and G73 maybe we could add to the list, the selection of an optional stop.

Probably makes no sense to most of you but for me it would be a boon.

Greg

518
MACH TOOL BOX / Re: WOW that was fast service(;-)
« on: March 28, 2009, 10:13:48 PM »

Guys it is not really Var programing but More Parameteric Gcoding. 


.

OK so I got the terminology wrong.  I am only a carpenter.  ;D ;D ;D ;D

All a foreign language to me.

Greg

519
General Mach Discussion / Re: HotKeys for Outputs
« on: March 28, 2009, 07:12:54 PM »
That is a really good question and if there is as good an answer I would love to hear it.  ;D

My impression is that Art makes them up and somehow includes them in Mach's code.  That might be wrong though.

The best I have found so far is this link,  http://www.cypressinc.com/enduser.pdf

However as you will see that does not mention a lot of these Mach specific calls.  That's why I have the above impression.

What would be very helpful is a complete list of the Mach specific VB commands.  Maybe it exists somewhere but I have never found it.

Greg


EDIT:  IsOutputActive is actually listed on the wiki.  I did not look hard enough.  :)

520
MACH TOOL BOX / Re: WOW that was fast service(;-)
« on: March 28, 2009, 06:50:49 PM »
I'll add my thanks to Terry for posting up his examples.

Absolute novice I am, but anything I have learned about this VB stuff is from reading others code.

I pull it apart and try to figure out why each line is there and how it works.

Now Terry has introduced me to VARS.  :)

One question, why the M30 at the end of some of the examples Terry?

Greg