HAL Question

More
03 Jul 2020 22:01 #173557 by rodw
Replied by rodw on topic HAL Question
I tried heaps of options to get it to turn on until I did that with motion-type.

The space should not make any difference except to pedantic code reviewers. :side:

So if you want to test if the torch is shorted which is what I think you really want to do, you could use the or2 component so that power-on or the plasmac test button turn the relay.

You should know enough about hal by now to do that yourself :)

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

More
03 Jul 2020 22:19 #173561 by snowgoer540
Replied by snowgoer540 on topic HAL Question

I tried heaps of options to get it to turn on until I did that with motion-type.

The space should not make any difference except to pedantic code reviewers. :side:

So if you want to test if the torch is shorted which is what I think you really want to do, you could use the or2 component so that power-on or the plasmac test button turn the relay.

You should know enough about hal by now to do that yourself :)


My attention to detail knows no bounds :laugh:... except when I miss the obvious haha

You give me more credit than I deserve, but I’ll dork around with it and try to figure it out, there has to be an example out there I can plagiarize shamelessly! ;)
The following user(s) said Thank You: rodw

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

More
03 Jul 2020 23:05 - 03 Jul 2020 23:06 #173565 by snowgoer540
Replied by snowgoer540 on topic HAL Question
As it turns out, maybe I don't give myself enough credit...
loadrt  or2
addf    or2.0                   servo-thread
net plasmac:ohmic-enable => or2.0.in0
net ohmic:power => or2.0.in1
net or-out or2.0.out => hm2_5i25.0.7i76.0.0.output-01
And it works like I'd expect!

There's one thing I dont quite get with regard to HAL, why dont these follow the net <signal> <source> => <destination> convention:
net ohmic:power <= ohmicsense.power-on
net ohmic:power => hm2_5i25.0.7i76.0.0.output-01
Last edit: 03 Jul 2020 23:06 by snowgoer540.

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

More
03 Jul 2020 23:31 #173566 by phillc54
Replied by phillc54 on topic HAL Question
Unfortunately there is no convention, folk do it the way that suits them.

The => and <= are not required, they are only used to make it (supposedly) easily human readable.

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

More
03 Jul 2020 23:50 #173567 by snowgoer540
Replied by snowgoer540 on topic HAL Question

Unfortunately there is no convention, folk do it the way that suits them.

The => and <= are not required, they are only used to make it (supposedly) easily human readable.


Yea, but I guess what I'm asking, is the other ones had 3 things. For example:
net plasmac:ohmic-enable plasmac.ohmic-enable => ohmicsense.is-probing
or is Rod just breaking it up ? Meaning, would the following do the same thing:
net plasmac:ohmic-enable <= plasmac.ohmic-enable 
net plasmac:ohmic-enable => ohmicsense.is-probing

Just trying to wrap my head around this... starting to make sense, but just enough to get the thing to error out and complain to me until I get it right. :laugh:

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

More
03 Jul 2020 23:51 #173568 by phillc54
Replied by phillc54 on topic HAL Question
Yes, they both give the same result.

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

More
03 Jul 2020 23:56 #173569 by snowgoer540
Replied by snowgoer540 on topic HAL Question

Yes, they both give the same result.


AH! Well, I feel I've made it much further to understanding how this all works lol.

Many thanks to everyone, as always.

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

More
04 Jul 2020 02:11 #173576 by rodw
Replied by rodw on topic HAL Question

Yes, they both give the same result.


AH! Well, I feel I've made it much further to understanding how this all works lol.

Many thanks to everyone, as always.


Great work. I just break it up because when I come back to it later and want to use the same signal I find it's there. Other times I have had to change some statements to expose what I want.
The following user(s) said Thank You: snowgoer540

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

Moderators: snowgoer540
Time to create page: 0.084 seconds
Powered by Kunena Forum