Hello Guest it is March 28, 2024, 08:38:27 AM

Author Topic: Mach3 Output 6 and 7  (Read 8673 times)

0 Members and 1 Guest are viewing this topic.

Mach3 Output 6 and 7
« on: November 09, 2015, 11:01:43 PM »
Hello all I am new to the forum.  I have a G0704 Mill converted to CNC.  I am running a  C32 board, an ESS (smooth stepper), C52 board, C3 bob, C27 for limit switches, 4 G203V drivers.  I just added a the 4th axis to start working on an ATC unit along with A power draw bar.  I have 5 solid state relays in the control box as well.  Relay 1 runs my coolant pump which is 110V, Relay 2 runs an air valve (110V) for the future ATC tool carousel air cylinder, Relay 3 runs the 110V air vavle for the Power draw bar, Relay 4 will run another air vavle (110V) for a blast of air to clean the tools in the carousel.  The 5th realay is not dedicated to any device just yet, but I am sure it will be.

How can I add output 7 LED to the Diagnostics Tab in Mach3?  I would like to see the light on that page flashing to see if it works.  I cant make output 6 light up either but not sure why.  I know the relays work because I used the coolant mist M7 to check the relays and I get power to the plugs.

Any help for this newbie would be good.

Thanks,

Re: Mach3 Output 6 and 7
« Reply #1 on: November 10, 2015, 02:41:26 AM »
>>>How can I add output 7 LED to the Diagnostics Tab in Mach3?

Use a screen editor... I use "Machscreen" available from the "downloads" dropdown here: http://www.kd-dietz.com/klausphp/pages/eng/machscreen/description/ms_description.html

When you start the program you will have a "MachScreen Properties" floating tab that appears on the RHS.

First select the "page" you want from the dropdown list / menu

Then little bit further down that page, next to the "add control" button select "LED" from the dropdown and then click "Add Control"

Then click somewhere on the screen where you want to add it.

Then whilst still having the LED selected / highlighted, look on the floating screen and at the bottom of the floating screen is a number of options

