Simple HAL logical test

More
11 Aug 2016 17:20 #78632 by jwsigler
I have HAL signal "inputA" and if it is true, I want to set HAL signal "outputB" to true, and false if "inputA" is false. I figured out a way to do this using or2 and defining a global HAL signal called "always-false" which I use in the or2.o.in1 parameter of the or2 logic. With this approach the output from the or2 logic will change the "outputB' signal from true to false, and false to true dependent upon the condition of the or2.0.in0 signal which is "inputA". While this does work, is there a simpler way I can perform this task?

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

More
11 Aug 2016 17:35 #78634 by PCW
Replied by PCW on topic Simple HAL logical test
why not just connect the pins together with a signal?

net foo inputA outputB

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

More
11 Aug 2016 17:54 #78635 by jwsigler
Replied by jwsigler on topic Simple HAL logical test
That seems like a lot simpler way to do this. If I use the command "net foo inputA outputB" then outputB will go true or false based upon inputA. I thought there should be a simpler way than what I was doing. These are my first tries at writing the HAL commands to control my system.

I will give it a try.
Thanks.

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

Time to create page: 0.106 seconds
Powered by Kunena Forum