03-03-2011 05:29 PM
Hi all,
I did a search for similar problems but couldn't find solutions to my specific situation (of course, if anyone recalls seeing this I would really appreciate seeing it!). I am trying to take the example from Waveform and XY Plots.vi, and plot dynamic data acquired from a DAQ to a picture indicator. As in the example, I am trying to do this via the Plot Waveform.vi. Quickly, I am doing this to try and get some form of 'cursor' waveform extraction to work with stacked plots (in this case, picture indicators), as using a waveform graph is not an option for us. From my research, it seems that a picture indicator will be useful for the extraction portion of things, however since it is a much more basic indicator, I will have to come up with dynamic implementations to change axes, etc. Having said that...
The focus of this example code is that I am attempting to show data on a picture indicator in different scenarios. I have gotten the top picture indicator to show a simple sine wave, and I added a quick frequency control to ensure that I could actually affect what the graph was showing in real-time. When I try to run the same thing in a second while loop, except with DAQ acquired data, the graph shows nothing. I ported the DAQ Assist output to a waveform chart to ensure I actually was acquiring data, and I am. The questionable portion is what I do with the dynamic data.
I presume that my DAQ assist is sending out a data index (CH0), and then my actual data (CH1), and since it comes out in columns, I am converting it to a 2D Array of Scalars (convert from dynamic data), where channels are in columns. Then I transpose it so that it is then in rows, and take Row 1 using the Index Array function. I then send that data to the cluster to plot it to the picture indicator. In this case, I am sampling at 1k, so dt is 0.001, and I would like the graph to start at 0.
I am sure that there were 100 possible areas where I went wrong, and I must admit I am new to these detailed uses of DAQ data. Normally I plot it to a chart and I am on my merry way. Can anyone shed some light on why I am not seeing the DAQ data on the second picture indicator?
Much appreciated!
03-04-2011 05:57 PM
Hey-
Just so we're on the same page, and I can make sure that I go in the right direction with this, you want to have your DAQ pass information and make multiple waveform charts (essentially one chart that shows time 0 to x, and the next one that is x to (x+t) etc). The top graph doesn't seem to update the time either. I am going to see if I can find an example, and if you could verify that I am understanding what you are trying to accomplish, then I think we could find a solution.
Thank you,
Sean
03-04-2011 06:03 PM
Hi Sean,
Sorry about the confusion. The end goal is to re-create a stacked plot waveform chart, but with each plot constructed from a picture indicator. In this case, all of my time bases would be the same, and linked, as in a waveform chart. The y-axes would be individually changed, of course. You're right in that the top graph doesn't update time; it's there because at least I was able to draw a plot to it, however in the case of the DAQ data, I wasn't. It would definitely be ideal to update the time base as well, preferably to have it scroll like a waveform chart does.
Hope that clarifies things, and I appreciate you helping me find a solution!
Cheers.
03-07-2011 04:22 PM
I guess the biggest confusion lies in "stacked plot waveform chart." I'm not quite sure what you mean by that. As far as the example goes that you sent, I will attach what I have done to try to understand what you are dealing with. Because I don't have any DAQ, I just simulated dynamic data by using the express VI to do so (attached is also the screenshot if you don't have the version of LV that I do). I am able to get it to work with the waveform picture. If you can post a screenshot of what you are trying to do, or further explain what you mean by stacked plots, that could help out.
Thanks,
Sean
03-07-2011 06:39 PM
Hi Sean,
By stacked waveform chart I mean a normal waveform chart that shows several lines of data. Instead of having one plot area and all signals overlaid, I would like to see them stacked, so as many plot areas as there are data lines. If you right click on a waveform chart and click Stack Plots, this is what I want. I appreciate you attaching your solution, but I am able to do what you did with the Simulated Sine Express VI; the issue is present when I try to use DAQ data as the input.
If you are unable to access a DAQ, you may not be able to help me, as that seems to be where my problem is. I really do appreciate you taking the time to address my problem though!
Cheers.
03-08-2011 03:45 PM
I'm unable to find a way to stack picture indicators. Also, if you are able to get the picture indicator to work using the Simulate Signal VI, then you must have a DAQ issue, and I'm going to need to get someone who works more closely with DAQ issues. I was trying to get a stacked picture indicator before I sought someone who works with DAQ, but at this point, I am not making any headway. Just to reiterate, you are not able to get an output if you simply hook up the DAQ Assistant like in the attached code (with the DAQ replacing the signal simulator)? If not, I think you should concentrate on the DAQ issue first.
Thanks,
Sean