Hello Guest it is April 27, 2024, 07:06:44 PM

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

881
Mach4 General Discussion / Re: MPG Setup ????
« on: May 29, 2015, 08:28:17 AM »
Awesome TimGS! 

882
General Mach Discussion / Axis calibration is changing.
« on: May 27, 2015, 02:48:42 PM »
We just redid a Johnford Super Vertical with Mach 3 and it has been running for about a month with no issues.  This morning we get to the shop and the calibration is off on the Z axis.  We have restarted the computer and even turned the entire machine off to reset anything that might be weird in the settings.  The servo drive has no issues; we reset it to default settings just to be sure.
We can just recalibrate the axis to work but we are afraid that it will do the same thing down the road. 

Any suggestions??

-Chad

883
General Mach Discussion / Re: A Axis Brake
« on: May 18, 2015, 03:56:38 PM »
Thank you TP!!  I will just continue with the Macro then!
-Chad

884
General Mach Discussion / Re: A Axis Brake
« on: May 18, 2015, 01:39:38 PM »
Hey  TP
We are doing that on one of our mills already, using a macro to deactivate and activate before and after A moves.  We were redoing a mill with Mach 3 that had Fanuc controls on it.  The Fanuc controller would automatically turn the brake on and off when the A moved, whether you are running code or just hitting the button to jog.  I was just hoping that there was a way to do what fanuc does inside Mach 3.  Thanks for the input though! Greatly appreciated!
-Chad

885
General Mach Discussion / A Axis Brake
« on: May 18, 2015, 11:33:19 AM »
I am wanting to have a brake on my A Axis turn on when it is not moving and off when it is moving.  Is there a way to do this in Mach 3?
I would like for it to have a half second delay also.  So when I hit my keyboard Jog A + button it disables the brake and THEN starts jogging.  When It stops jogging it enables the brake and waits a half second before doing anything else.   ANY THOUGHTS??
-Chad

886
Mach4 General Discussion / Re: MPG Setup ????
« on: May 15, 2015, 11:01:00 AM »
In Mach 4 configuration do I need to do anything to setup the MPG?  That's more along the lines of what I was asking, sorry.  I haven't seen anything in Mach 4 that does anything to do with reading inputs from the MPG.
-Chad

887
Mach4 General Discussion / MPG Setup ????
« on: May 15, 2015, 09:25:56 AM »
I have an MPG that I want to work with Mach 4.  I am using an Ethernet Smooth Stepper (ESS).  Under the ESS I/O configuration, I have my 2 input pins set to MPG/Enc 0-A and MPG/Enc 0-B.  From there I do not know what I need to do to get axis movement.  Eventually I will have a pendant for the machine so I can set up in the PLC script the inputs for axis selection and jogging speed/mode.  But for now I need to know just how to get movement via MPG wheel.  
-Chad

888
Mach4 General Discussion / Re: Output Control
« on: May 06, 2015, 01:37:46 PM »
A little bit more help.  This is what I'm using to give a start signal momentarily.  Turns on Output 2 for half a second then shuts it off.  I also show a message that it turns on and off.
Hope this helps.
-Chad

--TEST CODE OUTPUTS!!
function m1010()

local rc = 0;
local inst = 0; -- mc.mcGetInstance(mInst)

-- Turns on output 2.
hsig, rc = mc.mcSignalGetHandle(inst, mc.OSIG_OUTPUT2);  
mc.mcSignalSetState(hsig, 1); --sets OUTPUT_2 to True

--Messages are written like this.
mc.mcCntlSetLastError(inst, "Output2 ON");

wx.wxMilliSleep(500) --Same as sleep in Mach 3.

-- turns off output 2
hsig, rc = mc.mcSignalGetHandle(inst, mc.OSIG_OUTPUT2);  
mc.mcSignalSetState(hsig, 0); --sets OUTPUT_2 to False

--Messages are written like this.
mc.mcCntlSetLastError(inst, "Output2 OFF");

end --This is for the end of the function m1010()

--This next part does not have to be in here to run in Mach 4.
--It does need to be in here to step through and test.

if (mc.mcInEditor() == 1) then
   m1010()
end

889
Mach4 General Discussion / Re: Output Control
« on: May 06, 2015, 01:33:55 PM »
You said something about a button.  I don't know about a button.  But in a macro you can look at this thread.  "having trouble with Lua Script"  It'll show you how to turn on an output via macro.

890
Mach4 General Discussion / Re: Having trouble with Lua Script
« on: April 29, 2015, 03:55:28 PM »

Here is my code that I am trying to do.  Like it says below.  Turning off a solenoid.  Waiting for it to move back and hit the switch.  Then turn on output 2 which will be a solenoid.  Wait for the switch and then display a message. 
This code works when I step through it, however when I try and run it Via MDI it locks up Mach 4 and closes it.  ANY IDEAS???
-Chad

--TEST CODE INPUTS AND OUTPUTS!!
--Example of a solenoid shutting off and waiting for the switch.
--Turn on output 1 and wait for switch then display message.

function m1002()

local rc = 0;
local inst = 0; -- mc.mcGetInstance(mInst)

-- Turns off output 1
hsig, rc = mc.mcSignalGetHandle(inst, mc.OSIG_OUTPUT1); 
mc.mcSignalSetState(hsig, 0); --sets OUTPUT_1 to False

-- Turns off output 2: SOLENOID 1
hsig, rc = mc.mcSignalGetHandle(inst, mc.OSIG_OUTPUT0); 
mc.mcSignalSetState(hsig, 0); --sets OUTPUT_0 to False
--Messages are written like this.
mc.mcCntlSetLastError(inst, "Output 2 Off");

function Input1IsFalse () --Solenoid 1 back switch.
    hsig, rc = mc.mcSignalGetHandle(inst, mc.ISIG_INPUT1);  --set hsig variable to handle input 1
    sigState = mc.mcSignalGetState(hsig);
    if sigState == 0 then
        return true; --Not active yet.
    else
        return false; --Input is active.
    end
end --Input1IsFalse

while Input1IsFalse() do
mc.mcCntlSetLastError(inst, "Solenoid 1 is Moving.");
end  --waits until input1 is true

mc.mcCntlSetLastError(inst, "Solenoid 1 is back.");

-- Turns on output 1
hsig, rc = mc.mcSignalGetHandle(inst, mc.OSIG_OUTPUT1); 
mc.mcSignalSetState(hsig, 1); --sets OUTPUT_1 to True

function Input2IsFalse () --Output 1 is active switch.
    hsig, rc = mc.mcSignalGetHandle(inst, mc.ISIG_INPUT2);  --set hsig variable to handle input 2
    sigState = mc.mcSignalGetState(hsig);
    if sigState == 0 then
        return true; --Not active yet.
    else
        return false; --Input is active.
    end
end --Input2IsFalse

while Input2IsFalse() do
mc.mcCntlSetLastError(inst, "Output1 is turing on.");
end  --waits until input2 is true


mc.mcCntlSetLastError(inst, "Output 1 ON");

end --This is for the end of the function m1002()

--This next part does not have to be in here
--it is for testing and steping through macros
--it runs the macro in Mach 4 fine without it.
if (mc.mcInEditor() == 1) then
   m1002()
end