08-14-2015 01:50 PM
Hello All,
I consider myself a pretty advanced user and have UTFSE extensively. That being said this could be a stupid issue but I can't figure it out. I am acquiring single point data (from the blue vis below) per loop execution from two sources (actually 4) and create a waveform using the timestamp based on the loop frequency. All four acquisitions use the same timestamp (since they're in the same loop).
As you can see, I bundle each point and push it into a queue. In another loop I dequeue the data and plot it. The case structure is there to ensure it only plots when data is available to avoid writing zeros. As shown below:
The problem arises when I bundle two waveforms together to plot them on the same graph. This particular run went for ~10s. The time (x-axis) from "Angle Chart 2" and "Angle Chart" do not agree as shown below:
As you can see, "Angle Chart 2" has the correct time, which is ~10s. "Angle Chart," on the other hand, is showing ~130s and I cannot figure out why. It seems like it is multiplying by 10 for some reason although that's not even right, it's more like a factor of 12ish. As you can see from above, I'm not doing anything special, just bundling the two waveforms so that I can plot them together, there's no other hanky-panky going on. I've examined the properties of the graph and everything is default, there are no scaling factors or anything. To write multiple plots to a chart I know you have to cluster them but is there some sort of issue clustering waveforms? Does it not like the fact that there are two times (even though they are the same)? If so, I could get wfm Y components then cluster but how then would I get the correct time scale back? I hope I've provided enough info to be clear here. I read these all the time and don't want to be that "how do I do this complicated task without any background" guys. It must be confusing the chart by giving two time series' but I don't know how to avoid that. I tried to "stack plots" in the hopes that it would isolate the time scales but got the same results.
Thanks in advance!
it is the same thing if I plot the othe rdata in the bundle
Solved! Go to Solution.
08-14-2015 01:53 PM - edited 08-14-2015 01:53 PM
Can you create constants of the data and create a subVI (or snippet) for us to play around with?
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'
08-14-2015 01:55 PM - edited 08-14-2015 01:56 PM
My vi is humongous but I can try to build a reduced version
08-14-2015 02:08 PM
Yeah, I really just mean the waveform data that you're showing in your plots and them being written to the plots themselves. Just create some constants and some indicators directly.
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'
08-14-2015 02:53 PM
I get what you mean, parsing it down is a bit of a chore though. Here it is. I've never used snippets and don't know how much is preserved but this behaves in the same way when I run it. I ran it for 10s and the bundled plot x-axis reads 19s. I'm adding the snippet as an image, not an attachment. If that's not right let me know.
08-14-2015 02:56 PM - edited 08-14-2015 02:58 PM
I screwed up, the loop stop is on the local variable side so the other loop doesn't stop but it still works
08-14-2015 03:09 PM
Try using a build array instead of a bundle.
Ben
08-14-2015 04:33 PM
Thanks! I don't understand why that works. The chart help specifies that you have to bundle for multiple plots. Any time I've tried an array it ends up interleaving everything. Didn't even think of trying that.
08-17-2015 08:18 AM
Why?
If you r right-click on the teo charts and observe...
The one that works has an option of "Ignore atrributes"
The one that does not work lacks that option.
The option "Ignore attributes" is a feature of a graph/chart that uses a waveform data type. A waveform has attributes that include the channel name, a "t0" etc.
The one that did not work failed becuase it just handled the data as if it was an array with a fixe dt and a "t0" for the entire plot.
Now here are two follow-up questions that come with your report that it works.
1) Is it possible to cast a cluster such that the charts se the waveforms?
2) Is this a bug?
I will leave those two question to NI support if the choose to investgate further.
Ben