Hello Guest it is November 15, 2019, 06:08:55 AM

Author Topic: Brain for tool turret  (Read 5176 times)

0 Members and 1 Guest are viewing this topic.

Offline N4NV

*
  •  393 393
    • View Profile
Brain for tool turret
« on: February 01, 2009, 09:41:14 PM »
I have a brain that sends the currentTool to my PLC via modbus.  Now I need to change it so that one condition true before it will send the current tool to the PLC.  Jason gave me a macro that helps with the too turret change.  In the macro he sets user DRO 2000 to 1 if the carriage is in position for a tool change.  I need this DRO2000 to be 1 before the brain sends the current tool to the PLC.   In the first line I just pass the current tool.  In the second line I compare DRO 2000 to 1 (which would  be true if the carriage was in the proper position).  Then I do an AND function then terminate with an output to my PLC via modbus.  This does not work.  Any suggestions?

Vince

Offline Chaoticone

*
  • *
  •  5,628 5,628
  • Precision Chaos
    • View Profile
Re: Brain for tool turret
« Reply #1 on: February 01, 2009, 10:39:40 PM »
In your Brain your looking at OEM LED instead of OEM DRO.

Brett
;D If you could see the things I have in my head, you would be laughing too. ;D

My guard dog is not what you need to worry about!

Offline N4NV

*
  •  393 393
    • View Profile
Re: Brain for tool turret
« Reply #2 on: February 02, 2009, 01:48:54 PM »
I made a mistake in my post, I am looking for LED 2000 to be 1.  I believe my brain is correct for that.  I am loosing somewhere in the and statement.

Vince

Offline N4NV

*
  •  393 393
    • View Profile
Re: Brain for tool turret
« Reply #3 on: February 02, 2009, 02:50:46 PM »
In my brain I can see that the DRO LED 200 is being set to one by my macro.  I just can't figure out how to make the CruuentTool value pass through conditional on the DRO LED 2000 being 1.

Vince

Offline N4NV

*
  •  393 393
    • View Profile
Re: Brain for tool turret
« Reply #4 on: February 03, 2009, 06:13:22 PM »
Jason helped me with a solution.  It turned out that it could not be done with a brain directly and took some VB code in a macro to make it work.  The final bran just turned out to be on line with a pass through to the modbus.

Vince

Offline poppabear

*
  • *
  •  2,233 2,233
  • Briceville, TN, USA
    • View Profile
    • S S Systems, LLC
Re: Brain for tool turret
« Reply #5 on: February 03, 2009, 07:49:50 PM »
N4NV

If your sending to a PLC then you need to seperate rungs of ladder, the first rung sends your Tool number to the PLC to a register
the second sends the LED that tells the PLC iit is OK to move.

Rung 1:  Current Tool->No Op->Modbus register that drops that value into your holding register in the PLC.
Rung 2: LED2000 -> No Op->Send to a Bit of word register OR a Control Register

tie the Control bit of your PLC with the Rotate output from your PLC and have your Register that has holds your Tool number to do a Compare to what ever your using as the "In position" sensor.
Commercial Mach3 & Mach 4, Design/Build/Retrofit CNC and Industrial machines.
http://www.ss-systems-llc.com/

Offline N4NV

*
  •  393 393
    • View Profile
Re: Brain for tool turret
« Reply #6 on: February 03, 2009, 09:51:28 PM »
Thanks Scott, that could have worked as well.  I would have had to change the code in my PLC to look for that second bit.   Jason's VB script turned out to be a little more elegant.  Since I had to have the VB script for the tool change anyway, it all worked out in the end.  I really appreciate all the help I have received with this project.  There was a the possibility that the tool turret could rotate before getting to the tool change position and also a problem if it did not seat properly.  All the items have now been resolved and the tool change is working as good as it did when new, 30 years ago.

Vince