Hello Guest it is April 26, 2024, 10:47:29 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 - RDilworth

Pages: 1
1
VB and the development of wizards / Re: M3 and M5 not working
« on: June 12, 2012, 07:07:42 AM »
Thanks for your help. I finally got a chance to get out to the shop last night and give this a try. I had to go with a slightly different approach, but it worked great. I really appreciate the guidance.

2
VB and the development of wizards / Re: M3 and M5 not working
« on: June 09, 2012, 10:50:36 AM »
OK, so how do I do that? Do I call the macro at the end of the Gcode by using a custom M code? If I do I won't have to use a loop, just check the input and issue a cycle start if the input is active.

If I do it this way, I will have to issue a M30 from the macro in order to close and rewind the current Gcode program before issuing a cycle start.

Am I on the right track or is there a better way?

Thanks for you help.

3
VB and the development of wizards / Re: M3 and M5 not working
« on: June 05, 2012, 09:03:45 PM »
As I said it's a small program.



Do
DoOEMButton(1000)

While IsMoving()
Sleep(200)
Wend

Loop While IsActive(Input4)
End

4
VB and the development of wizards / M3 and M5 not working
« on: June 04, 2012, 10:25:15 AM »
I have a small VB program assigned to a button that does a cycle start [DoOEMButton(1000)] and runs a Gcode file already loaded into Mach. Once the Gcode run is finished the VB code checks an input and if it is active, it loops back and does another cycle start. The issue is: when I run the Gcode manually (click on the cycle start button) everything works as it should, however when the cycle start comes from the VB code the M3 (spindle on) and M5 (spindle off) functions do not work. Any ideas?

5
General Mach Discussion / Re: Set focus to DRO question
« on: December 10, 2009, 11:15:08 AM »
Well, I figured out another way to accomplish the same thing by using an Inputbox call in VB. I elimanated the extra DRO and will use the Inputbox to supply the number for the X axis movement. This way I can do a loop at the end of the code and it will display the Inputbox automatically without any user input.

The sequence will now be like this; press the hotkey assigned to the button with the VB code, the Inputbox pops up asking for a measurement, type the number and press enter, the Inputbox dissapears and the movement starts, once the movement is complete the Inputbox appears again.

I also assigned a certain input (000) that will exit the code when you need to do something else.

Thanks for considering my problem.
Rob

6
General Mach Discussion / Set focus to DRO question
« on: December 08, 2009, 11:34:40 AM »
I am setting up a simple Mach screen to control one axis (X). I set up a USERDRO(1249) to enter the measurement in inches I want the axis to move to. I have a button on the screen with some VB code that generates the g-code necessary for the move. At the end of the VB code I have a KeyPress command that uses the hotkey I assigned to the DRO so the focus goes back to the DRO when the movement is finished. Everything worked great on my laptop, but I want to use a keypad controler that plugs into a USB port. The keypad controller works if I use it to assign the hotkeys, but then the VB code doesn't work. The reason being that the keypad controller uses a different hotkey code than the actual keyboard. For example, if I assign the '+' key on the keypad as the hotkey the KeyPress code in the VB script doesn't work if you use a '+'.
Is there a way to use the actual hotkey code in a KeyPress command or is there another way I don't know about to send the focus back to the DRO using a VB script.

Thanks in advance,
Rob

Pages: 1