link two different signals to the same output

More
2 years 8 months ago - 2 years 8 months ago #292423 by greg23_78
my macro works straight away, calling it manually with the mdi works,
I looked to see if the home-carousel signal changes to high when I press home-all. the signal doesn't receive the information, so the problem is really with halui.home-all.

should i create joint_3 and set up HOME_SEQUENCE = 3 or there is a simpler solution for the homing sequence because joint.0.homed instead of halui.home-all allows the carousel to work, but at the detriment of an axis that does not perform the homing sequence.
 
Last edit: 2 years 8 months ago by greg23_78.

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

More
2 years 8 months ago #292469 by spumco
Are you using an external button or a user-created screen button to trigger halui.home-all?

If you're just using a standard on-screen 'home-all' button or command then halui.home-all isn't getting triggered.  The GUI is likely using it's own python command to trigger the home-all function.

Try connecting your halui.mdi macro to motion.is-all-homed.  That should trigger the carousel to home after all joints are homed regardless of what initiates the home-all sequence.

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

More
2 years 8 months ago #292554 by greg23_78
thank you, it works perfectly. i have a question: isn't there a danger that MDI_command-01 will remain continuously high?

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

More
2 years 8 months ago #292575 by spumco

thank you, it works perfectly. i have a question: isn't there a danger that MDI_command-01 will remain continuously high?
 
Yes.  If you look back in the thread I pasted a snip from one of my configs that has a 'one-shot' component in it.

Using a oneshot between the motion.all-is-homed and the halui MDI command is the way to keep the is-homed from forcing the MID command high all the time.  The same result can be had from classic ladder using a rising-edge coil.

Either way (HAL or ladder), you want a 'blip' to trigger the MDI command - like a momentary button instead of a on/off switch.

If you need help setting up the oneshot after reading the LCNC manual (in the components section), just ask.

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

More
2 years 8 months ago #292678 by greg23_78
everything is working correctly, thank you spumco for your help.
for anyone interested in the carousel home in the home-all sequence.

Ini:
Code:
[RS274NGC] REMAP= M901  modalgroup=10  ngc=home_carousel [HALUI] MDI_COMMAND = M901

home_carousel.ngc
Code:
o<home_carousel> sub ; Move carousel section M68 E0 Q1 ;set the carousel to move to the right pocket     M64 P0  ;Enable Carousel     G4 P2  ; Wait 2 seconds     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      o<home_carousel> endsub [1]   

hal
Code:
loadrt oneshot count=1 addf oneshot.0                servo-thread setp oneshot.0.width 1 net home-carousel-oneshot-in         oneshot.0.in <= motion.is-all-homed net home-carousel-oneshot-out       oneshot.0.out => halui.mdi-command-01

I'll see later if I need to reset the pulse



 
The following user(s) said Thank You: spumco

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

Time to create page: 0.312 seconds
Powered by Kunena Forum