Hello Guest it is October 19, 2019, 08:45:23 AM

Author Topic: Mach as a linear indexer help  (Read 3612 times)

0 Members and 1 Guest are viewing this topic.

Offline c30232

*
  •  122 122
    • View Profile
Mach as a linear indexer help
« on: February 19, 2014, 03:46:52 PM »
I would like to move/index a fence with Mach.  To be efficient it would require that the move to value could be entered and retained in a data-field or MDI window.  A start button adjacent to the field would command the movement to the entered value.  There would be several button/fields.  Thus the operator would enter the various values at the begging of the operation and then simply press the appropriate button for the desired fence location.  That is, 1",  2 1/2 ", 4" and so on.  A button command script  to move the axis that calls up the variable entered in the data-field??? 

Please help.           

Offline Hood

*
  •  25,855 25,855
  • Carnoustie, Scotland
    • View Profile
Re: Mach as a linear indexer help
« Reply #1 on: February 19, 2014, 04:08:34 PM »
One way you could do it is have user DROs on screen for each distance you want and have a button for each one as well. The button would be a VB button that reads the value in the DRO and commands the move to that value.
Hood

Offline c30232

*
  •  122 122
    • View Profile
Re: Mach as a linear indexer help
« Reply #2 on: February 19, 2014, 04:17:22 PM »
Thanks.  Easy for someone who knows how to write VB.  Can there be multiple buttons and DROs?  Do you have a VB script in mind or can you direct me to instructions on VB as it applies to Mach?  I am just starting to mess with screen design.  I am using Klaus, MachScreen V 1.60, is that a correct approach?

Offline Hood

*
  •  25,855 25,855
  • Carnoustie, Scotland
    • View Profile
Re: Mach as a linear indexer help
« Reply #3 on: February 19, 2014, 04:27:35 PM »
Yes there can be multiple DROs and buttons, just have to have the DROs with different numbers and each button looking at that particular DRO.
MachScreen should work fine, not used it myself as I always found Screen4 worked well for me even though a lot of others dislike it.


Not a programmer but something like this should work.

Distance = GetUserDRO(1001)

Code "G0X " & Distance


Hood

Offline c30232

*
  •  122 122
    • View Profile
Re: Mach as a linear indexer help
« Reply #4 on: February 19, 2014, 04:41:42 PM »
Thanks, I get the concept and will give it a go. We have the carriage and rails for the fence installed, but planed to crank it by hand or an analog gear motor.  The industrial drives are very expensive and still require substantial mods to adapt to the application.  Mach with two slaved lead-screws will do just fine.  I am amazed by the versatility of the software at its price.  The help from the forum is fantastic too.

Thanks again for the help.  Also, my personal router has not crashed again after following your sage advice.           

Offline Hood

*
  •  25,855 25,855
  • Carnoustie, Scotland
    • View Profile
Re: Mach as a linear indexer help
« Reply #5 on: February 19, 2014, 04:46:17 PM »
No probs :)

Hood
Re: Mach as a linear indexer help
« Reply #6 on: February 19, 2014, 06:40:30 PM »
Mach 3 is a very good program. However it may not be the best choice for this kind of simple task.  You will be running windows on a PC. Do you have any 15 year old PCs that have never been powered down except in a power failure?  I have several PLCs that have been running continuously for 18 years!  Because that is what PLCs are made to do.

So an Automation Direct DL06 as an example, with a high speed counter module and a micro graphics terminal will cost you about $700 and you can drive a stepper, a servo, a 1 HP DC motor using a $150 controller, or a 3 phase motor from a $150 VFD for this little project.  You'd have 20 inputs and 16 outputs for safety switches, limits, selector switches, etc. Ladder logic programming gives you if/then/else timers, counters and on an on.  You do want to count how many pieces of each length you cut right?

In fact my multi-purpose CNC has one in it, along with Mach 3. I have a selector switch for the high speed router spindle or the high torque R8 spindle.  There is another one for Mill/Lathe/3d printer, another for air blow off/none/coolant, and one for Spindle On/Off/Auto with Mach 3.  There are door switches and limit switches on the axis that kill all power, and key switch to override the door switches. There are two conveniently located pushbuttons programmed as toggles for the vacuum cleaner.  Mach 3 also has inputs to the PLC. I drive the vacuum outlet, two spindles, a heated bed, a nozzle heater, and Mach 3 handles 4 axis motion.

Offline c30232

*
  •  122 122
    • View Profile
Re: Mach as a linear indexer help
« Reply #7 on: February 19, 2014, 08:37:32 PM »
Gary,

Please send links to the Direct components you reference.  There are numerous hits on DL06.  I like the concept . .  we built a PLC controlled edging cross-cut saw.  I outlined the ladder, but we used outside resources to actually program it.  We also have other PLC stuff and have just as much trouble with them as anything else.  I actually have a PC that has been running since 1998 without failure. It runs DOS and a CNC Router. If the grid is up, it's up.  However, I am on my third high buck touch screen panel mount PC for the current router project.

The fence we are working on weighs about 500 pounds and has about 12 inches of travel. Although it would be nice to count pieces, it is not a feasible task.  What did you have in mind for the HMI?  The fence has a variable zero and a fixed Zero.  The operator would need to set the variable zero and then enter the desired offset values from that zero . . . usually not more than 4 total.  The fixed zero has 5 negative values.           

       

Offline c30232

*
  •  122 122
    • View Profile
Re: Mach as a linear indexer help
« Reply #8 on: February 20, 2014, 05:11:40 PM »
Hood,

Thanks for the VB it works well.  I added to it absolute and incremental.  I think it will make a nice page for doing simple cuts on the router.

Offline Hood

*
  •  25,855 25,855
  • Carnoustie, Scotland
    • View Profile
Re: Mach as a linear indexer help
« Reply #9 on: February 21, 2014, 02:51:24 AM »
Glad you got it working :)
Hood