Author Topic: Editing MACH 3 Screen Sets  (Read 445 times)

Offline awemawson

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4947
  • Country: gb
  • East Sussex, UK
Editing MACH 3 Screen Sets
« on: February 04, 2017, 05:48:06 AM »
Do we have any MACH 3 experts lurking on the forum ?

I have MACH 3 running my plasma table - working well - it has customised screen sets designed by Purelogic (Russian outfit) tailored for the ethernet driven Torch Height controller.

On the screen is a button to enable or dis-able the torch height controller and it defaults to 'disabled' and thus displays Red. All I want to do it make it default to 'Enabled' and thus display in Green. As you might surmise I keep forgetting to enable it, and yesterday that cost me a set of torch consumables  :bang:

I'd imagine that somewhere a variable is declared as a binary value and given a starting state, but I've down loaded one MACH 3 screen editor (Machscreen C 1.66 by K. Dietz) and cannot relate the screen button / led to any code.

Any help would be appreciated . . .   :scratch:

Andrew Mawson
East Sussex

Offline PK

  • Full Member
  • ***
  • Posts: 213
  • Country: au
Re: Editing MACH 3 Screen Sets
« Reply #1 on: February 04, 2017, 08:11:25 AM »
It might just be as simple as running a custom M script on startup?
In any case I've pulled mach3 to bits and made it do unwholesome things for a number of occasions.
PK

Offline awemawson

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4947
  • Country: gb
  • East Sussex, UK
Re: Editing MACH 3 Screen Sets
« Reply #2 on: February 04, 2017, 09:14:35 AM »
PK many thanks for the offer of help – rar on the way as an email – I hope it gets through as 37 mB !

The profile is “PLPLASMA” so I kick off ‘Mach3loader’ which lets you choose a profile, then I select ‘PLPlasma’ which brings up the customised screens.

There is a button labelled ‘THC enabled’ which starts off red (disabled) and can be toggled on by a mouse click. I want it to default ‘On’ at start up.

There is a custom macro M905.m1s in the mach3\macros\plplasma\ directory which will toggle the value, and looking at it, it is using ‘DoOEMButton(123)’ which looks to be a standard Mach3 defined button, but I want to specifically set it on – no use toggling when you don’t know the starting point !

I very much appreciate your assistance.

Andrew
Andrew Mawson
East Sussex

Offline Biggles

  • Full Member
  • ***
  • Posts: 152
  • Country: gb
Re: Editing MACH 3 Screen Sets
« Reply #3 on: February 04, 2017, 02:27:36 PM »
It is Russian; you can have any colour you like, as long as it’s Red.  :doh:

Offline awemawson

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4947
  • Country: gb
  • East Sussex, UK
Re: Editing MACH 3 Screen Sets
« Reply #4 on: February 04, 2017, 02:36:21 PM »
 :lol: :lol: :lol: :lol:
Andrew Mawson
East Sussex

Offline PK

  • Full Member
  • ***
  • Posts: 213
  • Country: au
Re: Editing MACH 3 Screen Sets
« Reply #5 on: February 05, 2017, 01:34:17 AM »
So the best way to do this is to get Mach3 to enable THC when it starts or when it resets.
This is a little hard for me to test because I can't get Mach3 to come out of reset. But it does work on another setup I lashed up for testing

Make a file called M1001.m1s in Mach3/macros/PLPlasma and put this in it.

If GetOEMLED(24) = 0 Then
   DoOEMButton(123)
End If

make sure you have a carriage return and a blank line at the end.
Restart Mach3 and go to config->general config

add M1001 to the end of the init string.
restart mach3


Offline awemawson

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4947
  • Country: gb
  • East Sussex, UK
Re: Editing MACH 3 Screen Sets
« Reply #6 on: February 05, 2017, 02:45:59 AM »
PK thank you so much. I'll give it a whirl when I escape to the work shop !

Andrew Mawson
East Sussex

Offline awemawson

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4947
  • Country: gb
  • East Sussex, UK
Re: Editing MACH 3 Screen Sets
« Reply #7 on: February 05, 2017, 03:37:57 AM »
PK,

Tested and works a treat, many thanks  :thumbup:

I think I'll add M1001 to my post processor string as well
Andrew Mawson
East Sussex

Offline PK

  • Full Member
  • ***
  • Posts: 213
  • Country: au
Re: Editing MACH 3 Screen Sets
« Reply #8 on: February 05, 2017, 06:27:31 AM »
Mach3 scripting seems a little arcane, but it's mostly about knowing what those OEMLED, DRO and CODE numbers are.. 
All of that information is concealed here http://www.machsupport.com/Mach3Wiki/index.php?title=Main_Page

Otherwise it's pretty standard basic script.
PK

Offline awemawson

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4947
  • Country: gb
  • East Sussex, UK
Re: Editing MACH 3 Screen Sets
« Reply #9 on: February 05, 2017, 06:37:50 AM »
PK, I'd found that document and had tried a custom Macro file before you kindly helped, but I hadn't realised the need for a blank line after the code and was getting compile errors  :bang:

(ps please destroy the .lic file on the zip I sent you - it's an old one from the chap I bought the table from, so unfair to spread it around  :bugeye: )
Andrew Mawson
East Sussex

Offline PK

  • Full Member
  • ***
  • Posts: 213
  • Country: au
Re: Editing MACH 3 Screen Sets
« Reply #10 on: February 05, 2017, 06:54:27 AM »
(ps please destroy the .lic file on the zip I sent you - it's an old one from the chap I bought the table from, so unfair to spread it around  :bugeye: )
Done

Offline awemawson

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4947
  • Country: gb
  • East Sussex, UK
Re: Editing MACH 3 Screen Sets
« Reply #11 on: February 05, 2017, 07:09:16 AM »
 :thumbup:
Andrew Mawson
East Sussex