From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
10-27-2015 07:18 AM - edited 10-27-2015 07:19 AM
I'm having some problems plotting a multiple plot in a waveform chart.
The goal what I'm trying to achieve is 1) determining the difference between real and estimated data, which I want to 2) display in said waveform chart, seperately.
This all happens within a while-loop, which you can't see in below screenshot.
Right now all I'm getting is the difference of 1 object, instead of all objects who enter the for-loop. How do I adjust this?
10-27-2015 07:35 AM - edited 10-27-2015 07:36 AM
Are you going for something like this?
10-27-2015 07:36 AM
Please do not post screen-shots, but post actual (editable, runnable) code.
I recommend you read the LabVIEW Help for Charts and Graphs. From the fragment of code whose picture you showed, I don't think you understand how LabVIEW Charts work, and how you add points to the chart. It is clearly explained in the LabVIEW Help.
Bob Schor
10-27-2015 07:42 AM - edited 10-27-2015 07:44 AM
@crossrulz wrote:
Are you going for something like this?
Yes, exactly like that.
10-27-2015 07:45 AM
@Bob_Schor wrote:
Please do not post screen-shots, but post actual (editable, runnable) code.
I recommend you read the LabVIEW Help for Charts and Graphs. From the fragment of code whose picture you showed, I don't think you understand how LabVIEW Charts work, and how you add points to the chart. It is clearly explained in the LabVIEW Help.
Bob Schor
Hi,
I really can't submit the full code, because it contains some code I don't wish to be publicly available.
10-27-2015 07:47 AM - edited 10-27-2015 07:54 AM
@crossrulz wrote:
Are you going for something like this?
One difference though, I only want to display the difference in values, for each 'object' that enters the for-loop. So for every iteration a new plot on the waveform.
Edit: see my very crude sketch, since I can't reproduce what I want. So every line represents the measured difference over time per object.
10-27-2015 08:06 AM
marvin117 wrote:One difference though, I only want to display the difference in values, for each 'object' that enters the for-loop. So for every iteration a new plot on the waveform.
Edit: see my very crude sketch, since I can't reproduce what I want. So every line represents the measured difference over time per object.
The chart keeps a history, so you do not have to maintain it yourself. Just put your plot points into a Bundle like I show above and write directly to the chart terminal.
10-27-2015 09:33 AM
@crossrulz wrote:
marvin117 wrote:One difference though, I only want to display the difference in values, for each 'object' that enters the for-loop. So for every iteration a new plot on the waveform.
Edit: see my very crude sketch, since I can't reproduce what I want. So every line represents the measured difference over time per object.
The chart keeps a history, so you do not have to maintain it yourself. Just put your plot points into a Bundle like I show above and write directly to the chart terminal.
I tried this, but doesn't work. See attached image. I still get only 1 plot.
10-27-2015 09:53 AM - edited 10-27-2015 09:56 AM
If you only have one numeric in your bundle, you're only going to have one plot. You're not building multiple plots by adding to that array, you're building an array of points on a single plot. This can all be learned from the Help file.
I would suggest switching to using a 2D array of data for your multiplot, to make it a little more intuitive:
I built the above Vi to match how you're already do it, but you can eliminate the shift registers by auto-indexing:
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'