Hello Guest it is April 23, 2024, 02:21:32 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 - cgdavis007

Pages: 1
1
VB and the development of wizards / Re: Password protect a button?
« on: April 25, 2010, 12:13:39 PM »
Tom,
The password character "*" was bothering me.  So I spent a few hours working this out.  I hope it's what you were looking for.  Please let me know.

Sub main
Begin Dialog joe 60,60,140,185,"Enter Password"
OKButton 10,50,40,12
CancelButton 10,70,40,12
Text 10,10,120,12, "Password is Not Case Sensitive",.Pin1
TextBox 10,30,40,12,.Pin,32
End Dialog
Dim Dlg1 As joe
Button = Dialog (Dlg1)
If Button = 0 Then Exit Sub
If Dlg1.Pin = "Tom" Then DoOEMButton (5)
If Dlg1.Pin = "Chuck" Then DoOEMButton (1)
End Sub

Chuck

2
VB and the development of wizards / Re: Password protect a button?
« on: April 18, 2010, 08:03:18 AM »
Hi Tom,
     Don't know if this will work for you or not.  What I use is a login screen as screen 1 with a userdro for a pin (personal id #) and a button with if then statements for each pin (pin can be operator chosen but you have to edit the button script for each new pin) or assigned (allows for a number of pins to be pre entered to the button).  When I enter my pin I access a setup/test screen that isn't accessible from the other screens.  The pin is in plaintext, but is zeroed out in the script for the button.  I also disable the menu line and have buttons to enable it and re-disable it on the setup/test screen. Here is a sample of my button script.
getuserdro (1000)
If getuserdro (1000) = 1111 Then doOEMbutton (5)  
If getuserdro (1000) = 1112 Then doOEMbutton (2)
If getuserdro (1000) = 1113 Then doOEMbutton (2)
setuserdro (1000, 0)
I also use a login button on each screen to return to screen screen 1 (login screen) so that when I make changes I just press login and voila ready for the next operator.  This could also work to load a different toggle button based on pin input.
I suppose one could use a login screen with a dro (pin) and button that loaded different screen set files, one for operators and one for setup (haven't tried this yet, too easy for me the other way).  Hope you find this useful.

3
Hi to everyone,

 I'm Chuck.  I live in Arkansas.  I am brand new to CNC.  When I say brand new, I mean that I became interested in CNC just last year and have been absorbing as much information as possible from forums, websites and the like.  I have purchased 2 mills (Shizuoka with a tool changer and a Bridgeport SD7).  In the last week I have tackled trying to write a script in VB for one of my projects.  I haven't used any programming since I was in the 7th grade.  In 1983 we had Apple computers and basic.  Now it's like trying to learn a foreign language without a reference point.  I have purchased Mach3 and BobCAD/CAM and so far with fairly minimal head to screen pounding I have learned what would be the equivalent of a few pages of the A volume in a 26 volume Encyclopedia set.

My wife and I are remodeling our new to us house and then I have a new metal building to erect for housing my machines.  So for now I am learning as much as possible and wading through the bottomless cornacopia of information.

My current affair is an old pallet building machine that I want to control the set up of pallet size with CNC.  It has places for 4 nail guns that mount on a gantry.  I want to move the nail guns with minimal user input to accomodate all (reasonable) pallet sizes up to a maximum of 14' long by 6' wide.  The VB script I have written for this works.  I am proud of my effort and shared it with my wife, father in law, and son, none of which were nearly as enthusiastic as I.  For me it was a huge victory.  I would like to share it with folks that can appreciate the effort, but being that there is more than one way to skin a cat and my way is probably not as efficient or pretty as others I may wait to do so.

Anyway, I'll be asking for help from time to time, contribute where possible, and hope to make some new frinds along the way.

Sincerely, Chuck

Pages: 1