Small victory in the war against the Cincinnati cinturn 12u

More
18 Nov 2022 20:51 #257066 by smc.collins
will test tonight, was tired, i thought loadrt was there thanks for the pointers

Please Log in or Create an account to join the conversation.

More
19 Nov 2022 01:00 - 19 Nov 2022 01:40 #257086 by smc.collins
Got the tool changer to load, there is a lot of stuff between the metal and the program. Out of curiosity, why is python being used  for this. I understand hal mapping the tool changer commands, I just don;t understand why python is remapping the m6 calls. seems like s strange way to remap those call. Why not just make a few additions to the interpreter to allow for this natively ?? seems like a lot of extra complexity for little gain. 

Anyhow, next up, test the logic tomorrow, hopefully nothing breaks, then onto fine tuning servos. I think I have the Z over damped, it gets hissy about stopping suddenly and throws position faults. eh well. I am sure this saga will continue as I add more to the machine. 

At least I will be able to get electric bicycle parts up and moving out the door, which will help several small local business !!! and it won't hurt me either. 

To be continued
Last edit: 19 Nov 2022 01:40 by smc.collins.

Please Log in or Create an account to join the conversation.

More
20 Nov 2022 00:32 - 20 Nov 2022 01:38 #257133 by smc.collins
OK, so some action,m I was able to verify all the pin positions, switch functions etc. For some reason, output-05 turret unclamp is always active and output-08 is never called. I have no idea what is going on here, all of the pin and function assignments look fine. I am attaching all of my config files. It's cold I am tired, someone tell me what the hell I am doing wrong here.  The entire machine config is in the zip folder. I did get it to do lathey mclathe things today !!!

Some things I don't seem to be able to get working, despite following multiple tutorials,. 

The wireless xhc pendant, no idea what's going on there, I do see it in listusb though. 
I have the basic ladder logic for the chuck ready, I just need to connect it to a output. 
The tool changer, I have no idea what I am doing wrong, I have read what I can find and it looks like it should work ??? I am stumped, and when you power the machine, it automatically unlocks the turret ???? 


edit, found Tommy's tutorial on velocity servo tuning. going to get after it tomorrow 



 
Attachments:
Last edit: 20 Nov 2022 01:38 by smc.collins.

Please Log in or Create an account to join the conversation.

More
20 Nov 2022 00:39 #257135 by smc.collins
and of course, vid of the lathe doing some air cutting

youtube.com/shorts/p6bJcQHPN-s

Please Log in or Create an account to join the conversation.

More
20 Nov 2022 18:03 - 20 Nov 2022 20:58 #257170 by smc.collins
Derp

Doh, my turret is always locked by defualt, it unlocks, DOH


Wrong   #assign to turret unclamp relay 
Wrong   net car-lock motion.digital-out-01

Correct
#assign to turret unclamp relay 
net car-lock motion.digital-out-01
setp hm2_5i25.0.7i77.0.0.output-01-invert true

jesus, I need more sleep

Edit, not the fix, wtf am I missing here ? It did fix my issue with the relay being on however. 

Need more servo tuning, but pretty solid up to 150ipm, which, is really fast for this old machine. Gotta work on the spindle pid next and deal with some drive settings that don't match well causing instability at full speed. 

I still don't see what it is that I am doing wrong here. 

 
Last edit: 20 Nov 2022 20:58 by smc.collins.

Please Log in or Create an account to join the conversation.

More
20 Nov 2022 22:38 - 20 Nov 2022 22:38 #257183 by smc.collins
latest config, I need help with figuring out WHY this carousel component isn't working for me, it's all in the zip folder. I fixed a few  errors in the hal files from before. I need more sleep

 
Attachments:
Last edit: 20 Nov 2022 22:38 by smc.collins.

Please Log in or Create an account to join the conversation.

More
21 Nov 2022 00:17 - 21 Nov 2022 00:19 #257186 by smc.collins

The conv instances are numbered (starting at zero)

linuxcnc.org/docs/stable/html/man/man9/conv_float_s32.9.html

Try
addf conv-float-s32.0 servo-thread


 
 

          the s32.0   is for carousel Zero and if it was for s32.10 is would be for carousel 10 ? is that the naming convention ? a servo thread for each carousel ? 
I just realized I didn't catch that the first time I read your post. I will try that tomorow. 
Last edit: 21 Nov 2022 00:19 by smc.collins.

Please Log in or Create an account to join the conversation.

More
21 Nov 2022 00:24 #257187 by smc.collins
This forum software makes copy and paste so difficult and quote is ridiculous.

