Hello Guest it is March 28, 2024, 09:26:46 AM

Author Topic: LOVING the PMC!! Thanks Steve!!!  (Read 14917 times)

0 Members and 1 Guest are viewing this topic.

Re: LOVING the PMC!! Thanks Steve!!!
« Reply #40 on: July 27, 2017, 08:40:03 PM »
How do I get selected tool and current tool into PMC. Also how do I start a PMC file from M6?

Offline smurph

*
  • *
  •  1,544 1,544
  • "That there... that's an RV."
    • View Profile
Re: LOVING the PMC!! Thanks Steve!!!
« Reply #41 on: July 27, 2017, 09:13:23 PM »
You don't start a PMC file from any macro script.  The PMC is running all of the time (it is a software PLC).  Regulars ways of interfacing to a hardware PLC from a macro script can be used.  Typically by using Mach registers to communicate.  For your tool change stuff, you could load the selected tool into a register that the PMC is watching, etc...

Steve
Re: LOVING the PMC!! Thanks Steve!!!
« Reply #42 on: July 27, 2017, 10:55:24 PM »
Ok so how do you do that?

Offline smurph

*
  • *
  •  1,544 1,544
  • "That there... that's an RV."
    • View Profile
Re: LOVING the PMC!! Thanks Steve!!!
« Reply #43 on: July 27, 2017, 11:08:01 PM »
I can't possibly explain all of that in a forum post.  My advice is to search this forum for PMC examples.  Then familiarize yourself with the LUA scripting API to figure out how to get the selected tool, etc..  Look at some of the M6 example scripts.  They might help.  You may not even need the PMC, depending on what you want to do. 

Steve
Re: LOVING the PMC!! Thanks Steve!!!
« Reply #44 on: July 27, 2017, 11:55:19 PM »
Ive been doing that for days now Im lost. I dont understand lua at all thats why Im trying to use PMC. Ive gotten a few things figured out but dont know where to start with getting the current and selected tools. Thank you though. Im trying to setup my lathe tool changer. It's a turret style 8 position that uses a combination of 5 limit switches to determine position of the turret. As to say when both limit switches 1 and 2 are tripped its in position 1 and when LS 1 and 4 are tripped its in position4. I also need to output FWD and REv to a vfd to run the motor on the turret while activating a relay to operate a hydraulic solenoid to unlock the turret and monitor its own limit switch.