09-22-2012 04:43 PM
Hello All,
In my attached VI I am facing some issues.
My loop rate is 100ms and in chart plot data is not appering as per the x-scale(Time stamp). Values are just plotting in the chart without time. I am trying to implement a graph program that should show values according to time loop rate can be different.
In attached VI I have chart and XY graph both. Please have a look and suggest me the valuable modifications.
09-23-2012 11:21 AM
To plot the data with time stamp, refer here
Beat Regards,
Gogineni
CLAD
09-23-2012 01:48 PM
Hello Gogineni,
Thanks for your response.
In my code if you can find that i have y as a single element not in array. To plot with array is quite simple, but here the problem is different.
09-23-2012 10:37 PM
You can insert a Build array function for that element and check!!
Best Regards
Gogineni
CLAD
09-24-2012 12:50 AM
Hello Gogineni,
Can you plese check my attached vi for your better understanding...........
09-24-2012 05:40 AM
Hi Himanshu,
Please check the attached modified VI in which the x-axis displays the current system time and see whether it meets your requirements.
09-24-2012 05:52 AM
Hi Gogineni,
Please study the problem and check output before post any solution. Same as before check your modification output in XY Graph.
No change.
09-24-2012 07:54 AM
Provided your timestamps are very increasing you can do that using a chart configured to use a Waveform Data type.
A Waveform Chart that hs the property "Ignore attributes" NOT set will plot data based on the timing info found in the waveform data.
If you only present a sinlge value in the "Y" array the single point will be plotted on teh graph at the time specified by the "t0" of the Waveform data.
By carefully controlling the "t0" values, you can control the exact time the value is plotted. It wokrs great for those widgets that do not spilt out a new value on a peridic basis. It will allow for different plots to be updated at different times if you wire it right.
Ben
09-24-2012 07:58 AM
In your first post you mentioned that Values are just plotting in the chart without time.
So modified only the Chart.
09-24-2012 11:17 AM
Hello Ben,
Thanks for your valuable inputs.
I don't have waveform data from the field, its only RS232 communication and each and every 100 ms interval I am getting only one value from the device. Now in current program I am using the chart function. But the value(Y-Axis) and the time(X-Axis) sync in not proper. To avoid this i am planning to implement this using XY Graph so I develop this sample VI. Here if you browse and observer in the code I have both chart and XY graph, in chart you can see my current implementation. If you run this code for few seconds you will get some difference in Y-Axis and X-Axis values plot time difference.
Now If I am talking about XY graph on X axis I can send my system time with the field value to avoid this chart issue. (I am trying to implement same in XY Graph)
Today I achieve the target by done offset and some chart property settings. Now I am looking for same in XY Graph.