Hello Guest it is April 23, 2024, 04:44:25 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 - chair-man

Pages: 1 2 »
1
I built a 5 axis machine with a 2 axis head.  I have limit switches on both the B and the C rotary axes.  A new operator decided rather than hitting the "Load Position" button I made that raises Z, squares the head, and puts my 2 Y tables in the front position, he hit "REF ALL AXIS" - his reasoning to bring the X axis back to home as well. Unfortunately, the head was already turned just past the switch and did a 360 degree revolution to hit the home switch.  After a few times doing this over a week or so, he wound up all the internal wires and eventually the limit switch wire broke which then had the head spinning looking for the switch.  We luckily got it to stop before it destroyed all the spindle wiring.

So what I would like to do is limit the distance my B and C axis can travel during a homing operation.  Say 30 degree head rotation max, then  error if it exceeds it.  The home position is about 5 degrees from the square position.  Not sure if soft limits work during homing?

2
HiCON Motion Controller / Re: dual spindle setup
« on: May 07, 2020, 06:42:30 PM »
Thanks for the reply.  That makes sense.  It was one of the ideas I had but was really hoping to be able to run them simultaneously at different speeds but I can work around running them both at the same speed.

I assume I only need to set up a single spindle in Mach4 then just use the separate M codes to control on/off of each spindle with the shared 0-10V.

3
HiCON Motion Controller / dual spindle setup
« on: May 07, 2020, 09:55:01 AM »
Just starting to configure a new build.  This is first with dual spindles.  I am not sure how to set this up and how to control the 2 VFDs.  I have the 7737 step/direction boards with closed loop for the 6A motion.  Was thinking I could use the other 2 available step/dir outputs to run each spindle as an OB motor - or maybe one on the 0-10V the 2nd as an OB motor.

How would I set this up, and how would I control each spindle?  I plan on having separate M codes for each spindle on - say M13 for spindle 1 on clockwise and M23 for spindle 2 on clockwise.  Trying to determine how to control  how the S values go to the correct motor.  I haven't had any issue setting up a single spindle in the past, just can't quite figure out how to set up the 2nd one.

4
Mach4 General Discussion / how to handle double ended spindle
« on: January 04, 2020, 05:50:15 AM »
Anyone using a double ended spindle?  building a machine with crossed pair of double ended spindles and trying to figure out how to index the A axis 90 degrees for each tool on a "tool change".  From looking at the Fusion 360 sight the limited info I found is some machines handle it with an M code, others in the post.  Having touble getting the index in the post, but figured I could do a G52 shift in the M6 macro for each tool if I needed to.  Just wondering if anyone else out there has tackled this already.

5
That is great to know.  I definitely plan on looking into how to use that.  I did get around what I originally looked at doing.  Messier, but works.

I added an output to the Cycle stop function in the load screen script.
In my "run control" macro I looked for that output as a second escape from the loop.
this worked.  so now it will exit the macro when Cycle Stop is pressed.

I think your desciption has much better oppurtunity to make it all cleaner, so I will definitely be looking into what you described.

6
Mach4 General Discussion / how to use screen "CycleStop" in macro script
« on: October 12, 2019, 09:19:44 AM »
I posted this in the wrong forum earlier...

I have been running a dual table 5 axis router now for a few years on Mach4.  I have a macro that looks for an input signal from a PLC telling Mach if that table is ready to run.  the problem I am dealing with is the macro is a simple loop, looking at the Mach input controlled by the PLC and looping if it isn't on.  I need another way to get it out of the loop.  I wanted to use the screen button "Cycle Stop" since 99.9% of the time we are just stopping the program at the end of a run, but can't figure out how to "see" when it is pressed.  I built and coded the machine years ago, and am not a programmer, so sorry if this one is a simple solution.  My logic skills are good, my scripting/syntax skills need work!

Here is the working script:

local Yready = mc.mcSignalGetHandle (inst, mc.ISIG_INPUT5);

   repeat
         local ytable = mc.mcSignalGetState(Yready);         
   until ytable==1

here is what I want to add in red:

local Yready = mc.mcSignalGetHandle (inst, mc.ISIG_INPUT5);
local CycleStopScreen = not sure what goes here
   repeat
         local ytable = mc.mcSignalGetState(Yready);
        local cyclestop = not sure what goes here        
   until ytable==1 or cyclestop==1

I am just not sure how to tag the screen button, or the function.  I have tried a couple ways but it hasn't been working.  Maybe I am approaching it all wrong as well.
I am sure I can add an output signal to the Cycle Stop function that I could then look at, but figure I have to be able to see that screen button being pushed since Mach recognizes it, so there must be something there to directly tag

Thanks in advance for any help.

