Setting up an 8 position lathe toolchanger

15 Apr 2018 20:45 - 15 Apr 2018 20:52 #109091 by kor
I want to setup my 8 position tool changer which is basically controlled by three relays and a couple of sensors.
Two relays for direction and 1 for an e-magnet
It has a 4-bit encoder for the position plus a parity bit.
a strobe signal (which switches every time the revolver passes a position)
and some sensor which tells you that pre indexing started.
Besides, there is a PTC which is a failsafe for the motor. (but I got no clue what and how to do something with it)
I can read the sensor pins for the positioning.
I can switch the relays (haven't connected 400V to the relays for the motor yet since I am waiting for the oil).

So accept the PTC everything looks OK.
But I don't really know what the best way to implement that in Linux CNC. is it the carousel function?
However, how do I tell it the right sequence?

To start moving one motor relay is turned on. (That's easy)
For locking there is a medium complicated sequence:
if position bits are right and strobe turns of -> turn on e-magnet relay within 30 ms
if the preposition sensor turns on, change motor direction. within 60ms
If any position bits turn on switch off motor and magnet. within 40ms
check if all sensors show appropriate value -> success.

Do you do that in python code? In the hal directly? Or are there other ways to do it.
Are there simple tutorials with similar problems? Where You can learn how to do it?
Last edit: 15 Apr 2018 20:52 by kor.
15 Apr 2018 22:02 #109097 by tommylight
That should work properly since it seems you have a "Gray code" sensor, you will just have to figure out the right sequence of pins for the right tool pocket.
It does not require remapping if i recall correctly as i used that last January on an Elumatec profile machining centre.
Still working perfectly.
16 Apr 2018 08:34 #109115 by kor
I looked at the emcochanger.txt
I will try to work fro that this weekend.
The optos are updated automatically by the hal right? why are they first all set to default?
and how are they (optos and other vars) linked to the pins of the parport or whatever.
I can not find out from that how the delays are called and what unit they have (ms,s,...)
Time to create page: 0.063 seconds
Powered by Kunena Forum