Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: c30232 on February 19, 2014, 03:46:52 PM

Title: Mach as a linear indexer help
Post by: c30232 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.           
Title: Re: Mach as a linear indexer help
Post by: Hood 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
Title: Re: Mach as a linear indexer help
Post by: c30232 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?
Title: Re: Mach as a linear indexer help
Post by: Hood 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
Title: Re: Mach as a linear indexer help
Post by: c30232 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.           
Title: Re: Mach as a linear indexer help
Post by: Hood on February 19, 2014, 04:46:17 PM
No probs :)

Hood
Title: Re: Mach as a linear indexer help
Post by: garyhlucas 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.
Title: Re: Mach as a linear indexer help
Post by: c30232 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.           

       
Title: Re: Mach as a linear indexer help
Post by: c30232 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.
Title: Re: Mach as a linear indexer help
Post by: Hood on February 21, 2014, 02:51:24 AM
Glad you got it working :)
Hood
Title: Re: Mach as a linear indexer help
Post by: garyhlucas on February 21, 2014, 06:11:10 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.            

      

Look at: http://www.automationdirect.com/adc/Shopping/Catalog/Programmable_Controllers/DirectLogic_Series_PLCs_(Micro_to_Small,_Brick_-a-_Modular)/DirectLogic_06_(Expandable_Micro_Brick_PLC)/PLC_Units/D0-06DD1  This will do pulse and direction up to 7 Khz without any other modules.

Add: http://www.automationdirect.com/adc/Shopping/Catalog/Programmable_Controllers/DirectLogic_Series_PLCs_(Micro_to_Small,_Brick_-a-_Modular)/DirectLogic_06_(Expandable_Micro_Brick_PLC)/Motion_-a-_Specialty_Modules/H0-CTRIO2  This will go up  to 250Khz or read a quad encoder.

Add: http://www.automationdirect.com/adc/Shopping/Catalog/Operator_Interfaces/C-more_Micro-Graphic_Panels/3_inch_Panels_-a-_Accessories/EA1-S3MLW
This give you some buttons and a pop up keypad plus data display.

You might be able to use a DC gearmotor and an encoder along with a drive like this: http://kbcontrols1.reachlocal.net/KBMG-212D-8831-SCR-Chassis-KBMG-212D-8831.htm  This will give you almost servo like performance of a big motor for low cost. You approach rapidly then slow way down for final position. If you always approach from the same direction you can remove backlash too.

Your fixed zero would typically be designated by a home limit switch. When you start the system it would move slowly to the home switch, then typically reverse until the switch reopens, that being your exact zero. Then all subsequent moves get calculated from there.

Title: Re: Mach as a linear indexer help
Post by: c30232 on February 26, 2014, 09:43:08 PM
Thanks,  I just noticed the post.  I will have a look.  I was turning a blind eye to speed because is not an issue today, but when the depression is over we would regret having overlooked it.