Then where is says "function" click on the bit of text next to it (probably says"reset" and scroll down to "OEM Output 6 Active LED"  [they are alphabetical]

You can then move, scale etc the LED... you can also change the LED's colour change state / blink status by adjusting the properties in the floating tab.


>>> I cant make output 6 light up either but not sure why.
Have you assigned the pin under ports and pins?....   how are you turning output 6 on and off.... are you using an "M" code... you may need to create a script...
In Mach3.... go to the "operator" menu.... select "VB Editor".

Then add the following text....

ActivateSignal(OUTPUT6)

Save the file as say "M1061.m1s"

Then create another macro... and add the following text ....

DeactivateSignal(OUTPUT6)

Save the file as say "M1060.m1s" 

[the "theory behind the numbering is .... greater than 1000 m codes are custom / user codes... the "6" is for output 6 and the "1" or "0" indicates if you want the port "on" or "off"]

......
useful manual here (DROs and LED refs are at the rear):
http://www.machsupport.com/wp-content/uploads/2013/02/Mach3_V3.x_Macro_Prog_Ref.pdf

And another one with the full command set of Cypress (not just Mach3 specific items):
http://www.machsupport.com/wp-content/uploads/2013/02/VBScript_Commands.pdf

Rob
Rob

Albert Einstein ― “If you can't explain it to a six year old, you don't understand it yourself.”
Re: Mach3 Output 6 and 7
« Reply #2 on: November 10, 2015, 08:53:09 AM »
Rob Thanks a lot!  I will check do what you have suggested.  You gave a me a very clear suggestion which I can understand.  I will give it a shot and see how it goes.
Re: Mach3 Output 6 and 7
« Reply #3 on: November 10, 2015, 09:00:23 AM »
No problem,

...forgot to add...

You will need to add the m codes to your gcode to toggle the outputs when you want them.

Note all mcodes except m10/m11 will cause a slight hesitation in the machine because of the way Mach recites scripts.


What is the machine for?

If you go to the midi screen you can type in the mcodes and test they work as intended (once you've set it all up)

Rob
Rob

Albert Einstein ― “If you can't explain it to a six year old, you don't understand it yourself.”
Re: Mach3 Output 6 and 7
« Reply #4 on: November 10, 2015, 09:46:18 AM »
Rob thanks for the info.  I am new to all this so going to take me a few tries to get this down.  The machine is going to be used to make parts for my jet ski, Parts for upgrading the G0704, and fior what ever else crosses my mind.  I will give all the new stuff you have given me a try and see what I come up with. 

Thanks,

Jeff
Re: Mach3 Output 6 and 7
« Reply #5 on: November 10, 2015, 10:37:15 AM »
Rob, how do i make a LED output 7?  I dont see that in the drop down menu as an option.  I am wanting to add output LED 7 to the Diagnostics page 5 in Mach.
Re: Mach3 Output 6 and 7
« Reply #6 on: November 10, 2015, 05:27:14 PM »
.... I have tried this and it did not work for me.... but you may be able to get it to work....

You can either use "brains" or a "macropump".....

Basically create two more macros (M1070 and M1071) same as the others but change the outputs from 6 to 7.

So you can toggle output 7 with an M code.

Then in the screen editor .... create an LED.... but where it says "standard code" .... change it to "1070" ..... this will then look for "UserLED(1070)"

Now you have a choice... brains or macropump....

If using brains.... attached is a Brains file....


Note .... I could not get my macropump to work (hence my code may be wrong).. or you could just use the brains file (note you will have to enable the brain to get it to run...).

Rob
Rob

Albert Einstein ― “If you can't explain it to a six year old, you don't understand it yourself.”
Re: Mach3 Output 6 and 7
« Reply #7 on: November 10, 2015, 06:31:30 PM »
Rob I got the relays working by making output 7 and 8 as a Macro.  For some reason I cannot make the red LED flash on the screen like I can 1, 2 ,and 3.  I also for some reason cannot make OUPUT6 work at all.  Says Output6 is Mcode 79.  So not sure how to make ouput6 work.  I used the VBscript like you said adn worked but not for 6.  Output7 I used a reserve 32 i believe.
Re: Mach3 Output 6 and 7
« Reply #8 on: November 11, 2015, 01:49:47 AM »
Rob,  I got the Diagnostics screen to say output 7 and output 8 and both relays that I wanted to work.   I type  M1071 in the midi and relay 7 turns on.  M1070 and the relay turns off, works the same way for relay 8.  I was not able to make OUTPUT 6 work at all.  I am not sure why it would not let me assign something to it.  I tried everything I could to make it work.  Oh well I just skipped it and made OUTPUT 7 and 8.

Thanks for your help!  Your instructions were very clear and concise.  I still would like the LED to flash but for some reason they don't lite up when the output is active.  I will have to figure that out.
Re: Mach3 Output 6 and 7
« Reply #9 on: November 11, 2015, 02:26:13 AM »
I don't know why output 6 will not work. 

I dont know where you got M79 = output6 or "reserve 32 = output7".... sorry I don't understand that.

But at least in the end you got output 7 & 8 to work as M1070/M1071 & M1080/M1081.

In order to get an LED to display you will need to create a UserLED... there are no predefined LED's assigned to output 7 or 8.

The easiest way is to create a "brain".

In Mach3, go to "Operator" (top line), then go to "Brain Editor..."

It will popup asking for a name... choose anything like "OP78LED"

A Blank screen will appear....

On the top line you will see a black "+", click on that....

Select "Outputs"....

On the dropdown select "Output 7", then click "Ok"....

Then click on the screen where a box appeared saying "Output 7" ..... it will go Green.

Then click the black "+" again...

Then click "ok" .....

Then click on the screen where the box appeared saying "No Operation - Signal Pass".....

Then click on the Green Upside Down "T" (on the top line.... next to the + and - )....

Then click "UserLED's" .....

When the popup arrives .... select the checkbox that says "Use Led Number" .... and type in "1070" in the text box ....... then click "Ok"

You have now created an UserLED with the number 1070...

Repeat the process by clicking on the Green "+" and add and select "Outputs" ..... [and start again from above where it says "outputs" ..... call this LED "1080" when you get to the bottom]


... save changes and exit "Brain Editor...."

Rob




Rob

Albert Einstein ― “If you can't explain it to a six year old, you don't understand it yourself.”