Small victory in the war against the Cincinnati cinturn 12u

More
3 years 11 months ago #257650 by smc.collins
I can do that tomorrow, I am done for the day. It is definitely timing out though, it is returning with the error fault failure from the gcode file.

Please Log in to join the conversation.

More
3 years 11 months ago #257698 by smc.collins
I changed to BCD coding, and now the pocket numbers on the turret match the position. The turret is still failing to pause for the lock. Is there anyway to watch the Gcode execution so I can see where this is stalling ? 

Once it errors out, carousel does not run until I restart LinuxCNC, I don't know how to find a bug like this, in either my work or I tripped on a issue somewhere. 
 

Please Log in to join the conversation.

More
3 years 11 months ago #257802 by andypugh

The turret is still failing to pause for the lock. Is there anyway to watch the Gcode execution so I can see where this is stalling ? 
 
You could potentially try single-stepping through the routine. You would probably need to load it as a G-code programme and add some setup at the beginning so that it is set up the same way as when called as part of a toolchange. 

Is it the "M66 P0 L3 Q60 ; wait for carousel finished" which isn't working? 
I don't see any connection in your HAL to motion.digital-in-00 which might explain it. 

Please Log in to join the conversation.

More
3 years 11 months ago #257804 by smc.collins
i was thinking that might be the issue but i can't find a declaration of what the gcode io calls relate toi started with the vmc grey sim to work from. i thought that was coming from a carousel pin. if not, where is it getting a signal or should it get a signal from ? turret lock switch ??

what would that be connected to ? i did finally figure out how to get the m-codes for the dwell time working properly. 

what should motion.digital.in.00 get a signal from ???

 

Please Log in to join the conversation.

More
3 years 11 months ago #257807 by andypugh

what should motion.digital.in.00 get a signal from ???
 
It's waiting for a "toolchanger in position" signal, I think. 

So probably the carousel.N.ready pin. 

But what is the actual problem? Does the carousel rotate to the correct position then sit there until time-out? 

Please Log in to join the conversation.

More
3 years 11 months ago #257813 by smc.collins
Ok, so here is my current hal file, made a note with the addition

The problems I am having are multifaceted. 

1. my turret needs more release time, I can hear the mechanism scrape when motion start, so I am adding a delay in gcode after the unlock

2. the strobe is seeing some overshoot on motor shut off, I am adding a delay after strobe, I may institute debounce

3. the turret is not locking because the turret has to much inertia to halt suddenly and for the stobe/index ram to position is correctly, so the lock command happens to soon after car-fwd stops, I fixed that in gcode tonight. I didn't realize I had to add the m6x commands relevant, I thought that the interpreter would just assume it was all the same command, my misunderstand there on the new line issue. 

4. the configuration I had runs in the vismach grey with all of my changes, so I find it confusing. 

After a tool change, and it is getting to the correct pocket, even matches the oem numbering on the turret which is nice, I cannot get a tool change to happen unless I restart linuxcnc, and the last few errors I got were carousel not locked. So I do have a fix for that now. 



Code:
 loadrt carousel pockets=6 dir=1 encoding=Binary 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-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   #<-------------------------   add this line ???? #assign locked pin net car-locked  <=  hm2_5i25.0.7i77.0.0.input-00 #asign to turret unlock switch net car-ready    <= hm2_5i25.0.7i77.0.0.input-01 #assign to turret unclamp relay net car-lock  carousel.0.active   => hm2_5i25.0.7i77.0.0.output-05 #assign to turret rotate motor relay net car-fwd   carousel.0.motor-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  <=  hm2_5i25.0.7i77.0.0.input-03 net carousel.0.1 carousel.0.strobe [u][i][b]#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   [/b][/i][/u]

Please Log in to join the conversation.

More
3 years 11 months ago #257814 by smc.collins
here's my gcode with the additional Dwell times added to deal with mechanical limitations 

Code:
 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.      O100 IF [#<selected_tool> GT 0]     G53          M65 P1 ; unlock carousel     M66 P1 L4 Q1 ; wait for locked=false     M66 G4 P0.5     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         M66 P0 L3 Q60 ; wait for carousel finished     M66 G4 P0.5      O107 if [#5399 LT 0]         (abort, failed to align carousel)     O107 endif          M65 P0; stop carousel     M65 G4 P1.5     M64 P1 ; lock carousel     M66 P1 L3 Q1 ; wait for locked=true     O108 if [#5399 LT 0]         (abort, failed to lock carousel)     O108 endif          O200 ENDIF   

Please Log in to join the conversation.

More
3 years 11 months ago #257835 by andypugh

After a tool change, and it is getting to the correct pocket, even matches the oem numbering on the turret which is nice, I cannot get a tool change to happen unless I restart linuxcnc

This issue is likely to be with the iocontrol.0.tool-prepare -> iocontrol.0.tool-prepared and iocontrol.0.tool-change -> iocontrol.0.tool-changed handshakes.

You probably want to connect the tool-change/changed directly to each other, but have the carousel alignment in the middle of the tool-prepare/prepared chain. (As I think you have)

Please Log in to join the conversation.

More
3 years 11 months ago #257873 by smc.collins
so, if I'm reading between the lines here, the hal.is being executed top to bottom ?

I'm a bit lost here, if you indicate i have it properly then I'm more confused, btw, i made a note in my hal code above, is that the correct addition to the hal.file ???


thanks for any clarification

Please Log in to join the conversation.

More
3 years 11 months ago #257895 by andypugh

so, if I'm reading between the lines here, the hal.is being executed top to bottom ?

Yes, though as long as the component pins exist before you try to net them it doesn't really matter what order you do things in.

I'm a bit lost here, if you indicate i have it properly then I'm more confused, btw, i made a note in my hal code above, is that the correct addition to the hal.file ???


I don't think so as you are already using the signal name "car-ready" for what seems to be a completely different purpose.

You have
Code:
#asign to turret unlock switch net car-ready <= hm2_5i25.0.7i77.0.0.input-01
Though as that currently is it isn't doing anything as the value of _that_ car-ready isn't going anywhere.

Please Log in to join the conversation.

Time to create page: 0.111 seconds
Powered by Kunena Forum