Hello Guest it is April 28, 2024, 11:51:33 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 - Bill_O

551
General Mach Discussion / Re: loading and running 2 files
« on: March 20, 2009, 12:21:18 PM »
Scott,
Just a couple of small corrections. Very good figuring it all out. The sleep times may be able to be shortened but if they are to short it will not work. Of course  the buttons, leds, dros and the userlabels need to be in the screenset.

Load Button

If GetUserLED (1110) = 1 Then       'The I wanna use a dual Gcode LED I have a button that turns this on and off
DoOEMButton (216)                       ' Opens window to select file to 1st file to load - second file that will be cut
While IsLoading()
Wend
cutfile = (FileName())                     
SetUserLabel (2,cutfile)                   'Sets second userlabel to file just opened
DoOEMButton (216)                       ' Opens window to select file to 2nd file to load - first file that will be cut
While IsLoading()
Wend
camerafile = (FileName())
SetUserLabel (1,camerafile)              'Sets first userlabel to file just opened
Else                                              'only opening the cut file This is so you can run normally
DoOEMButton (216)
While IsLoading()
Wend
cutfile = (FileName())
SetUserLabel (2,cutfile)                   'Sets second userlabel to file just opened
camerafile = "None"
SetUserLabel (1,camerafile)              'Sets first userlabel to read None
End If

Run Button

If GetUserLED (1110) = 1 Then           'The I wanna use a dual Gcode LED I have a button that turns this on and off
   If GetUserLED (1112) = 0 Then      'If I am not running the 2nd file LED
      SetUserLED (1111,1)      'I am running the 1st file LED
      camerafile = GetUserLabel(1)   'file name from load code
      LoadFile (camerafile)      'load the camera file
      While IsLoading()
      Wend
      Sleep (1000)
      DoButton (0)      'Cycle Start
      While IsMoving()
      Sleep (2000)
      Wend
      Sleep (5000)
      SetUserLED (1111,0)      '1st file finished LED off
      SetUserLED (1112,1)      '2nd file to run LED
      Sleep (100)
   End If
   If GetUserLED (1112) = 1 Then      'if run 2nd file LED is on
      cutfile = GetUserLabel(2)   'file name from load code
      LoadFile (cutfile)      'load 2nd file cut file
      While IsLoading()
      Wend
      Sleep (1000)
      DoButton (0)      'Cycle Start
      While IsMoving()
      Sleep (2000)
      Wend
      Sleep (5000)
      SetUserLED (1112,0)      '2nd file done turn off LED
      Sleep (100)
   End If
Else
   SetUserLED (1112,1)          'only running the cut file This is so you can run normally
   Sleep (1000)
   DoButton (0)         'Cycle Start
   While IsMoving()
   Sleep (2000)
   Wend
   Sleep (5000)
   SetUserLED (1112,0)         'done running the cut file
End If

552
General Mach Discussion / loading and running 2 files
« on: March 19, 2009, 05:52:36 PM »
Below is my code for opening then running 2 g-code files. The Run Button code will run either 2 or 1 depending on led#1110. I hope someone can find it useful.
Bill

Load Button

If GetUserLED (1110) = 1 Then
DoOEMButton (216)
While IsLoading()
Wend
cutfile = (FileName())
SetUserLabel (2,cutfile)
DoOEMButton (216)
While IsLoading()
Wend
camerafile = (FileName())
SetUserLabel (1,camerafile)
Else
DoOEMButton (216)
While IsLoading()
Wend
cutfile = (FileName())
SetUserLabel (2,cutfile)
camerafile = "None"
SetUserLabel (1,camerafile)
End If 



Run Button

If GetUserLED (1110) = 1 Then
If GetUserLED (1112) = 0 Then
SetUserLED (1111,1)
camerafile = GetUserLabel(1)
LoadFile (camerafile)
While IsLoading()
Wend
Sleep (1000)
DoButton (0)
While IsMoving()
Sleep (2000)
Wend
Sleep (5000)
SetUserLED (1111,0)
SetUserLED (1112,1)
Sleep (100)
End If
If GetUserLED (1112) = 1 Then
cutfile = GetUserLabel(2)
LoadFile (cutfile)
While IsLoading()
Wend
Sleep (1000)
DoButton (0)
While IsMoving()
Sleep (2000)
Wend
Sleep (5000)
SetUserLED (1112,0)
Sleep (100)
End If
Else
SetUserLED (1112,1)
Sleep (1000)
DoButton (0)
While IsMoving()
Sleep (2000)
Wend
Sleep (5000)
SetUserLED (1112,0)
End If

553
General Mach Discussion / combining 2 g code files
« on: March 18, 2009, 08:53:42 AM »
I have 2 g code files that I want to combine together in Mach. What would be the
easiest way? The names will always change and I am using User Labels to store
the names.
Bill

554
Works in progress / Re: First try at a Screen
« on: March 18, 2009, 08:25:27 AM »
Sam,
I do not know about the rest but go to Config\Ports and Pins and click on the Input Signals tab. If you have limit switches for the homing turn on the Home switches for that axis.
Bill

555
Works in progress / Re: First try at a Screen
« on: March 17, 2009, 09:03:03 AM »
Very nice. Good job.
Bill

556
General Mach Discussion / anyone needing Mach help
« on: March 17, 2009, 09:00:27 AM »
Yesterday PoppaBear, Scott, came to help me with a problem I was having with TCP
Modbus and Mach. Does he know his Mach. In about 15 minutes he had it working.
The rest of the day he showed me some other things in Mach and helped on some
other questions I had. I recommend his services to anyone needing help.
Bill

557
PoKeys / Re: potentiometer voltage
« on: March 05, 2009, 02:25:39 PM »
Boris,
So if I use the 5v from the pokeys instead of the 3.3v it will not blow up my pokeys or pc?
Bill

558
PoKeys / potentiometer voltage
« on: March 05, 2009, 01:14:12 PM »
Can the voltage for pots be 5 instead of 3.3?
I want to use a hall effect joystick and they only work with 5.
Bill

559
PoKeys / how many pokeys
« on: March 04, 2009, 03:24:25 PM »
How many pokeys can I use with Mach?
Bill

560
PoKeys / how many pots
« on: March 04, 2009, 03:23:16 PM »
How many pots can I actually use with the pokeys and mach?
Bill