01-31-2018 02:49 PM - edited 01-31-2018 02:54 PM
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.
01-31-2018 02:56 PM
@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.
01-31-2018 03:00 PM
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.
01-31-2018 10:04 PM
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.
02-02-2018 11:28 AM
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.
02-02-2018 11:32 AM
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.
02-02-2018 12:51 PM
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.
02-02-2018 03:34 PM
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.
Hope this helps,
Pang
02-02-2018 03:42 PM
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.
02-02-2018 03:58 PM
If loops are disallowed, feedback nodes provide the same behavior.
-Pang