LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to display two readings simultaneously generated on a numerical indicator? Simple thermometer VI and boolean light?

  • I have attached my attempt so far.
  • The LabVIEW VI should simulate two input temperatures. 
    • You can simulate each of these through a random number generator (make sure to keep the numbers within an imagined temperature range), or if you want, by reading values from a file.
    • You may need to use blocks such as addition, multiplication, greater than or less than, random, some number inputs, or others of your choice.
    • e.g. imagine the temperature is varied between 18 and 20 degrees. You could multiply a random number between 0 and 1 by 2.1, and then add this to 18. Then trigger an alarm if the value is over 20.
  • The front panel should, at a minimum, display each temperature instantly (e.g. using a numeric display), a graph plotting each temperature over time, and some indicator (e.g. an LED or number counter) to show that the temperature exceeded its threshold value.

Now, I have the waveform chart and the 2 number input (random number generator).

Can someone check that this is OK, given numbers between 16 and 25 are suitable, i want an alarm sounding if numbers are generated out of that threshold.

  • I can't figure out how to display BOTH readings on a numerical indicator? I dont quite understand matrix coding???
  • Lastly, I want a boolean light IF the temperatures are outside of the threshold i.e. maybe one light goes blue if average of 2 generated temperatures is below 16 and another light goes red if avg temperature is above 25.
    • I want a green light indicator if the average of the numbers are within threhold.

    The numbers are generated both simultaneously, so maybe if the average temperature is below or above the threshold it goes on the appropriate indicator?

  •  

    ASSIGNMENT.png
0 Kudos
Message 1 of 19
(5,079 Views)

Im not sure i completly understand what you mean with your question, i will try though.

As an Indicator use an Array and input the temperature into the respective cell with replace array subset.

Alternatively you can put both values into a cluster and create an indicator for that.

Message 2 of 19
(5,070 Views)

I want the two temperatures that are randomly generated to come up on the front panel in a numerical indicator so the user can see the two numbers/two temperature values? I'm brand new to this so not familiar with arrays 😞

Many thanks for your help

0 Kudos
Message 3 of 19
(5,062 Views)
You've got some questionable code. That bottom for loop is just silly. All that you have to do is wire the array directly to the Build Waveform. To create an array indicator, just right click on the array wire and select Create Indicator. To use numeric indicators, you simply use the Index Array function. Please take some of the free LabVIEW tutorials.
0 Kudos
Message 4 of 19
(5,055 Views)

Have a look in the array palette. There is a function there called 'index array' which will allow you to get the individual items from the array. Read the help for it - you'll see you can expand the node to select multiple items from the array - if you leave the 'index' unwired it starts at the first element and returns subsequent elements. You can then wire the values to your indicators.

 

It seems like this is a continuation from a previous thread: http://forums.ni.com/t5/LabVIEW/LabVIEW-beginner-XY-Graph-and-sound-files/m-p/3216507#M934036


LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 5 of 19
(5,051 Views)

sorry i'm really new to this, this is my first time using labview and im not familiar with the jargon etc..

0 Kudos
Message 6 of 19
(5,044 Views)

can anyone show me an example, I just need to wire them to the lights and display 2 readings simultaneously, i'm brand new to this and have no previous experience with labview other than online tutorials

0 Kudos
Message 7 of 19
(5,040 Views)
The online tutorials should be more than enough to teach you how to view the existing palettes, use search, or quick drop. Did you place the Index Array function on the block diagram? Did you even attempt to wire it up? Do you have Context Help open?
0 Kudos
Message 8 of 19
(5,024 Views)

Hi Allison,

 

either use IndexArray to get your both array elements and wire them to your scalar indicators.

Or use an array indicator as has been suggested before!

 

LabVIEW comes with a lot of example VIs. Did you try to understand them (to learn more about LabVIEW)?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 9 of 19
(5,022 Views)
Looking closer, the way you are plotting the chart is just wrong. Both values are going to a single plot. You want to display then as separate.
0 Kudos
Message 10 of 19
(5,013 Views)