Hello Guest it is April 28, 2024, 08:31:48 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

901
Mach4 General Discussion / Having trouble with Lua Script
« on: April 21, 2015, 05:46:06 PM »
I am having trouble finding examples and syntax for LUA that goes with Mach 4.  Initially I need to know how to turn on outputs via macros.
here is an example from VB Script.  Can anyone help me translate this to LUA and if they have time explain it a little bit?
Thanks!!
-Chad

REM M1000 Clamp
DeActivateSignal (output4) 'Turns off the solenoid that unclamps.
ActivateSignal (output3)   'Turns on the solenoid that clamps.

REM Waits for the cylinder to reach the switch.
While Not IsActive (OEMTRIG2)
     Message ("I'm trying to clamp the tip")
     Sleep 10
Wend

REM Once the cylinder is forward it gives the "made it" message.
Message ("Made it")

902
I don't have my encoder switches in yet, I just hooked in an MPG to test this.  With the MPG it goes from 100% down To 0% and moves from 0 - 1 % but doesn't do anything else.  It does this with the SSO and the FRO.  Do I need to have my calibration set differently and/or do I need to wait for those encoder switches to get here.  I have the calibration set to 1.000 Count and velocity to 100.00

903
Awesome!  I'll give it a try tomorrow! Thanks!
Chad

904
How did you write your brain to control the feedrate with this encoder switch?

905
Hello All!!
My name is Chad.  I am a man of few words.  So, in short, We have been using Mach 3 for several years and just recently have had the opportunity to really dig into more features of it.  I find this forum to be extremely helpful and am glad so many people put their input into problems. 

906
Brains Development / Re: How to run a Brain triggered Macro.........
« on: September 02, 2014, 04:48:41 PM »
I've done everything in this to run a via the brain.  It still is not working for me.  I've checked the syntax in my macro to set the trigger macro to make sure it wasn't spelled wrong.  I even went through the OEMTriggers in the hotkeys and set them to 301 which runs the triggered macro.  I'm using a switch to change my jog % to a UserDRO # fast or slow.  My switch, left or right, is set to OEMTrigger 1 & 2.  I've got it in my brain set as follows.  OEMTrigger1 --> NOP --> Terminate 1034 (Execute button script).  Just like it says to do in the post.  Still Nothing.  ANY SUGGESTIONS!!??

907
General Mach Discussion / Re: Spindle won't stay on.
« on: August 29, 2014, 03:24:07 PM »
Figured it out.  There was a switch/input on the VFD that was in conflict with a brain that I am using for alarms/faults. 
Also, for others who may be having problems, I was putting a number in my Spindle just to be sure that it was going as fast as it could, S8000, and even with the brain disabled it didn't want to work properly, I.E. it still shut off as soon as it came on.   So I used S 550 and it worked.  Then I found out it was in the brain. 

908
General Mach Discussion / Spindle won't stay on.
« on: August 29, 2014, 12:07:16 PM »
So I'm almost done with retrofitting an OD Grinder to CNC.  I'm using a C6 Speed Control Board and a VFD to control the speed of the headstock.  I had it working great and came in this morning and the spindle will not stay on.  I'll hit the spindle toggle and it comes on for about a half second and shuts off.  I've looked in all my configs and nothing has changed from the day before.  Any Suggestions??? 
--Chad