link two different signals to the same output

More
2 years 9 months ago #291628 by greg23_78
I'm sorry for renaming the topic, but I'll keep your note in mind.

I'd prefer a parrallel of the 3 axes, but after home-all activity that doesn't disturb me. i don t need any pauses or confirmations or turning off the carousel homing function.

the most simple is good for me

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

More
2 years 9 months ago #291644 by spumco
Are you still in the building/fiddling phase of your ATC, or have you tried it out yet in meat-space?

Reason I ask is that carousel.comp will automatically home the carousel to position-1 the first time it's enabled (when carousel.comp is in INDEX or COUNTS mode).

So unless there's another reason (see below), you can just run your first tool change and it'll take slightly longer.  Carousel will home, then go to the commanded pocket, and then set carousel.N.ready HIGH so that your toolchange macro sequence can use the 'ready' signal to make the next move (whatever that is in your tool change choreography).

If you really want it to home during the axis homing sequence, we'll have to cook up a connection scheme using something like halui and a user M-code.

Mine looks like this in hal:
Code:
setp oneshot.1.width    1 net HOMED-ALL           <=  motion.is-all-homed net HOMED-ALL           =>  oneshot.1.in net HOMED-ALL-TRIG      <=  oneshot.1.out net HOMED-ALL-TRIG      =>  or2.10.in0 net BTN-HOME-ATC        =>  or2.10.in1 net HOME-ATC            <=  or2.10.out net HOME-ATC            =>  halui.mdi-command-02

And the mdi-command-02 calls M13. 

M13 is mapped to m13.ncg, which sets the carousel destination pocket to 1 (M68), then carousel enable (M64), then checks for carousel ready (M66), then disables (M65).

The above results in the ATC homing immediately after all the axes are homed, or I press a button because I want to fiddle with the ATC and I need it to home without screwing around homing the whole mill.

There's other stuff in M13, but the only reason I don't just let carousel do it's thing automatically is that I'm using the Probe Basic GUI... and the on-screen ATC animation is controlled through some secret-code gibberish contained in the M13 macro.  It's all there to keep the screen dingus synchronized with the meat-space ATC.

 
The following user(s) said Thank You: tommylight

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

More
2 years 9 months ago #291692 by greg23_78
I think I can see the procedure, we create a macro and activate it using the mdi, but I've validated the mandatory home condition, I don't think I can use the mdi when the homing is not done. Can I create a macro that doesn't respect these conditions?

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

More
2 years 9 months ago #291713 by spumco
As with everything in LCNC, there's a bunch of ways to skin the cat.

You can activate a macro before homing if you have [TRAJ] NO_FORCE_HOMING = 1 in your INI file.

Another way is to use classic ladder.  This gets a little complicated, but:
  • connect your buton-in (physical or GUI button) to a classic ladder bit-in pin
  • set up ladder to trigger an out-bit pin using whatever conditions you want
    • can add some interlock logic with other pins - machine-on, mode-is-manual, etc.
  • A ladder out-bit pin is connected to an or2.N.in0 pin
    • can use a rising or falling edge coil to 'blip' the out pin so it doesn't stay high if you're using a toggle
  • The other or2.N.in1 pin is connected to your existing carousel enable signal
  • or2.out is connected to carousel.N.enable
    • Even if you blip the enable pin it'll complete the homing routine
There are other ways to do it, but those are the first couple off the top of my head.

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

More
2 years 8 months ago #292417 by greg23_78
I tried with macros.

To try this, I configured my config like this

INI

[RS274NGC]
REMAP= M901  modalgroup=10  ngc=home_carousel

[HALUI]
MDI_COMMAND = M900 (it is for other thing)
MDI_COMMAND = M901

[TRAJ] NO_FORCE_HOMING = 1

NGC - home_carousel
Code:
o<home_carousel> sub ; Move carousel section M68 E0 Q1 ;set the carousel to move to the right pocket M64 P0  ;Enable Carousel M66 P0 L3 Q120 ; wait for carousel-ready = true     o203 if [#5399 LT 0]     (abort, carousel not finished)     o203 endif      M65 P0  ;Disable carousel enable o900 ENDIF     o<home_carousel> endsub [1]   

hal
Code:
net home-carousel halui.mdi-command-01 <= halui.home-all

But no movement from my carousel when I press the home-all button. I presume that halui.home-all is not correct, what can I replace it with?

 

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

More
2 years 8 months ago #292420 by spumco
Does the 901 macro run from the MDI screen? (not calling it with hal signal)

If so, can you watch the pins and signals in halshow and see if they all do what you expect?  That's the best way to diagnose this sort of thing.

I'd also run LCNC from the command prompt in a terminal and watch for an error when you run the 901 macro - either from MDI or via the halui.home-all button.

Basically trying to figure out if it's the macro or the hal connections.

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

Time to create page: 0.280 seconds
Powered by Kunena Forum