- Hardware & Machines
- CNC Machines
- Turning
- Small victory in the war against the Cincinnati cinturn 12u
Small victory in the war against the Cincinnati cinturn 12u
Set num-sense to 3, connect the switches to IO pins and then to the sense pins in HAL, wire up the strobe the same way (to the carousel.0.strobe pin).
linuxcnc.org/docs/stable/html/man/man9/carousel.9.html
Please Log in or Create an account to join the conversation.
- smc.collins
- Offline
- Platinum Member
-
- Posts: 660
- Thank you received: 113
andypugh post=256778 userid=723Why not just use the built-in decoding of the carousel comp?
Set num-sense to 3, connect the switches to IO pins and then to the sense pins in HAL, wire up the strobe the same way (to the carousel.0.strobe pin).
linuxcnc.org/docs/stable/html/man/man9/carousel.9.html
That was indeed my exact plan. I just don't know how the encoding works ? is it absolute or relative ? does it home ? having a persistent machine state is my preference, so I don't have to constantly reprogram my tools every time I restart the machine. I'm also fleshing out notes for a good tutorial, for Linux CNC and pnconf.
Is there a document explaining the binary encoding or are all BCD enodings the same ? Anyways, I have a PLC engineer coming tonight, and I think we should be able to get this working.
I am looking at the 2 speed gear box stuff right now
Please Log in or Create an account to join the conversation.
For a lathe you probably don't need a remap, just connect iocontrol.0.selected-pocket to the carousel.0.pocket-number, iocontrol.0.tool-change to the carousel.0.enable and carousel.0.ready to iocontrol.0.tool-changed.
(You probably need to make sure that your G-code moves to a safe place to tool-change. A mill can just retract to max-Z in general but that doesn't always work for a lathe.
Please Log in or Create an account to join the conversation.
- smc.collins
- Offline
- Platinum Member
-
- Posts: 660
- Thank you received: 113
Touch off Z
Touch off X
Set Gxx as the offset, I am not super familiar with G code so I have been trying to figure which type of Gcode to call here. I have been reading the G code reference a lot. I can also program the tool change position in the post processor to. I am thinking g53 and set the potion clear of the work, this will save cycle time and the potential for a accident.
Defective relay board stalled the evening, but we did make some progress with ladder programming, now I am getting it all wired up in the hal files. I did fire up the bcd switches and get a station number.
"For a lathe you probably don't need a remap, just connect iocontrol.0.selected-pocket to the carousel.0.pocket-number, iocontrol.0.tool-change to the carousel.0.enable and carousel.0.ready to iocontrol.0.tool-changed."
Can you explain this in a bit more detail. It's just looking like a lot of IO calls with no particular rationality
Please Log in or Create an account to join the conversation.
For the moment I will ignore the fact that lathes normally change tools with just a T command not an M6.
When LinuxCNC encounters a T command it puts the pocket number on the pin iocontrol.0.tool-prep-pocket and sets the pin iocontrol.0.tool-prepare
The tool changer logic is expected to monitor these pins and act accordingly.
When iocontrol.0.tool-prepared is set to true, execution continues.
It is very common to connect these two pins so that execution passes straight through while the changer is selecting the next tool. eg:
net T-loop iocontrol.0.tool-prepare => iocontrol.0.tool-prepared
When LinuxCNC sees an M6 command, it pauses and sets the pin iocontrol.0.tool-change and waits for iocontrol.0.tool-changed to go high.
So, you use iocontrol.0.tool-change to activate the carousel motion, and when it has done its thing, you use carousel to set iocontrol.0.tool-changed, and programme execution continues.
net start-tool-change iocontrol.0.tool-change => carousel.0.enable
net tool-change-finished carousel.0.ready => iocontrol.0.tool-changed
With the HAL connections here your G-code would need t use the M6 Tnn G43 combination for each tool change. Using T-only needs a remap and is probably best handled later.
Please Log in or Create an account to join the conversation.
- smc.collins
- Offline
- Platinum Member
-
- Posts: 660
- Thank you received: 113
he's also wanting to learn Linux cnc for custom projects, it's a win for everyone.
I'll digest the t commands, I'm going to swap the tailstock for a sub spindle soon. i might want to use the m6 command i have mapped and modify my post
Please Log in or Create an account to join the conversation.
- smc.collins
- Offline
- Platinum Member
-
- Posts: 660
- Thank you received: 113
I think I will stick with the current m6 remap for now.
Please Log in or Create an account to join the conversation.
- smc.collins
- Offline
- Platinum Member
-
- Posts: 660
- Thank you received: 113
HAL: ERROR: function 'conv-float-s32' not found
./toolchangeBCD.hal:4: addf failed
7761
Stopping realtime threads
Unloading hal components
RTAPI_PCI: Unmapped 65536 bytes at 0x7f2242f56000
Note: Using POSIX realtime
ok, I've read the through threads, why is this working in sim yet failing here ???
Please Log in or Create an account to join the conversation.
- tommylight
-
- Away
- Moderator
-
- Posts: 18562
- Thank you received: 6218
addf conv-float-s32
But there is no :
loadrt conv-float-s32
Try adding the last line in hal, before the addf line.
Please Log in or Create an account to join the conversation.
linuxcnc.org/docs/stable/html/man/man9/conv_float_s32.9.html
Try
addf conv-float-s32.0 servo-thread
Please Log in or Create an account to join the conversation.
- Hardware & Machines
- CNC Machines
- Turning
- Small victory in the war against the Cincinnati cinturn 12u