7
Mach4 General Discussion / how to use screen "CycleStop" in macro script
« on: October 12, 2019, 08:08:22 AM »
I have been running a dual table 5 axis router now for a few years on Mach4.  I have a macro that looks for an input signal from a PLC telling Mach if that table is ready to run.  the problem I am dealing with is the macro is a simple loop, looking at the Mach input controlled by the PLC and looping if it isn't on.  I need another way to get it out of the loop.  I wanted to use the screen button "Cycle Stop" but can't figure out how to "see" when it is pressed.  I built and coded the machine years ago, and am not a programmer, so sorry if this one is a simple solution.  My logic skills are good, my scripting/syntax skills need work!

Here is the working script:

local Yready = mc.mcSignalGetHandle (inst, mc.ISIG_INPUT5);

   repeat
         local ytable = mc.mcSignalGetState(Yready);         
   until ytable==1

here is what I want to add in red:

local Yready = mc.mcSignalGetHandle (inst, mc.ISIG_INPUT5);
local CycleStopScreen = not sure what goes here
   repeat
         local ytable = mc.mcSignalGetState(Yready);
         local cyclestop = not sure what goes here         
   until ytable==1 or cyclestop==1

I am just not sure how to tag the screen button, or the function.  I have tried a couple ways but it hasn't been working.  Maybe I am approaching it all wrong as well.
I am sure I can add an output signal to the Cycle Stop function that I could then look at, but figure I have to be able to see that screen button being pushed since Mach recognizes it, so there must be something there to directly tag

Thanks in advance for any help.

8
Just had an interesting problem on my ATC on custom made 5A router.

As a quick description, the tools are mounted on a sliding tool rack horizontally.  The M6 macro will pick up the spindle, rotates the B/C so the tool is horizontal facing the sliding tool rack, rack then extends out, machine movement then will bring Z down installing tool in tool fork, releases tool, rack retracts, machine moves to new slot, rack extends installing tool into spindle, spindle grabs tool, z picks up removing tool from tool forks, rack retracts, b/c return to zero and resumes program.  While running a test program with just tool holders in the machine I hit the stop button about 3 lines before the tool change (actually hit feed hold first, then hit stop followed by rewind).  what happened is the m6 macro ran, but did not execute any of the motion, just operated all the outputs, thus dropping the toolholder out of the spindle onto the machine table and my tool rack slide went in and out.  I have run the machine for over 4 months without missing a single tool change.  Any idea what caused this?  I executed the same situation a couple other times using different programs, so it seems to be something with the way it sees the M6 even though the code is stopped ahead of time.  My look ahead is set to 20, so I have to assume it puts the M6 in queue and then just purges it but still executes output codes?

I am running an earlier version of Mach4 from roughly a year ago, so not sure if anything has been added to fix this or not.  Didn't want to update Mach since machine has been essentially running flawless until this.

Any ideas

9
Mach4 General Discussion / problem running I J circle on parallel axis
« on: April 18, 2017, 11:22:16 AM »
I built a dual table 5 axis router with parallel Y axis tables.  Since I use B and C for my 2 axis rotary head, the axis parallel to the Y table I call U (which I believe is the linear of A in Mach4) since it is the only one available - I believe the correct convention for parallel to Y is V, but that is linear of B axis and I am using B.

Problem I am running into is when I try to cut a 3A circle using I and J on the parallel table (say G3 X1.0 U1.0 I.25 J.25 F100. I get X & Y movement not X & U).  When I do this, even though the code shows U, the Y table moves instead of the U table.  I am guessing since I am using U as the second Y axis, the I J doesn't work since J is Y offset to center of arc.  How would I code a circle cut on my parallel table???

10
General Mach Discussion / M6 ATC macro help
« on: February 04, 2017, 09:27:41 AM »
I have a working m6 macro for an ATC on a self built 6 axis router (5A with twin Y tables).

I have a moving rack on slides run by an air cylinder to move the rack into and out of the tool change area.  I use a repeat-until loop after turning on the output to wait until the sensor at the end of cylinder stroke goes on.  what I want to do is add some kind of timer to the loop so if the rack gets jammed it won't sit there forever waiting for the sensor to go on.  I can't figure out the lua timer function.  I added a counter to the loop, but trying to figure out the count value that works is tough to do, and I have 6 or so of these loops all needing different time values, would be better if I could use a timer.  Maybe there is another structure I could use instead of repeat-until.  Not really a programmer, just good enough to fumble through examples to figure out how to get it to work.

here is what lua script looks like with the counter:

local OUT1 = mc.mcSignalGetHandle(inst, OSIG_OUTPUT1)
local IN7 = mc.mcSignalGetHandle(inst, ISIG_INPUT7)
local a=0

mc.mcSignalSetState(OUT1,1)

repeat
   local mc.mcSignalGetState(IN7)
   a=a+1
until IN7 == 1 or a==100000000

if a==100000000 then
  mc.mcCntlEStop(inst)
  mc.mcSetLastError(inst, "toolrack jammed")
end

Pages: 1 2 »