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.
03-22-2020 10:59 AM
Hi,
Is it possible to plot the one iteration multiple data on the waveform char or graph?
Example:
I need to display Temperature set-point (as constant value) and measured temperature on the chart/graph but every iteration. By other word the same way as e.g. I feed a single data e.g. constant in to waveform chart so that constant line moves every iteration to right side. But I need it for multiple inputs.
There is many exampled to do it using arrays, but it requires to create first array and then display it. That is not hat I need.
Is there any option how to do it? Thank you for help.
Solved! Go to Solution.
03-22-2020 11:06 AM
Well, without seeing your code so that I can understand what you are doing, I can't really suggest how you can accomplish your goal, but it is certainly possible to plot a "constant signal" (like a threshold) and a "variable signal" on both a Waveform Chart and a Waveform Graph. If you have, for example, 5 "signals" and 1 "constant", you just create a data structure with 6 components, ordered however it makes sense for you, and plot them together.
Bob Schor
03-22-2020 11:19 AM - edited 03-22-2020 11:21 AM
@romiadam wrote:Is it possible to plot the one iteration multiple data on the waveform char or graph?.
First you need to learn the big difference between a graph and a chart.
Since both accept a huge variety of datatypes (dynamic, waveform, arrays (1D, 2D), clusters for charts, etc. etc.), we cannot give you specific advice unless you show us what you have. Once we see your code, it'll probably take us minutes or less to give you a solution.
03-22-2020 12:43 PM - edited 03-22-2020 12:49 PM
Thanks, altenbach to clarify the differences. Chart with buffer will be good for my purpose, but if using the graph would be easier, I can use even a graph. All what I need to plot the history of a received multiple data.
I am vey sorry to not give you full information. I thought it is enough to explain verbally.
Ok, so far I have this (Picture 1).
And I need to get this (Picture 2), (there are only two inputs, but I will ad more, about 4 or 5)
I have tried this (Picture 3), but that is not what I need.
More information, if necessary: The PWM duty cycle value and temperature is send from microcontroller via serial cable in to laptop. Using VisaSerial the data are turned in to number (Picture 4) and I need to plot the multiple data (Duty cycle, Temperature, Temp Setpoint, ....) it in to one chart. They will be scaled that they fit on Y axis
Thanks again for help.
03-22-2020 12:47 PM - edited 03-22-2020 12:49 PM
Hi romiadam,
open the context help window, then move the mouse over the chart terminal.
Read the help: it explains how to achieve more than one plot in the chart.
You already use the bundle node, which is fine. Now just switch the chart from stacked to default mode…
Suggestion:
You seem to use numeric indicators next to the chart, both showing the same value: just make the "digital display" of the chart visible and delete that additional numeric indicator!
03-22-2020 01:01 PM - edited 03-22-2020 01:02 PM
.....Now just switch the chart from stacked to default mode…....
Excellent. That was so simple. Only one tick. But we need to know where is that tick.
....Suggestion:
You seem to use numeric indicators....
Yes that is right. Thanks for that suggestion. It was helpful too.
Thank you very much.
Just one more question, (I will try to sort it out myself, but in case if not), is there possibility to define names for charts as e.g. in MSExcel? As I spot the Y axis name has disappeared, what is logical.
03-22-2020 01:13 PM - edited 03-22-2020 01:14 PM
@romiadam wrote:
I have tried this (Picture 3), but that is not what I need.
Not sure why you have "stacked plots" enabled, because that's not the default, so undo that (right-click...stack plots). And yes, just show the digital display of the charts.
How much history do you want to keep? Default is 1024 points per plot, but you can change that at edit time. Don't make it gigantic, though. Keep it reasonable.
I imagine you don't have problems with the scaling, but of course scaling a temperature between 0 and 100% seems questionable.
Let's assume you have three values per iteration. Here are some possibilities and the best depends on the situation. Some are better if the number of plots is not known at edit time.
03-22-2020 01:41 PM
@romiadam wrote:
Just one more question, (I will try to sort it out myself, but in case if not), is there possibility to define names for charts as e.g. in MSExcel? As I spot the Y axis name has disappeared, what is logical.
Not sure what you mean by "names".
All are just strings and if you can read them from a file, you can write them to their respective property (plot name (make sure to define the active plot first), axis names, legend, etc.) You cannot change the label, so show the caption instead)
Here's how to set the plot name, for example.
03-22-2020 01:54 PM - edited 03-22-2020 01:57 PM
altenbach,
Not sure why you have "stacked plots" enabled, because that's not the default
In my case it was default. I do not know why.
scaling a temperature between 0 and 100% seems questionable.
Temperature can raie upt to 120°C ,taht is not a porblem. Duty cycle is plotted in range 0-100 so that is fine
Here are some possibilities
There is currently 500ms iteration time. I can send from microcontroler even 10 values. That looks great. I will try them and will see which is the best.
Here's how to set the plot name
Yes, that I was looking for. Perfect.
Thank you for help. This forum is excellent for beginners.