Hello Guest it is March 29, 2024, 11:14:31 AM

Author Topic: Mach 3 toolchange for dummies???  (Read 84208 times)

0 Members and 1 Guest are viewing this topic.

Re: Mach 3 toolchange for dummies???
« Reply #90 on: June 23, 2011, 09:11:33 PM »












Hood. I have your settings that allowed you to have communication between Mach and your PLC, if you could please share your Mach macro and the code on the PLC, I would then be able to decipher how they talk to each other and start to figure out how to write the code for my PLC.

I have searched, but have been unable to locate anyone who has posted both the VB they run as M6start in mach and the code they have running on their PLC. I can find lots of M6start examples, but nothing on the PLC side...

Is your PLC code in ladder or basic?










Re: Mach 3 toolchange for dummies???
« Reply #91 on: June 23, 2011, 10:12:07 PM »
Hi Nate,

Without knowing the history, as I'm at work and don't have time to study the whole thread.

If you have enabled the plugin version of Mach3s Modbus interface, you need to talk to the Modbus interface via Mach3 brains. So, your M6Start macro need to put data into user DROs, then you need to write a brain to read the User DRO and write it to a Modbus register.

To read Modbus data, you need to do the reverse. A brain reads the modbus data, puts it into a User DRO and then the M6Start macro reads it from there.

The other way to do it is to not use the Plugin Modbus interface, but the old legacy interface. Then you can read and write to this interface directly from the M6Start macro, using calls like Call SetModOutput (66,0)

I've done a number of toolchange interfaces using this method with the ModIO. Here is 1 example.

http://www.youtube.com/watch?v=YKb2g5xalEk

Cheers,

Peter.
----------------------------------------------------
Homann Designs
http://www.homanndesigns.com
email: peter at homanndesigns.com
Re: Mach 3 toolchange for dummies???
« Reply #92 on: June 23, 2011, 11:25:48 PM »
Peter-

Thanks so much for chiming in. I have been studing the things you have written about Modbus. I have also watched several of your videos. I would prefer to use the legacy interface.

Can you please explain to me with an example how to use GetInput(*) and SetModOutput(*,*)?

I dont think that I can really wrap my head around this until I see how they are used in an example.

I know you are very busy, but if it make a difference, everytime anyone (like you and Hood) helps me get closer, you are helping others get closer in the future also, as I am diocumenting my turret conversion here http://www.cnczone.com/forums/hardinge_lathes/129658-chnc_turret_plc_conversion_log.html in great detail. 

My goal is to doccument the process so throughly, that anyone in the future can do the same or simmilar with very little research or effort. I find it very frustrating, that I am having to "reinvent the wheel" I have found that everyone who has done this in the past has left large or small holes in their postings about how they did it. these holes are not easily filled. I am making a post that leaves NOTHING out. I want the next guy to be able to buy the right parts, wire them up, plug in my settings and have it work. I hope the next person does not need to spend weeks trying to tease enough information out of people/books/wikis to get it functional.

We should be building upon each others expierence and knowledge, not relearning the same stuff over and over again.

Ok, I'm done ranting now....   ;) 


Re: Mach 3 toolchange for dummies???
« Reply #93 on: June 23, 2011, 11:52:57 PM »
Hi Nate,

I'll get some stuff together over the weekend that should hopefully make it clearer.

Cheers,

Peter.
----------------------------------------------------
Homann Designs
http://www.homanndesigns.com
email: peter at homanndesigns.com
Re: Mach 3 toolchange for dummies???
« Reply #94 on: June 23, 2011, 11:53:47 PM »
That would be great. I'm dying over here...
Re: Mach 3 toolchange for dummies???
« Reply #95 on: June 23, 2011, 11:56:17 PM »
BTW, have you tried controlling the turret by using the Modbus test page. With it you can manually set and read registers to walk through the operatiomns to ensure that the PLC side is doing it's thing.

Cheers,

Peter.
----------------------------------------------------
Homann Designs
http://www.homanndesigns.com
email: peter at homanndesigns.com
Re: Mach 3 toolchange for dummies???
« Reply #96 on: June 24, 2011, 12:01:55 AM »
Nate,

Also, have you read this page? It is a good introduction.
http://www.machsupport.com/MachCustomizeWiki/index.php?title=Modbus_in_Mach

Cheers,

Peter.
----------------------------------------------------
Homann Designs
http://www.homanndesigns.com
email: peter at homanndesigns.com
Re: Mach 3 toolchange for dummies???
« Reply #97 on: June 24, 2011, 12:11:40 AM »
Yes. About five times today already. I have printed it and will read it till it makes sense!

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Mach 3 toolchange for dummies???
« Reply #98 on: June 24, 2011, 06:22:18 AM »
Nate, my PLC is ladder so nothing needed except the m6start.m1s for me.
Hood
Re: Mach 3 toolchange for dummies???
« Reply #99 on: June 24, 2011, 12:07:50 PM »
Thanks hood. I appriciate it.