Hello Guest it is March 29, 2024, 01:35:31 AM

Author Topic: Pokeys ATC Macro  (Read 4320 times)

0 Members and 1 Guest are viewing this topic.

Pokeys ATC Macro
« on: March 06, 2016, 11:30:36 AM »
I Was wondering if there were and VB Script wizards out there who would be able to help me with my Pokeys ATC macro?

I have converted a Boxford VMC 300 to mach3 and have the system up and running, the next step is to get the automatic tool changer working. It is an 8 tool carousel type configuration with air cylinders controlling the movements and a geared motor indexing the tool tray with proximity sensors determining positions.  I have used a ESS and PMDX-126 to control the machine which does not give me enough IO to control the tool changer as I need 11 inputs and 8 outputs because proximity sensors are used on most of the moving parts for position feedback.
I have a pokeys 57U which I am hoping will be able to control the ATC and a front panel for the machine with control buttons as it will give me lots more IO.
I have the logic sequences for the tool change process and they are as follows:

Tool Change logic
•   Make sure machine has been referenced before continuing
•   Check that pokeys device is connected and working before continuing
•   Check air pressure is ok before continuing
•   Compare new tool number with old tool number
•   If tool is the same then exit
•   If tool is different continue with tool change
•   Turn of spindle and coolant
•   Rapid Z to home, then position X and Y in tool change location
•   Home tool carousel or find out current position (Can this be done with machine reference?)
•   Rotate carousel to current tool position using sensor
•   Activate carousel lock (no position feedback on this solenoid)
•   Activate spindle lock, if sensor confirms lock then continue if not start spindle on lowest rpm until lock is confirmed and turn of spindle
•   Activate tool changer “In”, wait for sensor to confirm position before continuing
•   Activate Drawbar, wait for sensor to confirm position before continuing
•   Activate tool changer “Down”, wait for sensor to confirm position before continuing
•   Retract carousel Lock
•   Index carousel to new tool number, read tool position with sensor
•   Activate carousel lock
•   Activate tool changer “Up”, wait for sensor to confirm position before continuing
•   Deactivate Drawbar, wait for sensor to confirm position before continuing
•   Activate tool changer “out”, wait for sensor to read position before continuing
•   Deactivate spindle lock
•   Deactivate carousel lock
•   Return to program   

I have had a go at writing my own M6start macro but I am new to macro writing I am getting stuck when I have to read and write IO from the pokeys to the macro script. I have read the pokeys pulse engine manual which describes process this but I cannot get it to work for me, but I am also having problems if I copy the example given in the manual of turning output 1 on and off.
I have attached the macro so far which has mainly have been copied from other users macros but now I am stuck. The first part checks that the machine has been referenced and then checks to see if the new tool is different from the old tool before continuing which works fine.

If anyone knows where I am going wrong or has any tips that would be a big help :)

Thanks
Joe 
Re: Pokeys ATC Macro
« Reply #1 on: March 06, 2016, 02:08:44 PM »
Hello Joe,

i have retrofited an Hurco MB1 with Pokey57E and an CNCaddon!
Now it works fine!
For your coding you should set the Inputs from the pokey on OEMLED´s in the configuration example led 1308 ! ;)
In your Macro for example: your variable = GetOemLed (1308)
It´s the simple way to get it direktly to your script.
Be shure, that all of your movements finished. like this: 
 While (MagIn = 1)    'Werkzeugwechsler eingeschwenkt
      Sleep(10)
     Wend
     DeActivateSignal(Output8) 'Werkzeugwechsler einschwenken Aus
      Sleep(1000)
       Code "G4P1"
        ActivateSignal(Output6)    'Werkzeuglösen Ein
     While (SPNToolClamped = False) 'WZ gelöst
      Sleep(10)
     Wend
      Code "G4P1"

When you use the tool length and g43 you have to be shure that the tool is 0 in the moment you start to move with the z axis, cause i figured out ther a lot of issues in mach3 you have to know and agree. ;)

good luck and have fun!  :D
Re: Pokeys ATC Macro
« Reply #2 on: March 08, 2016, 03:54:25 PM »
Thanks for the reply  :)

I can now control things with the script using OEMLED's and a LED for each input and output on a new screen in mach3 so I am sorted with that, thankyou for your help  :)

I have a few things that I am not sure about. When do you home the tool carousel, include it with the machine homing process or just before the first tool change?

How do I index the tool tray when it is not controlled by a stepper motor for angular control? There are 2 proximity sensors on the tool tray, one for the home position and the other reads a star shaped plate that correlates to the tool position.

So the things I can use are:
•   Geared motor that turns CW or CCW
•   Proximity home sensor
•   Proximity sensor that senses when a tool is ”there”
•   Air driven carousel position lock that pushes the carousel into the exact tool pocket location

I think the process would go something like:
•   home the tool carousel
•   turn the motor CW or CCW whichever is closer to the new tool
•   count the number of tools that go past with the proximity sensor
•   on the correct number stop the motor
•   activate the carousel lock to put the tool tray in the correct exact position
Does anyone know how to write the code for this type of thing of how to set up the counter/system that will determine the shortest route to the next tool?

Thanks
Joe
Re: Pokeys ATC Macro
« Reply #3 on: March 08, 2016, 04:31:32 PM »
Hello Joe,

it´s up to you when you will start to reference your tool magazin, but i know for oher machinetools thy like ti do it with the other axes too.
On my system it is not nessesary, caues i use an absolute encoder. ;) ;D
So it is easier to handle.
My system wil use also an geared moter like you, but hurco had in the history an carrusel and an geared motor who will only step from place to place.
As simple as it is.
I do the shortest way to the next tool but it is dependent from your way.
When you can use an steppermotor it could be easier for you to made an script for it.
For my begining on this machine i startet to write only a script to move to another place.
It could be an good start for you too. But don´t use mach3 reserved M- funtions. Better example: M106.
For your question i don´t understand why you like to count the tools? I think it will be better when you count the pockets or places on the carousell.
Up from this point you will have it easier to handle it with the shortest route to the next place.

Regards
Uwe

Re: Pokeys ATC Macro
« Reply #4 on: April 21, 2016, 04:02:57 PM »
Hi Joe,

what´s about your Project?
Still workin?

Best Regards
Uwe