Hello Guest it is April 18, 2024, 05:48:18 AM

Author Topic: Is there an OEM code for CCW spindle?  (Read 5472 times)

0 Members and 1 Guest are viewing this topic.

Offline Tarak

*
  •  229 229
    • View Profile
Is there an OEM code for CCW spindle?
« on: September 09, 2006, 07:30:09 PM »
I want to have both a button and an LED for CW and CCW, I just can't quite get them to work.
« Last Edit: September 09, 2006, 07:48:55 PM by Darc »

Offline Chip

*
  • *
  •  2,055 2,055
  • Gainesville Florida USA
    • View Profile
Re: Is there an OEM code for CCW spindle?
« Reply #1 on: September 12, 2006, 02:20:41 AM »
Hi, Darc

Under Config, Port's Pins, Spindle Setup, uncheck Disable Spindle Relays, find and set Output # you want to use for CCW spindle, use it below to replace the output 6 or10  below.

Hear's how I add a button and Led with script and Screen 4.

Add a button to the Diagnostics screen so you can see it work, then
double click on it, sel. G-code function .

In the window Type m906 (I used a non defined m-number hear just sem's
easer than the VB Script edit in Mach3 function I'm new at this also).
Add button / add label text in window, hit OK.

Exit Screen4 and run Mach3, select Operator, Open VB Script Editor,
copy below and save it as m906 in the Mach3\Macro\Mill Sub-Drictory.

If IsOutputActive( OUTPUT6 ) Then
DeActivateSignal( OUTPUT6 )
Else
ActivateSignal( OUTPUT6)
End If

Now Config, Port's/Pin's, Output/Signal, Output #6, Enabled, Checked,
port 1, Pin, 14, Apply, Ok

Should turn Output 6 Led and output to Pin 14 now.

Try tiis one add a Button and Led, conf. Led as Oem Code Function 1000.

If IsOutputActive( OUTPUT10 ) Then
DeActivateSignal( OUTPUT10 )
Setuserled (1000,0)
Else
ActivateSignal( OUTPUT10)
Setuserled (1000, 1)
End If

Config, Port/pin's Output, to 10, Enable, Port 1, Pin 16 or whatever pin you want.

Hope this help's, Chip


Darc, hear is a way to add  a new button that can be edited in Mach3 1.90  by John Prentice

Load the screenset you have designed in Mach3. Go to the screen with
the button that needs a script or an edit to its script.

Click Config>Edit Button Script. The Script button captions will flash.
Click the one you want to edit.

The Script Editor window will open. Edit and test run your script. As
for a Save when you exit the editor.

Note that this does *not* currently save the script back into the .SET.
This must be done by the View>Save Current Layout menu item.

Be aware of a big Gotcha if you work switching between Mach3 and
Screen4. Screen4 notices that Mach3 has changed the .SET and prompts
for you to reload the latest version. Mach3 does not notice Screen4 has
saved a .SET sot if you do not relad in Mach3 and then Save in Mach3
you lose your S4 work - Art has it on his (every expanding) list.

John Prentice

With any luck this may help you if not let me now No expert hear,

Hope this help's, Chip
« Last Edit: September 12, 2006, 02:48:43 AM by afn09556 »
Re: Is there an OEM code for CCW spindle?
« Reply #2 on: September 12, 2006, 11:32:10 AM »
All you need to do is put DoSpinForward() and so on... you can see the calls in the m3-4-5 macros :) as for the LED's I think there are OEM numbers for them in mach 3...

I will look..

164 and 165 should get you the LED's that you need :)
Fixing problems one post at a time ;)

www.newfangledsolutions.com
www.machsupport.com