11-14-2012 02:05 PM
I am currently running Labview 7.1.1. I am using the NI USB-6009 DAQ device to record continuous analog voltage data. This data will continuously change. The program I've created is able to graph this data in real time. However, I am having a hard time graphing a maximum and a minimum value directly on the graph, to allow me to see when the voltage recordings have gone too high or too low. I just want to use these max and min "lines" as an indicator. Currently, the only thing I'm aware that has a potential for a max or a min is the DAQmx Create Channel (AI-Voltage-Basic).vi that allows me to set a max/min. However, this doesn't show up on my graph and I can't tell when that voltage I'm recording has passed those values. Does anyone know how I can create these max/min "lines" on the graph during recording? Thank you very much for your help.
11-14-2012 02:21 PM
You need to build a waveform of the same length as your data. Every data point of this waveform should be your max. Do the same for the min. Bundle these two waveforms with your original data and wire to the graph.
11-14-2012 02:53 PM
Are you using a graph or a chart? Can you show us some code?
11-14-2012 02:53 PM
11-15-2012 12:50 PM
Crossrulz,
Thanks for your reply. I think I understand what you mean. Basically, I'm creating 2 straight lines on the graph (min/max). I'm measuring voltage. So if I wanted a max of say 5V, I should create a waveform that has a 5V data point for each sample I'm taking during my continuous acquisition? I'm not quite sure how to create these waveforms and then wiring them to my graph. At the moment, my graph is in a loop since I'm recording continously. Would I wire the 2 additional graphs to my graph inside this loop? Also, is there a way for these max/min graphs to continue running as long as I'm recording. I'm assuming I would have to wire the graphs in some way to the sample rate and the number of samples I'm taking because I don't have a set amount of time of recording.
11-16-2012 12:16 PM
Here is a picture of the program I'm working on. The program continuously records on 2 channels. The data recorded is shown on a waveform graph and the data is saved to a binary file. The min/max value I'm controlling doesn't show up on the graph. I just want the values to show up on the graph. The min/max don't have to do anything special like stop the program or anything like that. It's just a visual cue for when the data I'm recording goes over or under those limits. Thank you.
ps. I can attach the actual code if that would help more
11-16-2012 12:17 PM
Here is the Front Panel
11-16-2012 12:30 PM - edited 11-16-2012 12:31 PM
Sounds like you just need to do something like this:
11-16-2012 12:54 PM
I think you're right. I'm new with Labview so I'm sure where to find those functions in the palette. I also have an older version of Labview (7.1.1) so this may be a problem. I'm also using the Signal Analysis function like ben64 mentioned. Thank you so much for all your help.
11-20-2012 12:46 PM
I believe I was able to solve my problem. Thank you for all your help. I have ran into another problem. I've attached a picture of my program. As you can see, I am saving the data I'm recording into a binary file. I would like to be able to call back that file and display the data into a graph in case I want to analyze the graphs/data after acquisition. There is an example program that Labview provides to graph a binary file (2nd attached file). However, this program calls unscaled data, converts it to scaled, and then graphs it. When I open my saved binary file, the graph that is created during recording looks nothing like that the graph that the example program creates. It's probably because that program opens unscaled data, while my data is already scaled. Does anyone know how I can graph the type of binary file I am creating in my program? Thank you.