LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Getting Waveform output from 1-D array by helping timestamp

Solved!
Go to solution

Hi,

I will appreciate if anyone help me.

I am reading temperature from a device. I would like to see waveform temperature results. I defiened time stamp in the panel (attached file). But after running, as you can see time is always is zero while temperature changes. It should show temperature at different times, while time passes.

Regards,

Mehdi

0 Kudos
Message 1 of 16
(3,987 Views)

You have a lot of things going on there.  Why are you using the express VI to convert a scalar to an array?

 

The reason that t column is 0 is because that is the 1-D Y array going into the Build Waveform function.  Since it is just a single element 1-D array, there are no other points.  The actual time goes into the T0 element of the cluster, and it shows up in the timestamp of the probe at start T.

 

I'm not sure what you are trying to do.  You don't have a while loop around anything, so this is a Run once type of program.  (Please don't tell me you are using the Run Continuously button.)

 

Also, a waveform graph needs the entire waveform fed to it.  (As you have it now, you are just sending a single data point.)

0 Kudos
Message 2 of 16
(3,986 Views)

Hi, Thak you so much for answering.

Actually, I am reading temperature from a external device and send it to Labview.

I used "continuous Running" to see temperature  in every second.

How can While Loop help me to see temperature variation with time in wave form?

I will apprecite if you help me.

Mehdi

0 Kudos
Message 3 of 16
(3,978 Views)

Wrap your program in a while loop with a Stop Button control connected to the stop terminal of the while loop.  Put any code that initializes the VISA/serial ports ahead of the while loop.

 

Use a waveform chart so that each new data points gets placed in the chart.  A waveform chart maintains a running history of the old data.  A waveform graph does not.  However both, waveform graph and waveform chart assume equal spaced data points.  If you need unequally spaced data, you will want to use an XY chart.

0 Kudos
Message 4 of 16
(3,958 Views)

Neka wrote: .

How can While Loop help me to see temperature variation with time in wave form?

I will apprecite if you help me.

Mehdi


If you use Run Continuously, ALL of your code will run each iteration.

That means all of your port configuration, etc will run each iteration.

There is no reason to do that. In fact, it may even cause problems.

 

Put a while loop around all of the other code with a wait inside the loop.

This way, you will only have to run the port configuration code once, at the beginning of the VI.

Cory K
0 Kudos
Message 5 of 16
(3,944 Views)
Another added suggestion, put the visa read and writes into a sub vi in order to condense your code.
0 Kudos
Message 6 of 16
(3,937 Views)

Deaer all,

Thanks for your helps.

I used while loop but it did not work, it just read temperature a one time and did show any thing after that.

Without loop (Run Continuously), it works with "wave chart" . temperature varies with time in wave chart.

Now I have temperature changes with time, I want to derivate it due to time, but again wwavchart shows zero, since temperature has variation.

I added the code which the temperature devide company gave it to me. If one wants to run, without that machine it shows nothing.
I posted just to show how the program was set.

Can I finally derivate the temperature variation or not? I appreciate your suggestions. 

Thanks All....

Download All
0 Kudos
Message 7 of 16
(3,927 Views)
I don't have time to look at it really but I'm sure someone else can help pretty quickly. However, just by looking at the screenshot I noticed, why not branch the wire and wire the date and time to both plots rather than having two different date and times? Also, all those red dots aren't there just for coloring. Your datatypes aren't matching up so that is also something to look into.
0 Kudos
Message 8 of 16
(3,913 Views)

Neka wrote:

Deaer all,

Thanks for your help.

I used while loop but it did not work, it just read temperature a one time and did show any thing after that.

Without loop (Run Continuously), it works with "wave chart" . temperature varies with time in wave chart.


Don't use Run Continuously! 

Use a while loop.

Use a waveform chart.  The reason you got only 1 point has nothing to do with the Run vs. Run Continuously, it's because you used a waveform graph rather than a waveform chart.

I would recommend looking at the online LabVIEW tutorials
LabVIEW Introduction Course - Three Hours
LabVIEW Introduction Course - Six Hours

 

For the temperature derivative, I suggest you continue that conversation in your original thread.

 

0 Kudos
Message 9 of 16
(3,908 Views)

lol, you have tickeled raven the wrong way.

 

Message Edited by for(imstuck) on 02-02-2009 04:21 PM
Message Edited by for(imstuck) on 02-02-2009 04:22 PM
0 Kudos
Message 10 of 16
(3,904 Views)