From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple inputs to a single indicator

Solved!
Go to solution

I am currently trying to create a VI with some IVI enabled hardware. In the image attached I've made a while loop which will open (vi with Route and a folder icon) and close (vi with Route Close written) a particular relay. In between those I also have a vi which will tell me "Route is open" and should give out a true/false or in this case a 1/0 response.

 

Is it possible for me to have a single indicator with both of those Route is open outputs connected to it, on my Front Panel that shows the 1/0 output or even better to show True/False? This will allow me then to know straight away if the relays are open or closed.

 

The image I have attached was my attempt at using array's but obviously it does not work as I have ended up with two indicators "output array" and "output array 2".

 

p.s. i'm from the UK my reply will be delayed significantly due to time difference, I appreciate your replies and carrying the conversation even if its slow!

0 Kudos
Message 1 of 7
(3,244 Views)

Your array manipulations make absolutely no sense (*See below). Did you do some basic tutorials?

 

You talk about he front panel, but only show us a picture of your diagram. How big are these blue arrays? What exactly do you want to see?

 

* With every iteration, you start with an orange array containing one element, delete that element to create an empty array, insert a blue array of unknown length, delete the first element, then insert the second blue array in place of the deleted first element  Silly!.

0 Kudos
Message 2 of 7
(3,223 Views)

@firasnomaan wrote:

p.s. i'm from the UK my reply will be delayed significantly due to time difference, I appreciate your replies and carrying the conversation even if its slow!


People all over the world read this forum. Not just NI either.

 

I bet some people even read this forum at night...

0 Kudos
Message 3 of 7
(3,200 Views)

I am not sure if I understand your question but...

 

In general there are a few basic ways update an indicator.

upCapture.PNG

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 4 of 7
(3,179 Views)

@altenbach I have done basic tutorials and also I was following some ni documentation that I had found - https://forums.ni.com/t5/Example-Code/Average-Values-in-a-FIFO-Buffer-Using-Array-Functions/ta-p/349... . 

 

What is currently on my front panel is irrelevant so I did not include any image of it.

I am essentially trying to find a way to manipulate a single relay on my DAQ using the IVI blocks and on the front panel have a single indicator that tells me whether that relay is opened or closed. I was thinking a FIFO buffer of size 1 will be a working solution as it will allow me to open/close the relay then check "Is the relay open?" and output that response of True/False, or 1/0 in this case, to the indicator.

 

@RTSLVU I have tried using the directly by wire approach but trying to connect two outputs to the same indicator does not work as you can see in the image I have attached. I will look into the local variable and property node approach next and post here again with how I progress.

 

I hope my above explanation is more clear as well of what i'm trying to achieve? A single indicator that lets me know when a relay is open or closed.

 

Very good point @wiebe@CARYA, hopefully people will see my posts regardess of time 😄

 

0 Kudos
Message 5 of 7
(3,145 Views)

If there is only one U16 valuein that blue array wire, use index array to get the first element. Connect the the scalar terminal to one of the blue wires and a local variable of it to the other blue wire.

 

If you want a boolean instead of the 0 or 1, do a "not equal zero" on the value.

 

altenbach_0-1608137482978.png

 

 

(There are probably better ways. For example if you would turn this into a state machine, you would not need the local variable and you could eliminate some of the duplicate code, i.e. only one instance if the tool that outputs the blue wire and one instance of the time delay. Why do you think you need four instances of a "202" string? Wouldn't one be enough?)

 

Message 6 of 7
(3,122 Views)
Solution
Accepted by topic author firasnomaan

@altenbach wrote:

(There are probably better ways. For example if you would turn this into a state machine, you would not need the local variable and you could eliminate some of the duplicate code, i.e. only one instance if the tool that outputs the blue wire and one instance of the time delay. Why do you think you need four instances of a "202" string? Wouldn't one be enough?)

 


Here's how that could look like... (modify as needed)

Basically, the loop runs twice as fast, alternating between the two states based on even/odd of [i]. You need to decide where the delay should go.

 

altenbach_1-1608139060147.png

 

Message 7 of 7
(3,114 Views)