Hello Guest it is March 28, 2024, 06:15:38 PM

Author Topic: OEM codes for buttons, DRO's and LED's  (Read 195908 times)

0 Members and 1 Guest are viewing this topic.

Offline Quin

*
  •  34 34
    • View Profile
Re: OEM codes for buttons, DRO's and LED's
« Reply #40 on: December 19, 2013, 05:52:11 PM »
Thanks Bret,  I now have a handle on DRO's that have been used.

Now a second question:  I would like to attach some code to the E-Stop/reset button that would be used to initialize another button.  I can't find a way to do it in Screen designer.  Any ideas?  

Quin

Offline Chaoticone

*
  • *
  •  5,624 5,624
  • Precision Chaos
    • View Profile
Re: OEM codes for buttons, DRO's and LED's
« Reply #41 on: December 19, 2013, 06:21:54 PM »
That's a bit tricky. The reset button kills everything else, script and all so.......... you will have to think about that. Give us some more details if you can.

Brett 
;D If you could see the things I have in my head, you would be laughing too. ;D

My guard dog is not what you need to worry about!

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: OEM codes for buttons, DRO's and LED's
« Reply #42 on: December 19, 2013, 06:22:17 PM »
Just change it to a VB button then add your code once back in Mach by using the Operator then Edit Button Scripts option.
Hood

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: OEM codes for buttons, DRO's and LED's
« Reply #43 on: December 19, 2013, 06:24:08 PM »
See Bretts answered but personally dontt think it will be a problem if done right, did that on a few of my screenets and it worked fine.
Hood

Offline Quin

*
  •  34 34
    • View Profile
Re: OEM codes for buttons, DRO's and LED's
« Reply #44 on: December 22, 2013, 11:02:55 AM »
Hi Bret,
Attached is the scrip for my button that incrementally adds .010” to the Z work offset.

The processing LED (1214) is used to prevent clicking the button while the scrip is processing.  The loops slow down the script execution.  Without these features, if the operator clicks too rapidly DRO 49 will not reliably register the increment.

Here is the problem I am trying to solve.  If the operator exits Mach3 without canceling, DRO (1006) will retain its value.  Upon restarting the retained value will be shown but DRO49 will have been automatically set to it’s original work offset table value.  If he runs a part program under these conditions he will be cutting at finish dimension rather than at the added value shown in DRO(1006).

Also the message box that Mach3 presents on exiting: “Save fixture settings?” can be confusing.

What I would like to do either on exiting or opening Mach3 is to:  Set DRO(1006) to zero and set DRO(49) to the DRO(1011) value.  How can I do this?

Offline Chaoticone

*
  • *
  •  5,624 5,624
  • Precision Chaos
    • View Profile
Re: OEM codes for buttons, DRO's and LED's
« Reply #45 on: December 22, 2013, 01:21:31 PM »
No way to do it on exit that I know of. You could add your functions to a custom macro and add that to the initialization string in general config. When you launch Mach it will run the initialization string. Optionally you can set the initialization string to run on each reset.

Brett
;D If you could see the things I have in my head, you would be laughing too. ;D

My guard dog is not what you need to worry about!

Offline Quin

*
  •  34 34
    • View Profile
Re: OEM codes for buttons, DRO's and LED's
« Reply #46 on: December 22, 2013, 05:11:48 PM »
Hi Brett,
 How do I find the initialization string?  I prefer to do it on launch.  As you can see I'm rather green on programming.

Thanks,
Quin

Offline Chaoticone

*
  • *
  •  5,624 5,624
  • Precision Chaos
    • View Profile
Re: OEM codes for buttons, DRO's and LED's
« Reply #47 on: December 22, 2013, 05:30:38 PM »
Quote
initialization string in general config

Add your code in the VB script editor and save as M1000.m1s in your profiles macro folder. Then add M1000 to the initialization string.

These links should help if you haven't got them already.

http://www.machsupport.com/wp-content/uploads/2013/02/Mach3_V3.x_Macro_Prog_Ref.pdf

http://www.machsupport.com/wp-content/uploads/2013/02/VBScript_Commands.pdf

Brett

« Last Edit: December 22, 2013, 05:37:42 PM by Chaoticone »
;D If you could see the things I have in my head, you would be laughing too. ;D

My guard dog is not what you need to worry about!

Offline Quin

*
  •  34 34
    • View Profile
Re: OEM codes for buttons, DRO's and LED's
« Reply #48 on: December 22, 2013, 09:07:00 PM »
As I understand your suggestion:
Write a macro (M1000.m1s) and save it in Mach3>macros>Mach3mill.  Now in what file do I find the "initialization string"?  You mention it being in "general config"??  IF its covered in the program ref doc, a page #i would be helpful.  Thanks.

Quin
Re: OEM codes for buttons, DRO's and LED's
« Reply #49 on: December 24, 2013, 12:58:52 AM »
Have recently completed my router with 2 steppers on the X axis. One moter wired in reverse (a axis) and slaved to X. Homing switches are set up on each individual axis.
Problem (1) is that machine homes on every axis but does not reverse off each switch, and problem (2)is after homing the x axis it will not run in the correct direction when jogged by the arrowed keys. After I have reversed the X axis motors to allow jogging in the correct direction the x axis will then not Home in the correct direction.  Hope someone can help Thanks Humbuk