Small victory in the war against the Cincinnati cinturn 12u

More
29 Nov 2022 18:03 #258003 by smc.collins
I'll try g4 again if this doesn't work, but my hold is supposed to start after the digital parameter goes low, then it goes to lock the carousel

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

More
01 Dec 2022 00:16 - 01 Dec 2022 00:26 #258173 by smc.collins
still not working, had to post from the Lathe, what I do know, is that something is causing a abort after reaching the desired pocket, and at that point, it will not execute any further. these 2 files are directly from the machine


ngc

o<toolchange> sub



; 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.


    G53 G0 X16.00

O100 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   <--- dies here once the pocket is reached, all code execution ends
     
   everything after start carousel is being ignored ?????? 

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

   

   

    

O100 ENDIF





o<toolchange> endsub [1]


M2




attaching hal to look for obvious errors. 

hal

loadrt carousel pockets=6 dir=1 encoding=bcd num_sense=3 parity=0
loadrt conv_float_s32    
addf carousel.0 servo-thread
addf conv-float-s32.0    servo-thread # G-code analogue outputs are float-type




net car-enable motion.digital-out-00 carousel.0.enable
net car-ready carousel.0.ready motion.digital-in-00
net car-fwd carousel.0.motor-fwd
net car-lock  carousel.0.active
net car-pos-req motion.analog-out-00 conv-float-s32.0.in
net car-pos-s32 conv-float-s32.0.out carousel.0.pocket-number
net car-ready carousel.0.ready motion.digital-in-00


#assign locked pin
net car-locked  <=  hm2_5i25.0.7i77.0.0.input-00




#assign to turret unclamp relay
net car-lock     => hm2_5i25.0.7i77.0.0.output-05




#assign to turret rotate motor relay
net car-fwd   => hm2_5i25.0.7i77.0.0.output-08






#digital inputs assign BCD switches
net bit0   carousel.0.sense-0 <= hm2_5i25.0.7i77.0.0.input-04
net bit1  carousel.0.sense-1 <= hm2_5i25.0.7i77.0.0.input-05
net bit2  carousel.0.sense-2 <= hm2_5i25.0.7i77.0.0.input-06

#Strobe input, sinals when turret is aligned with pocket to lock assign to Strobe switch

net carousel.0.1 carousel.0.strobe

net carousel.0.1  <=  hm2_5i25.0.7i77.0.0.input-03













#net tool-prep-loop iocontrol.0.tool-prepare iocontrol.0.tool-prepared  <--- if I uncomment this line, I get a signal already connected to t-loop fault at startup

net tool-change-loop iocontrol.0.tool-change iocontrol.0.tool-changed

loadusr sim_pin carousel.0.jog-fwd


 
Last edit: 01 Dec 2022 00:26 by smc.collins.

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

More
01 Dec 2022 02:23 - 01 Dec 2022 02:25 #258179 by smc.collins
I did a quick  cleanup of my hal file to make it more legible, it appears to be identical except for some IO to my working sim file now.  
Attachments:
Last edit: 01 Dec 2022 02:25 by smc.collins.

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

More
01 Dec 2022 08:45 #258194 by mgm
I am currently also busy with my carousel
This is my post:
forum.linuxcnc.org/10-advanced-configura...f-a-carousel-changer

I attach you my working hal! 

File Attachment:

File Name: carousel_01.hal
File Size:2 KB
Attachments:
The following user(s) said Thank You: smc.collins

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

More
01 Dec 2022 14:47 - 01 Dec 2022 14:49 #258213 by andypugh

still not working, had to post from the Lathe, what I do know, is that something is causing a abort after reaching the desired pocket,

 
Which of the abort messages is it showing when it aborts?
Last edit: 01 Dec 2022 14:49 by andypugh.

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

More
01 Dec 2022 14:53 #258214 by andypugh
Open a halmeter and see if motion.digital-in-00 goes true.
Repeat for all the other inputs and outputs. Which one isn't doing what it should?

The main question is, does carousel.0.ready go true when the carousel is in the right place?

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

More
01 Dec 2022 15:26 #258219 by smc.collins
will do tonight, there are no error messages other than failed to lock carousel, which is obvious, because there isn't a pause for the mechanism to settle and align.

other than this issue of it failing at some point it does work, but it's not working properly.


i will do a hal scope recording of the requested parameters and post it here later. at work, maybe in 5-6 hrs.

back to the 997 turbo for now tt

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

More
01 Dec 2022 15:48 #258223 by andypugh

will do tonight, there are no error messages other than failed to lock carousel, 


That must mean that it is getting to here, if that is the message:
O108 if [#5399 LT 0]
        (abort, failed to lock carousel)
    O108 endif

So it isn't getting a "locked" signal on motion.digital-in-01. Which seems likely as it is not connected in HAL as far as I can see.

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

More
01 Dec 2022 22:42 - 01 Dec 2022 22:45 #258266 by smc.collins
It ignores all of my attempts to pause the lock cycle, all of them.

net car-ready carousel.0.ready motion.digital-in-00

add

#Carousel Ready
net car-ready <= hm2_5i25.0.7i77.0.0.input-01-not  # this switch will be open when the carousel is locked


this will be the hal file after this change 

loadrt carousel pockets=6 dir=1 encoding=bcd num_sense=3
loadrt conv_float_s32   #(Already loaded in sim_vmc.hal)
addf carousel.0 servo-thread
addf conv-float-s32.0   servo-thread # G-code analogue outputs are float-type
net car-enable motion.digital-out-00 carousel.0.enable
net car-ready carousel.0.ready motion.digital-in-00
net car-pos-req motion.analog-out-00 conv-float-s32.0.in
net car-pos-s32 conv-float-s32.0.out carousel.0.pocket-number
#Signal Connections to Hal Components
net car-fwd              carousel.0.motor-fwd
net car-lock             carousel.0.active
net carousel.0.strobe    carousel.0.in
#Digital  inputs
net bit0   carousel.0.sense-0 <= hm2_5i25.0.7i77.0.0.input-04
net bit1   carousel.0.sense-1 <= hm2_5i25.0.7i77.0.0.input-05
net bit2   carousel.0.sense-2 <= hm2_5i25.0.7i77.0.0.input-06
net        carousel.0.in <= hm2_5i25.0.7i77.0.0.input-03
#Carousel Ready
net car-ready <= hm2_5i25.0.7i77.0.0.input-01-not
#assign locked pin
net car-locked  <=  hm2_5i25.0.7i77.0.0.input-00

#assign to turret unclamp relay
net car-lock    => hm2_5i25.0.7i77.0.0.output-05

#assign to turret rotate motor relay
net car-fwd    => hm2_5i25.0.7i77.0.0.output-08


#net tool-prep-loop iocontrol.0.tool-prepare iocontrol.0.tool-prepared
net tool-change-loop iocontrol.0.tool-change iocontrol.0.tool-changed

loadusr sim_pin carousel.0.jog-fwd
 
Last edit: 01 Dec 2022 22:45 by smc.collins.

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

More
01 Dec 2022 23:54 #258273 by andypugh
I think that your G-code is still waiting for a carousel-locked signal on motion.digital-in-01 and there is nothing related to that in the HAL.

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

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