03-26-2018 12:08 PM
@desireddy wrote:I made the following code based on your suggestion. Correct me if I am wrong.
That's not "code" just an image.
@desireddy wrote:
How to store the time (real clock time) along with the stored average value.?
You are currently not "storing" anything (whatever that means). Do you want to store in a shift register? stream to a file?
03-26-2018 12:50 PM
Thank you, I was able to plot time on x axis now.
My next question is.....How to add a second sensor reading to the above said plot. When I tried to connect another data to the build waveform, The wave form char is not displaying the two curve. It is only displaying one plot.
03-26-2018 12:57 PM
You are overwriting your first Y array with the 2nd Y array.
You need to create 2 waveforms. Then use Build Array to turn them into an Array of waveforms to send to the chart.
03-26-2018 01:17 PM
Sir, I am getting something like this(attached). Not as expected
03-26-2018 01:44 PM
We cannot help if you keep attaching pictures instead of the actual VI. You currently have a single plot with two points.
Attach your VI and we will fix it! We won't waste our time trying to recreate your VI from scratch using a truncated picture as a guide..
03-26-2018 02:08 PM - edited 03-26-2018 02:09 PM
@desireddy wrote: How to add a second sensor reading to the above said plot?
03-26-2018 02:27 PM - edited 03-26-2018 02:34 PM
Again, your sampling rate is fixed at 1/minute (in your latest image. No way to tell what's in the other case, though), and the samples are spaced equally in time. There is no need for the gimmicky "sporadic waveform", just set t0 (from get time in seconds) and dt (60seconds) when the program starts and just bundle the two values for the chart and set the x-axis time format for absolute time.
Here's an alternative to Tim's code above. It scales better if you later decide to add more traces, for example.(Still I don't think you need any of this!!!)
03-27-2018 12:46 AM
Thank you sir,
If one of my signal is in temperature (degree C) and other signal is in heat flux( Watts/sq.meter) , How to plot both of them in single waveform chart. with degree C scale on left Y axis and Watt/sq.meter scale on right side Y axis with time on x axis common for both
03-27-2018 01:10 AM
right-click the y axis and select "duplicate scale" and "swap sides". Name scales as desired.
Now go to the plot legend and select the desired Y scale for the plot that should use the other scale.
03-27-2018 01:13 AM
Hi desireddy,
1. create an additional Y axis in the chart
2. swap the side for this additional axis
3. edit the axis labels to reflect your signal names
4. assign your two plots to their axis
All this is done using a chart and its context menu…