Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

how to make a plot of several variables vs current time?

Hello guys. I'm making a control program to work as one oven control temperarute...my question is: how can i make a plot of several time dependent variables vs time ? i believe i have to create a timestamp but i dont know how.....i have a second problem that is :my Vi is a mess(its a lot of confuse)because i have wires conected instead of variables, and dont know how to substitute all those wires by local/global variables...

 

many thanks

 

JOSE

0 Kudos
Message 1 of 14
(4,258 Views)

If you are using a DAQmx Read, then one of the options is to get a waveform data type which includes a timestamp. Otherwise, you have the functions on the timing palette. If you have a problem, you should post your code.

 

Never, ever replace wires with local or global variables just because you want to clean up your diagram. You will almost certainly break the program because of race conditions. Use the  'Clean Up Diagra' option on the edit menu.

0 Kudos
Message 2 of 14
(4,254 Views)

thanks for your prompt anwser....I am using the DAQmx read but cant see were to get the waveform data type ? also tried to find the 'Clean Up Diagram' on the edit menu but there isnt any there 😞 i'm using labview v8.5 can this be because i have one old version?

 

thanks again

 

JOSE

0 Kudos
Message 3 of 14
(4,251 Views)

Ok...i believe i understood...i have to pick up one Build Waveform (Analog Waveform Vi)...is it?

 

thank you

0 Kudos
Message 4 of 14
(4,248 Views)

On the DAQmx Read, right click choose Select Type>Analog> Single Channel/Multiple Channels>Single Sample/Multiple Sample and you can select a waveform data type.

 

The block diagram cleanup was introduced with 8.6.

 

 

Using the Build Waveform is only correct if you use one of the time functions to create a timestamp and add it to the cluster.

Message Edited by Dennis Knutson on 08-03-2009 08:12 AM
Message 5 of 14
(4,245 Views)

Sorry to disturb again...but now i have another problem...after i had selected the waveform option (from the DAQmx Read Vi), i conected the waveform output of the DAQmx Read Vi to one Waveform Graph Vi , but it hapens that when i run it, there is nothing on the graph....and when i go to the graph table , there is only one line at the table.....all the values of my Y variable are beying displayed (on the table) for the same value of the time(X variable)...

 

how can i solve this?

 

thanks again

 

JOSE

0 Kudos
Message 6 of 14
(4,235 Views)
I think you should post your code. I don't know what type of data you were originally reading versus how you are now and what else you were/are doing to the data.
0 Kudos
Message 7 of 14
(4,232 Views)

Thanks for help. Here is my code. Please try not to laft because of all the wires .....My problem is on the top left of the diagram on the waveform graph conected to the DAQmx Read vi

 

thank you again

0 Kudos
Message 8 of 14
(4,229 Views)

You have the DAQmx Read set for a single point read and you are wiring the data to a graph. A graph is designed for multiple points and each time the read is called, the data is cleared and a new single point is written. For single point reads, you would want to use a chart.

 

I see other potential problems. You should connect some of the error in/error out clusters to control data flow. As it stands, those different DAQmx Reads will execute in a random order.

0 Kudos
Message 9 of 14
(4,195 Views)

What i was trying to do was a graph of those single values Vs time but with real time(i mean the graph values are actualized/ploted every loop time)....I've tried several ways but dont know what did wrong...If you could give me some ideas of how to do that ....

 

thank you once again

 

JOSE

 

 

0 Kudos
Message 10 of 14
(4,189 Views)