LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Vertical line in chart

I am trying to make a VI that will continuously measure the temperature using a thermistor and display the data. I have included the VI as I have written it. What I would like to do is whenever the 'Submit' button is clicked, a vertical line is plotted on the graph at the point on the x axis which coincides with whatever the user enters in 'Time Prediction.' What I am doing is monitoring the boiling of water, and am hoping to have the user be able to predict the time required for this to happen. I would like the vertical line to remain until the graph is either cleared or a new prediction is made. Even if it remained only until a new prediction is made, that would be fine. Any help would be appreciated. Thanks.
0 Kudos
Message 1 of 6
(3,040 Views)

Hello SchreinerAdam,

first you wont be able to do so using a Chart. you have to switch to graph mode, where you have both x and y values. (in a chart there is no x value, a vertical bar would not be bound to anything).

in your vi you have no x values, but can be created using the index in the while loop. i would propose then to use a while loop, where "clear" would just empty x and y arrays. you create these arrays using a shift register, and update the graph every cycle (or 10 cycles if you whish so). you do not need a start button, as by default starting the vi should start the reading. if you still whish to use such one, it should be before the while loop.

once you have such a xy graph, then simply you can use a cursor to set position!

------------------------------------------------

dont forget to rate messages!

-----------------------------------------------------------------------------------------------------
... And here's where I keep assorted lengths of wires...
Message 2 of 6
(3,037 Views)

Hello again

i touched your vi a bit, to show you ideas. you will have to check if it works.

first i created an array, which is updated all the time. for that i used the single update option of the AI, and wait time is now only 1ms. each time you want to clear the arrays get emptied.

then i have a xy graph, which is updated every 20 cycles. this xy graph has a cursor that you can read his properties. ( right now i just put an indicator).

things you might want to do in futur: 1) use attributes to set in advance the scale of the graph. 2) define in which position in time you update your AO. i strongly suggest you use sequences in which you define the actual timing of your sequence, especially when AI and AO is involved.

Tell me if it worked for you.

-------------------------------------------

dont forget to rate!

 

-----------------------------------------------------------------------------------------------------
... And here's where I keep assorted lengths of wires...
Message 3 of 6
(3,031 Views)
I am really not sure what you mean. I can change it to a graph, but I'm not sure how to implement the shift register or how to clear the x and y values. Sorry, I'm a novice. Thanks for your help.
0 Kudos
Message 4 of 6
(3,029 Views)
I couldn't open your VI because I have LabVIEW 7.1 and it says the file was created with 8.2,
0 Kudos
Message 5 of 6
(3,022 Views)

Hei

sorry about labview 8.2, i just discovered i cant save for a previous version. will have to clarify this with NI.

in the mean time here is a pic of the changed diagram.

good luck

 

-----------------------------------------------------------------------------------------------------
... And here's where I keep assorted lengths of wires...
Message 6 of 6
(3,010 Views)