net car-pos-s32 conv-float-s32.2.out carousel.0.pocket-number

should be

net car-pos-s32 conv-float-s32.0.out carousel.0.pocket-number

Is this correct ?

Please Log in or Create an account to join the conversation.

More
21 Nov 2022 21:57 - 21 Nov 2022 22:33 #257266 by smc.collins
bleh, fighting spindle motor tuning, Looks like the tacho voltage might be a bit to high but the Servos are ROCK SOLID at 300ipm with zero deviation and nice flat well clamped voltages. 

I've been rereading the comments, so I am posting the relevant section with the current portions I just revised. I am commenting out the manual tool change IO " I hope this is correct" 

And adding the 3 lines Andy indicated needed to be added. 

 #loadusr -W hal_manualtoolchange
#net tool-change-request     iocontrol.0.tool-change       =>  hal_manualtoolchange.change
#net tool-change-confirmed   iocontrol.0.tool-changed      <=  hal_manualtoolchange.changed
#net tool-number             iocontrol.0.tool-prep-number  =>  hal_manualtoolchange.number
#net tool-prepare-loopback   iocontrol.0.tool-prepare      =>  iocontrol.0.tool-prepared


net T-loop iocontrol.0.tool-prepare => iocontrol.0.tool-prepared

net start-tool-change iocontrol.0.tool-change => carousel.0.enable
net tool-change-finished carousel.0.ready => iocontrol.0.tool-changed
Last edit: 21 Nov 2022 22:33 by smc.collins.

Please Log in or Create an account to join the conversation.

More
22 Nov 2022 03:27 - 22 Nov 2022 04:18 #257297 by smc.collins
 o<toolchange> sub

#M19 R0 ;align the spindle

#; only unload the tool if there is a tool in the spindle
#; This assumes that the carousel is already aligned correctly.
#; It is important to unload the tool before shutting down the machine.

#O100 IF [#<tool_in_spindle> GT 0]
# G53 G0 Z -100

# M64 P2 ; move arm in
# M66 P2 L3 Q5 ; wait for arm-in = true
# O104 if [#5399 LT 0]
# (abort, failed to move arm in)
# O104 endif

# M64 P3 ; release tool
#M66 P3 L3 Q2 ; wait for tool-released = true
#O105 if [#5399 LT 0]
# (abort, failed to release tool)
#O105 endif

#O100 ENDIF

G53 G0 Z0

O200 IF [#<selected_tool> GT 0]

M65 P1 ; unlock carousel
M66 P1 L4 Q1 ; wait for locked=false
O106 if [#5399 LT 0]
(abort, failed to unlock carousel)
O106 endif

M68 E0 Q#<selected_pocket> ;set the carousel to move to the right pocket

M64 P0 ; start carousel
G4 P2
M66 P0 L3 Q60 ; wait for carousel finished
M65 P0; stop carousel
O107 if [#5399 LT 0]
(abort, failed to align carousel)
O107 endif
M64 P1 ; lock carousel
M66 P1 L3 Q1 ; wait for locked=true
O108 if [#5399 LT 0]
(abort, failed to lock carousel)
O108 endif

# M64 P2 ; move arm in (might already be in)
# M66 P2 L3 Q5 ; wait for arm-in = true
#O109 if [#5399 LT 0]
# (abort, failed to move arm in)
#O109 endif

#G53 G0 Z-100 ; pick up the tool

O200 ENDIF

#M65 P3 ; clamp tool
#M66 P3 L4 Q2 ; wait for tool-released = false
#O110 if [#5399 LT 0]
# (abort, failed to clamp tool)
#O110 endif

#M65 P2 ; move arm back out
#M66 P4 L3 Q5 ; wait for arm-out = true
#O111 if [#5399 LT 0]
# (abort, failed to move arm in)
#O111 endif


o<toolchange> endsub [1]


I commented out the portions I removed, I don't think I screwed that up but I will double check

shit, smack forehead with 2x4, I put in all the IO and somewhere in my frustration forgot to save it, DOH. Random curiosity, Is there a way to call and set g53 in LinuxCNC, I was reading about it earlier and I didn't come to a good conclusion, so I am considering using g59, basically I just need a safe distance offset for the tool changer to operate from 
Last edit: 22 Nov 2022 04:18 by smc.collins.
The following user(s) said Thank You: tommylight

Please Log in or Create an account to join the conversation.

Moderators: piasdom
Time to create page: 0.215 seconds
Powered by Kunena Forum