HAL led question

More
6 years 4 months ago #170401 by anfänger
HAL led question was created by anfänger
Hello I have a question about the Hal led widgets. They seem to need a change input before they work properly. They allways start red even if the signal is low. After the signal switched they work correctly. What am I doing wrong?

Thanks Patrick

Please Log in to join the conversation.

More
6 years 4 months ago #170440 by bbsr_5a
Replied by bbsr_5a on topic HAL led question
you shoudt use it alwys in a POSTGUI Hal setup
and or on a towpass hal
as the interpreter is only running once on setup and external signal like LED are arent set

Please show how your LED is connected in the HAL and on the qt setup

Please Log in to join the conversation.

More
6 years 4 months ago #171573 by anfänger
Replied by anfänger on topic HAL led question
have used the qt designer (what can I post to help here) to add the Hal button and led

in my Postgut Hal is following section:
Code:
#E-stop net reset <= qtpyvcp.hb1.out net reset => qtpyvcp.led4.on net estop-button => qtpyvcp.led1.on net i-pressure-ok => qtpyvcp.led2.on net i-temp-bimetall => qtpyvcp.led3.on net latch-out => qtpyvcp.led5.on

they work fine after being toggled but before they are always on even if the state should be off.

thanks Patrick

Please Log in to join the conversation.

More
6 years 3 months ago #173268 by KCJ
Replied by KCJ on topic HAL led question
Hello Patrick,

Sorry for the long delay, I've been extremely busy with real work!

There is no way for the HAL widgets to know what state to start up with. Since the connections are done in HAL, the widget does not know what pin it is connected to.

What you should do in this case is either configure the initial state of the widget to match the default HAL pin state in QtDesigner (see attached screenshot), or better, explicitly setp the LED input pin in your postgui HAL file.

Attachment not found



Cheers,
Kurt

Please Log in to join the conversation.

More
6 years 3 months ago #174289 by anfänger
Replied by anfänger on topic HAL led question
no worries, this is just hobby an a minor detail of my gui.

I use this pins to see if something went wrong during power up. So just setting the state they should have doesn't help me if there comes an error signal from the control before linuxcnc is has started.

Can I use setp with getp in one line?

like
setp qtpyvcp.led1.on getp estop-button
net estop-button => qtpyvcp.led1.on

this would bring me the results I want to have without too much trouble.

Thanks for your help

Please Log in to join the conversation.

Time to create page: 0.095 seconds
Powered by Kunena Forum