Hello Guest it is June 04, 2024, 12:16:44 AM

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 - Cbyrdtopper

391
Mach4 General Discussion / Re: Add or edit Mach4 Lathe screen
« on: November 19, 2018, 09:43:57 AM »
You will put it inside the Reset Button.
Same as you enter in the PLC or Screen Load, it is in the second tab in the feature box.
There will be some script already in the button, just add this at the bottom of it.

Mach4, like anything new, requires patience and time to get an understanding of it.
I had no idea how to do anything in Mach4 when it first came out; I took time to learn it and understand what things did and how it all worked, there are still things I don't know how to do, but I will learn them.

392
Mach4 General Discussion / Re: Spindle Accel/Decel wait times scale??
« on: November 18, 2018, 03:06:32 PM »
As far as waiting for the spindle to stop for your ATC... does your VFD have an output for Spindle at Zero Speed?  If so, you can add an mc call (I don't remember exactly what it is, mc.mcSignalWait or similar) that waits for a signal before moving on in your m6.

393
Mach4 General Discussion / Re: Add or edit Mach4 Lathe screen
« on: November 18, 2018, 03:01:31 PM »
No, it is not a bug.  That is how Artsoft set it up in the default system.
I always add stuff to the Reset Button.
I actually add a Reset Function to the Screen Load script called "Reset()"  I have a physical button on a control panel that I use as a Reset Button; then I put everything in this function that I want to happen when I hit the Reset Button.  
Things like Turning off the Coolant, Mist, Stacklights, Etc...
But you can just add some script to the Reset Button.
To turn off the coolant use this script (Check the syntax and the mc call, I'm out of Mach4 right now, but I think this is right.)

local Coolant = mc.mcSignalGetHandle (inst, mc.OSIG_COOLANT)
mc.mcSignalSetState (Coolant, 0)

394
Mach4 General Discussion / Re: Add or edit Mach4 Lathe screen
« on: November 14, 2018, 04:45:05 PM »
Awesome! Glad you got it working!
=)

395
Mach4 General Discussion / Re: Add or edit Mach4 Lathe screen
« on: November 14, 2018, 11:01:27 AM »
Hmm..
Try and take the code out of the PLC Script to see if you are still getting the error. 
I moved my code to the top of the PLC script to be sure it was still working; it is.


396
Mach4 General Discussion / Re: Add or edit Mach4 Lathe screen
« on: November 12, 2018, 01:36:50 PM »
That's the exact code I've got in my PLC script and it is working fine.
Did you put it at the end to make sure it isn't inside another bit of code?

397
Mach4 General Discussion / Re: Add or edit Mach4 Lathe screen
« on: November 12, 2018, 11:18:26 AM »
Sorry for the delay in response.
Make sure you put custom code towards the end of the PLC script.
That way you don't put it inside another section of code.
Also be sure that the comments have the "--" in front of them.  That makes it a comment in LUA.

I forgot you want this to sound during your tool change. 
You can still put this in your PLC Script.  But now, you will need to get the handle of the Tool Change Output.
When the Tool Change Output is active, play the sound.
I will see if I can get this to work on my computer in the sim and post my findings.

398
Mach4 General Discussion / Re: Add or edit Mach4 Lathe screen
« on: November 09, 2018, 02:46:32 PM »
RT,
So... snd:Play()   plays the sound.   
Does it play the file once and stop?

399
Mach4 General Discussion / Re: Add or edit Mach4 Lathe screen
« on: November 09, 2018, 10:34:25 AM »
You can have your Rapid Rate Override set to 25% in the PLC script on start up.
Put this code in the PLC Script from the screen editor.


--Featured added 11-9-18
--Set RRO to 25% on start up
if testcount == 1 then
    mc.mcCntlSetRRO(inst, 25)
end


As far as playing a tone off the computer through speakers, I'm not sure, someone else would need to help you with that.

But, I have Stack Lights that have buzzers integrated in them on our machines here at the shop, you can use the "Tool Change" output in the mach configuration and map it to a relay that runs a buzzer or beeper.  You can get simple buzzers on ebay or places like Automationdirect.com. 

400
Mach4 General Discussion / Re: Spindle speed buttons
« on: November 08, 2018, 05:29:39 PM »
Whatever spindle speed you command in G Code will be the RPM at 100% Spindle Override.
So when you post your G Code, just be sure that RPM is set to 12,000. 
Will that always be what you want your Spindle RPM to be set at?