LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Single numeric controlled by 8 Booleans

Thanks to both of you for the .vi's, however they do the same thing the one I made does (albeit my was done wrong as was pointed out). Function correctly in labview, doesn't update the output (stays at zero) when you convert then run them in veristand.

 

Also, for some reason every time I try to add one of the .lvmodel files created from any .vi containing an event structure, it causes some problem on the target because it times out the next time I try to deploy any project to the target until I restart the target. I can keep restarting, but it might be a clue into the problem. If I can't find a way to do this in labview without using an event structure then maybe I need to head over to the veristand forum, unfortunately that forum doesn't seem to get anywhere near the traffic.

0 Kudos
Message 11 of 26
(1,129 Views)

@larboc wrote:

Function correctly in labview, doesn't update the output (stays at zero) when you convert then run them in veristand.


Sorry, I am not familiar with veristand, but your current VI only has an output connector, no input. How does it get the boolean data? It also currently never stops.

If this should be a plain, "one-shot per call" subVI, you need to have a feedback node to carry the previous state and no while loop or event structure.

 

If the problem is with veristand, there is a dedicated forum for that. Sorry, no expertise here.

0 Kudos
Message 12 of 26
(1,123 Views)

Veristand looks at the connector pane and figures it out based on the inputs/booleans/etc on the front pane.

I just connected the array of radio buttons to one input in the connector pane and the U32 to an output before creating the veristand model. When I made a .vi to run a single relay with just a simple boolean-Select function-Numeric double it worked great, but only for a single relay.

When I input the any of these examples with event structures, veristand sees all the inputs and the output and looks like it is going to work, but when it actually runs it never updates the output. 

0 Kudos
Message 13 of 26
(1,119 Views)

Event structures with value change events work on a user changing the value of the control, or the VI firing the event if a value is written to the control's Value (signalling) property node.

 

If Veristand is calling the VI, that seems similar to a LabVIEW VI calling this as a subVI.  Just sending data into a control will not trigger an event.

0 Kudos
Message 14 of 26
(1,096 Views)

This is kind of a cross post to my post in the veristand forum, but it really is fairly independent of veristand:

 

So I came up with this and it works, kind of. The problem is that if a user clicks the buttons too fast, before it has time to send the entire message, it can cause problems. Maybe there is a simple way to make all the switch booleans wait until all the rest are 0? I read up on queuing but didn't think that looked like the answer.

0 Kudos
Message 15 of 26
(1,077 Views)

wrote:

This is kind of a cross post to my post in the veristand forum, but it really is fairly independent of veristand:

 

So I came up with this and it works, kind of. The problem is that if a user clicks the buttons too fast, before it has time to send the entire message, it can cause problems. Maybe there is a simple way to make all the switch booleans wait until all the rest are 0? I read up on queuing but didn't think that looked like the answer.


Have the event disable/gray out those buttons, then enable them after the message is sent.



Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 16 of 26
(1,074 Views)

Good idea, but doesn't seem to work as hoped. Still have to click slowly or the messages step on each others feet once it hits veristand. Any other ideas of how to do that? This is the VI I made up using your suggestion.

0 Kudos
Message 17 of 26
(1,066 Views)

Looks like what you need are uninitialized shift registers in a while loop. Doing this will "remember" values from a VI's previous run. You can use shift register values to test whether to update the output only if all Boolean inputs were last zero or are now zero. You can convert the Booleans to integers and add them up to get that status. In this snippet, I've also used shift registers to store the "lag" values. This way, there's no need for those pesky local variables.

 

bo_to_num08_uninit_sr_queue.png

 

Hope this helps,

Pang

Feel free. Contact me for anything more,
    Pang

You too can be LabVIEW Awesome!
0 Kudos
Message 18 of 26
(1,046 Views)

From what I've read, you can't use loops in veristand. I tried something similar at the start of this and it wouldn't work.

0 Kudos
Message 19 of 26
(1,043 Views)

If loops are disallowed, feedback nodes provide the same behavior.

 

bo_to_num08_feedback_nodes.png

 

-Pang

Feel free. Contact me for anything more,
    Pang

You too can be LabVIEW Awesome!
0 Kudos
Message 20 of 26
(1,037 Views)