link two different signals to the same output
23 Jan 2024 21:05 - 23 Jan 2024 21:07 #291467
by greg23_78
link two different signals to the same output was created by greg23_78
I have a problem with the programming of my hal, I would like one output to be linked to two different signals.
net car-fwd carousel.0.motor-fwd hm2_5i25.0.7i77.0.0.output-08
net car-rev carousel.0.motor-rev hm2_5i25.0.7i77.0.0.output-08 hm2_5i25.0.7i77.0.0.output-13
I'm sure the solution isn't complicated but I'm having trouble finding it.
net car-fwd carousel.0.motor-fwd hm2_5i25.0.7i77.0.0.output-08
net car-rev carousel.0.motor-rev hm2_5i25.0.7i77.0.0.output-08 hm2_5i25.0.7i77.0.0.output-13
I'm sure the solution isn't complicated but I'm having trouble finding it.
Last edit: 23 Jan 2024 21:07 by greg23_78.
Please Log in or Create an account to join the conversation.
23 Jan 2024 21:25 - 24 Jan 2024 01:29 #291469
by spumco
Replied by spumco on topic link two different signals to the same output
net car-fwd <= carousel.0.motor-fwd
net car-fwd => or2.in0
net car-fwd => hm2_5i25.0.7i77.0.0.output-08
net car-rev <= carousel.0.motor-rev
net car-rev => or2.in1
net car-rev => hm2_5i25.0.7i77.0.0.output-13
net car-out <= or2.out
net car-out => hm2_5i25.0.7i77.0.0.output-08
Test it on something inexpensive before getting married to it.
EDIT - undumbing
net car-fwd => or2.in0
net car-rev <= carousel.0.motor-rev
net car-rev => or2.in1
net car-rev => hm2_5i25.0.7i77.0.0.output-13
net car-out <= or2.out
net car-out => hm2_5i25.0.7i77.0.0.output-08
Test it on something inexpensive before getting married to it.
EDIT - undumbing
Last edit: 24 Jan 2024 01:29 by spumco.
Please Log in or Create an account to join the conversation.
23 Jan 2024 23:54 #291477
by blazini36
Just remove "net car-fwd => hm2_5i25.0.7i77.0.0.output-08"
Replied by blazini36 on topic link two different signals to the same output
That won't work, you have car-fwd and car-out signals both linked to the hm2...output-08 pin which is a hal input pin. It's close though....net car-fwd <= carousel.0.motor-fwd
net car-fwd => or2.in0
net car-fwd => hm2_5i25.0.7i77.0.0.output-08
net car-rev <= carousel.0.motor-rev
net car-rev => or2.in1
net car-rev => hm2_5i25.0.7i77.0.0.output-13
net car-out <= or2.out
net car-out => hm2_5i25.0.7i77.0.0.output-08
Test it on something inexpensive before getting married to it.
Just remove "net car-fwd => hm2_5i25.0.7i77.0.0.output-08"
The following user(s) said Thank You: spumco
Please Log in or Create an account to join the conversation.
24 Jan 2024 01:28 #291482
by spumco
Replied by spumco on topic link two different signals to the same output
Good catch, thx.
Please Log in or Create an account to join the conversation.
25 Jan 2024 21:55 - 25 Jan 2024 22:11 #291626
by greg23_78
Replied by greg23_78 on topic link two different signals and caroussel homing
thank you for your reply, it wasn't complicated, I understand better now. thank you
i have another question, how do i insert a home of my caroussel (tool pocket number 1) during the homing of my 3 axes. (all home button)
type of my carrousel if necessary (loadrt carousel pockets=30 encoding=index num_sense=2 dir=2)
i have another question, how do i insert a home of my caroussel (tool pocket number 1) during the homing of my 3 axes. (all home button)
type of my carrousel if necessary (loadrt carousel pockets=30 encoding=index num_sense=2 dir=2)
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
Last edit: 25 Jan 2024 22:11 by greg23_78.
Please Log in or Create an account to join the conversation.
25 Jan 2024 22:14 #291627
by spumco
Replied by spumco on topic link two different signals and caroussel homing
Note - in the future, start a new thread for a new topic. I know it's 'just a little add-on question', but changing the thread title even if it's yours is frowned on and makes it harder for people to search later. I'm guilty of it, too, but I try not to make a habit of it.
On to your question...
When exactly do you want the carousel to home? At the start of the home-all activity, or after? or before the other axes move? Do you want any pauses or confirmations? or some way of turning off the carousel homing function - perhaps for testing or if you've got an issue to resolve?
On to your question...
When exactly do you want the carousel to home? At the start of the home-all activity, or after? or before the other axes move? Do you want any pauses or confirmations? or some way of turning off the carousel homing function - perhaps for testing or if you've got an issue to resolve?
The following user(s) said Thank You: tommylight
Please Log in or Create an account to join the conversation.
25 Jan 2024 22:24 #291628
by greg23_78
Replied by greg23_78 on topic link two different signals to the same output
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
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.
26 Jan 2024 06:05 #291644
by spumco
Replied by spumco on topic link two different signals to the same output
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:
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.
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:
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.
26 Jan 2024 22:50 #291692
by greg23_78
Replied by greg23_78 on topic link two different signals to the same output
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.
27 Jan 2024 03:24 #291713
by spumco
Replied by spumco on topic link two different signals to the same output
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:
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
Please Log in or Create an account to join the conversation.
Time to create page: 0.122 seconds