Hello Guest it is November 22, 2019, 04:44:01 AM

Author Topic: Wizard and VB Script questions (Brian Barker)  (Read 14934 times)

0 Members and 1 Guest are viewing this topic.

Re: Wizard and VB Script questions (Brian Barker)
« Reply #20 on: January 20, 2006, 12:33:07 PM »
Hi Brian

Let me try to explain what I am trying to do......

Material clamped in chuck.......Zero 10mm away from chuck
                                          OD of Stock = 50
                                    Length of Stock = 60

                 Tool Change Position = X100Z150

XStart (50) ZStart(60) is where my tool will go to after the tool change.
Now If I ignore XStart <= StockDia The command will be something like 

 G0 X49 Z59   Then I am going to crash!!!!!!!!

This is where the problem with DiaCheck also comes in .......If mach see DiaCheck as "1" XStart wil be divided by 2.

Now even if I enter XStart as 99 I will still get the error because devided by two it is 49.5 and will show as .......

XSrart(49.5) <= StockDia(50)     True or False. The same go's for the ZStart.....

You see this is realy getting screwed up now.
If A is a success in life, then A equals X plus Y plus Z.
                               Work is X: Y is play and Z is keeping
                                                             your mouth shut.
Re: Wizard and VB Script questions (Brian Barker)
« Reply #21 on: January 20, 2006, 12:57:10 PM »
I see!!! I think I know where you are going wrong. I will fix it and send it to you.
Fixing problems one post at a time ;)

www.newfangledsolutions.com
www.machsupport.com
Re: Wizard and VB Script questions (Brian Barker)
« Reply #22 on: January 20, 2006, 03:43:49 PM »
Hi Brian

Thanks ......

Can you just put something staight. I tried to get this cleared on the oyher forum but Art is very vague about this.
According to him there are only 254 UserDRO's and UserLED's. How are this implemented. I see in other wizards dro and led numbers like 1002 .....1098...... this is much higher than 254. Art tried to explain the implementation as ...1000,********* ,does mean you can start at 1000 and end at 1254.......

This is getting me in a knot.
Will UserDRO(1001) and UserLED(1001) clash or is this seen as two different OEMCodes. Both get spesified as OEMCODE 1001.

Do you get clashes of the same DRO numbers across different Wizards......Example UserDRO(1020) in a threading Wizard and UserDRO(1020) in another turn Wizard. If so I will have to go through all other wizards to see what has been used to see if I dont cross ref. I may sound a bit coo-coo but I have to know the nitty gritty to be sucsesfull in making a Wizard.

Thanks
Deon
If A is a success in life, then A equals X plus Y plus Z.
                               Work is X: Y is play and Z is keeping
                                                             your mouth shut.
Re: Wizard and VB Script questions (Brian Barker)
« Reply #23 on: January 20, 2006, 04:25:18 PM »
YES it is 1000 to 1254 in the dro range.

The UserDRO and OEM DRO are not the same thing... I know it is hard on the head...
Fixing problems one post at a time ;)

www.newfangledsolutions.com
www.machsupport.com
Re: Wizard and VB Script questions (Brian Barker)
« Reply #24 on: January 21, 2006, 02:22:05 AM »
So will it then be safe to say that UserDRO(1025) and UserLED(1025) will not clash in the same wizard........

And that UserDRO(1025) in the threading Wizard will not clash wth UserDRO(1025) in the Turn Wizard that I am busy making.
If A is a success in life, then A equals X plus Y plus Z.
                               Work is X: Y is play and Z is keeping
                                                             your mouth shut.
Re: Wizard and VB Script questions (Brian Barker)
« Reply #25 on: January 21, 2006, 05:18:37 AM »
Yes, I think you see how it works now :)
Fixing problems one post at a time ;)

www.newfangledsolutions.com
www.machsupport.com
Re: Wizard and VB Script questions (Brian Barker)
« Reply #26 on: January 21, 2006, 03:42:52 PM »
Hi Brian

It looks like I found away around my problem. The problem seems to be with the ticker. I REM'ed that specific one and the problem is gone. What I brought in as a safety device.......I have critical DRO's auto filled in by cross referencing to previous operations. This seems to work very well.(........Call SetUserDRO(1030,GetUserDRO(1084)+1)......)

Now How about that Dialog Box where the user can choose to validate or abort a setting.

Thanks a lot for your help.
Deon
If A is a success in life, then A equals X plus Y plus Z.
                               Work is X: Y is play and Z is keeping
                                                             your mouth shut.
Re: Wizard and VB Script questions (Brian Barker)
« Reply #27 on: January 22, 2006, 09:23:24 AM »
Try this in the script editor :)



X =1
y=3

Do While X<Y
Button = MsgBox("Dia must be smaller! Would you like to change it???",4,"Lathe program error...")
If Button = 7 Then
Exit Sub
End If
X = Question("Enter New Stock DIA")
Loop
Fixing problems one post at a time ;)

www.newfangledsolutions.com
www.machsupport.com
Re: Wizard and VB Script questions (Brian Barker)
« Reply #28 on: January 23, 2006, 02:28:48 AM »
Hi Brian

First of all thanks for all your effort and patience in some of the silly questions I am asking. I really do appreciate it.

I tried the dialog box. The way it is presented is what I have in mind......The only change I would like is for the answer this box, I would like the answer field to be a bit longer so that you can work with more characters than a one.

The implementation though is not there yet. I need it to ignore the warning if you choose to. At the moment it loops and comes up again if you want to carry on. When choose to change a setting it does not update and also continue to loop.

Hope you understand what I am getting at.

Thanks
Deon
If A is a success in life, then A equals X plus Y plus Z.
                               Work is X: Y is play and Z is keeping
                                                             your mouth shut.
Re: Wizard and VB Script questions (Brian Barker)
« Reply #29 on: January 23, 2006, 08:32:08 AM »
I can fit 123456789 in the box and if you keep typing it will hold MUCH more...

Also if you would like it to just keep going take out the do while loop and change the If like this:

X =1
y=3

If  X<Y Then
    Button = MsgBox("Dia must be smaller! Would you like to change it???",4,"Lathe program error...")
   If Button = 6 Then
   X = Question("Enter New Stock DIA")
   End If
End If


I think that is what you are looking for.
Fixing problems one post at a time ;)

www.newfangledsolutions.com
www.machsupport.com