Hello Guest it is March 28, 2024, 07:25:49 AM

Author Topic: Turret macro question! VERY COOL TURRET :D  (Read 2157 times)

0 Members and 1 Guest are viewing this topic.

Offline mike^3

*
  •  116 116
    • View Profile
Turret macro question! VERY COOL TURRET :D
« on: October 02, 2015, 06:10:18 PM »
 ;D ??? ::) >:D ???


Hello Mach community! I have an awesome project I am working on, with your previous help I have been able do so much :)!.

I am converting a CHNC right now, I have one prob though....

The turret is very unique...

This is the process of what should happen:

Trigger output 5 ON (lift and spins turret counter clockwise)

Wait for input (this is where it gets narly)

There is 4 wires that come off of this encoder (signal outputs 12v), yet there is 8 positions, so I am assuming there is a BCD code, like tool one = 1001, tool two = 1010

The (1) represents wire (X) is high and (0) represents wire (x) is low

So I have the outputs wired to 4 inputs on my cnc4pc c23 card.

When is gets the right output on the right inputs, then

Trigger output 6 (fires a stop dog that stops the turret)

Trigger output 5 OFF
Trigger output 6 OFF

change current tool to selected tool and current offset to selected offset.

continue program.

If you could help it would be very appreciated!!! :D

Mike ???

Offline mc

*
  •  382 382
    • View Profile
Re: Turret macro question! VERY COOL TURRET :D
« Reply #1 on: October 02, 2015, 06:21:59 PM »
The encoder output may not be BCD. Depending on what's fitted, it could be Grey logic or something similar. You'll either need to find a manual, or hook it up to a logic analyser to try and figure out the code.
You may also find only 3 of the output lines are for the position, with the fourth being a strobe/locating line which is used to time the locking.

Once you've figured that out, if the turret rotates at any kind of reasonable speed, then a macro won't be fast enough. Macros only run with a 10Hz update speed, so if you need anything more accurate than 100ms timing, then they're no good and you'll need to use another method, such as a PLC or something micro-controller based.

Offline mike^3

*
  •  116 116
    • View Profile
Re: Turret macro question! VERY COOL TURRET :D
« Reply #2 on: October 02, 2015, 06:29:47 PM »
Hi MC,

I have never used a PLC before, and yes the turret hauls butt....do you know of a PLC I can use?

Offline mc

*
  •  382 382
    • View Profile
Re: Turret macro question! VERY COOL TURRET :D
« Reply #3 on: October 02, 2015, 06:52:48 PM »
I personally used a Click PLC for my lathe turret, and connected to it using Modbus via a KFlop/Kanalog (Kanalog supports Modbus).

It will depend on how you want to handle the turret. My setup relies on the turret position being updated via Modbus, with the commanded position being sent and actual position returned, then one output being used to tell the PLC that it's safe to perform a tool change, and one input being used to signal that the turret is on position and locked.
I used the PLC because I never had enough inputs/outputs to handle everything, so moving the turret logic to a PLC was the simplest option at the time.

A cheaper option would be something like an Arduino, as there are a few examples around showing how to connect to them via Serial/Modbus.
You don't have to use Modbus if you have enough inputs/outputs, as you could output the position to the arduino/micro using normal outputs, then let the arduino handle the sequencing before activating an input to say the move is complete.

Offline mike^3

*
  •  116 116
    • View Profile
Re: Turret macro question! VERY COOL TURRET :D
« Reply #4 on: October 02, 2015, 07:17:12 PM »
I could slow the turret down during tool change, this would eliminate the speed issue, (small adjustment on back of turret :).

I looked in the manual, and there are 4 outputs from the encoder, I will need to power it and read the inputs to see what the logic is.

I do think mach 3 can see it quick enough to handle.

I think it would all rely on the code.

Worse case scenario is that I install 8 hall effect transistors and replace the encoder with 8 outputs and feed then right to the inputs on my card.

Yes I do have lots of inputs, 34 I think to be exact ;)