8 Position Tool Turret (unreliable)
05 Jul 2020 16:35 #173675
by Hodge
8 Position Tool Turret (unreliable) was created by Hodge
Hello Team LinuCNC,
As a complete newbie, from reading the many great posts here on the forum I now have my EmcoTurn220P running well on LinuxCNC and love the software. So thank you all for the forum!!!
However, one area I've not been able to get 100% reliable is the tool changing turret.
It's currently operated using a ClassicLadder programme (emco.clp attached) which I inherited. The logic and theory work well. However, in practice the mechanical latching system has proven to be unreliable and led to a few dramatic crashes.
It is an 8 position turret driven by a 24vdc motor when 'CLoutB0' is engaged. There is an 'encoder' which has 4 optical sensors and a rotor that triggers the sensors as it rotates (the sensor logic can be seen on the Ladder_Screenshot.png attached). Once the turret has reached the correct position 'CLoutB0' is disengaged and the motor contactor reverses polarity on the dc motor to reverse the turret back onto a mechanical latch to lock.
The problem is that the distance the turret moves past the latch before the 'CLoutB0' reverses seems to vary very slightly leading to it occasionally missing the correct position and latching on the next tool. No check is made in the code so the Gcode continues.
So I would like help to achieve the following please:
1) add a timer delay variable in ClassicLadder between the sensor logic registering and 'CLoutB0' reversing so I can try and 'fine tune' the distance the turret moves passed the latching position before it reverses.
2) If the turret misses the correct position the sensors will no longer be giving the correct logic so can a check of the sensors be made in ClassicLadder so an alarm (or second tool change attempt is made) before the Gcode programme continues??
Descriptions of the symbols on the Ladder_Screenshot.png
CLinB1 - Encoder Sensor 1
CLinB2 - Encoder Sensor 2
CLinB3 - Encoder Sensor 3
CLinB4 - Encoder Sensor 4
CLoutB0 - Turret Forward (motor)
CLoutB1 - Tool prepared
CLoutB2 - Tool Changed
I have tried to use John T's ladder tutorial and turret.clp (thank you John) but am just too far from understanding ladder to get to grips with it.
HAL & INI files attached in case they are also needed.
Thanks in anticaption and sorry if I'm using the wrong/confusing terms.
As a complete newbie, from reading the many great posts here on the forum I now have my EmcoTurn220P running well on LinuxCNC and love the software. So thank you all for the forum!!!
However, one area I've not been able to get 100% reliable is the tool changing turret.
It's currently operated using a ClassicLadder programme (emco.clp attached) which I inherited. The logic and theory work well. However, in practice the mechanical latching system has proven to be unreliable and led to a few dramatic crashes.
It is an 8 position turret driven by a 24vdc motor when 'CLoutB0' is engaged. There is an 'encoder' which has 4 optical sensors and a rotor that triggers the sensors as it rotates (the sensor logic can be seen on the Ladder_Screenshot.png attached). Once the turret has reached the correct position 'CLoutB0' is disengaged and the motor contactor reverses polarity on the dc motor to reverse the turret back onto a mechanical latch to lock.
The problem is that the distance the turret moves past the latch before the 'CLoutB0' reverses seems to vary very slightly leading to it occasionally missing the correct position and latching on the next tool. No check is made in the code so the Gcode continues.
So I would like help to achieve the following please:
1) add a timer delay variable in ClassicLadder between the sensor logic registering and 'CLoutB0' reversing so I can try and 'fine tune' the distance the turret moves passed the latching position before it reverses.
2) If the turret misses the correct position the sensors will no longer be giving the correct logic so can a check of the sensors be made in ClassicLadder so an alarm (or second tool change attempt is made) before the Gcode programme continues??
Descriptions of the symbols on the Ladder_Screenshot.png
CLinB1 - Encoder Sensor 1
CLinB2 - Encoder Sensor 2
CLinB3 - Encoder Sensor 3
CLinB4 - Encoder Sensor 4
CLoutB0 - Turret Forward (motor)
CLoutB1 - Tool prepared
CLoutB2 - Tool Changed
I have tried to use John T's ladder tutorial and turret.clp (thank you John) but am just too far from understanding ladder to get to grips with it.
HAL & INI files attached in case they are also needed.
Thanks in anticaption and sorry if I'm using the wrong/confusing terms.
Please Log in or Create an account to join the conversation.
- tommylight
- Away
- Moderator
Less
More
- Posts: 19106
- Thank you received: 6398
05 Jul 2020 17:30 #173680
by tommylight
Replied by tommylight on topic 8 Position Tool Turret (unreliable)
Attached is the full config folder for a big industrial machine with 8 tools, i used the emcochanger.comp and tool_changer.hal for that and it should work as is for you (only the changer section, not everything).
The only thing you might need to change is the sensors, compile again and test. Also there are settable delays.
The only thing you might need to change is the sensors, compile again and test. Also there are settable delays.
The following user(s) said Thank You: Hodge
Please Log in or Create an account to join the conversation.
05 Jul 2020 21:14 #173690
by Hodge
Replied by Hodge on topic 8 Position Tool Turret (unreliable)
Thank you TommyLight for the quick reply and sharing the files.
It will take a little while to get my head around it all but I'll come back and let you know how I got on when I have.
It will take a little while to get my head around it all but I'll come back and let you know how I got on when I have.
The following user(s) said Thank You: tommylight
Please Log in or Create an account to join the conversation.
07 Jul 2020 12:11 #173826
by Hodge
Replied by Hodge on topic 8 Position Tool Turret (unreliable)
Okay, here's where I've got to so far:
My turret motor does not have a controller that I can use with PWM. It is powered via relay only from 'ppmc.0.dout.06.out':-
forward 36vdc when 'true'
reverse 7vdc when 'false' (via resistor).
Needs to remain powered in reverse when 'false' to hold onto latch. This works well (apart from occasional timing issue) so I would like to keep it simple like this if possible.
I have updated the hal file (attached) to use my nets to the Pico Sytems contoller and also 'remarked out' the PWM elements using '#'.
However, I don't fully understand the C++ so not sure if the 'forward = true' and 'forward = false' statemants will be correct or enough to swith the motor forward and reverse without the PWM element. Can anyone confirm if this is okay??
Also, the motor is powered forward with 36vdc but is rated at 24vdc. It works fine and does not overheat as it is only on 4secs at a time but is this good practice or am I in danger of eventually damaging the motor??
My turret motor does not have a controller that I can use with PWM. It is powered via relay only from 'ppmc.0.dout.06.out':-
forward 36vdc when 'true'
reverse 7vdc when 'false' (via resistor).
Needs to remain powered in reverse when 'false' to hold onto latch. This works well (apart from occasional timing issue) so I would like to keep it simple like this if possible.
I have updated the hal file (attached) to use my nets to the Pico Sytems contoller and also 'remarked out' the PWM elements using '#'.
However, I don't fully understand the C++ so not sure if the 'forward = true' and 'forward = false' statemants will be correct or enough to swith the motor forward and reverse without the PWM element. Can anyone confirm if this is okay??
Also, the motor is powered forward with 36vdc but is rated at 24vdc. It works fine and does not overheat as it is only on 4secs at a time but is this good practice or am I in danger of eventually damaging the motor??
Please Log in or Create an account to join the conversation.
- tommylight
- Away
- Moderator
Less
More
- Posts: 19106
- Thank you received: 6398
07 Jul 2020 15:16 #173850
by tommylight
Replied by tommylight on topic 8 Position Tool Turret (unreliable)
Can not test that, but it should work without the PWM stuff.
Also check the state of tool number pins since if they are not correct the toolchanger will not stop rotating.
Also check the state of tool number pins since if they are not correct the toolchanger will not stop rotating.
The following user(s) said Thank You: Hodge
Please Log in or Create an account to join the conversation.
07 Jul 2020 16:40 - 07 Jul 2020 18:47 #173864
by Hodge
Replied by Hodge on topic 8 Position Tool Turret (unreliable)
Attachments:
Last edit: 07 Jul 2020 18:47 by Hodge. Reason: NOTE: THE '!' NEED TO BE REVERSED IN THE EXAMPLE ABOVE TO WORK CORRECTLY
Please Log in or Create an account to join the conversation.
07 Jul 2020 18:58 #173893
by Hodge
Replied by Hodge on topic 8 Position Tool Turret (unreliable)
OMG!!!! It works perfectly at 2nd attempt!!
I had to reverse the '!opto' to 'opto' from the example above and then bingo!
The delay timings are all spot on too.
@tommylight - Huge thanks!
For anyone else that wants to use this, the circuit diagram and files I used are attached. Harware is Emcoturn220P with original tool turret and Pico Systems Universal Stepper Controller board.
I had to reverse the '!opto' to 'opto' from the example above and then bingo!
The delay timings are all spot on too.
@tommylight - Huge thanks!
For anyone else that wants to use this, the circuit diagram and files I used are attached. Harware is Emcoturn220P with original tool turret and Pico Systems Universal Stepper Controller board.
The following user(s) said Thank You: tommylight
Please Log in or Create an account to join the conversation.
- tommylight
- Away
- Moderator
Less
More
- Posts: 19106
- Thank you received: 6398
07 Jul 2020 19:01 #173894
by tommylight
Replied by tommylight on topic 8 Position Tool Turret (unreliable)
Nice, you are welcomed, always.
Please Log in or Create an account to join the conversation.
Time to create page: 0.133 seconds