HAL led question

More
06 Jun 2020 20:31 #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 or Create an account to join the conversation.

More
07 Jun 2020 07:29 #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
The following user(s) said Thank You: KCJ

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

More
14 Jun 2020 07:55 #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:
#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 or Create an account to join the conversation.

More
01 Jul 2020 01:16 #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.



Cheers,
Kurt
Attachments:

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

Moderators: KCJLcvette
Time to create page: 0.092 seconds
Powered by Kunena Forum