12-09-2021 07:13 AM
Dear all,
can i please consult a question that in an VI program, if I would like to change the variables (eg from the 'default' frequency VS data point number) in the wavechart, to the real pressure/volume reading from the instrument VS elapse time
any advice how to do it please ?
many thanks !
12-09-2021 07:26 AM
The "E" in the name "LabVIEW" stands for "Engineering". In many instances, engineers record (analog) data by sampling, taking measurements at equally spaced intervals of time to approximate recording a "continuous Waveform". Since this form of "acquired data" is so prevalent, the inventors of LabVIEW came up with a structure to represent such sampled data and called it a "Waveform".
Waveform charts are explcitly made for Waveforms, where the data being plotted all have the exact same "X" spacing (expressed by the parameter "dt" in the Waveform Cluster). Examples of data in "Chart" format are oscilloscopes (the beam moves left-to-right at a fixed rate, and you see the data move the beam up and down) and a strip-chart recorder (the paper moves at a fixed rate underneath the pen being driven by the data).
But what if you have "real pressure/volume reading from an instrument vs. elapsed time", i.e. have both X and Y varying (with X, perhaps, always increasing, but not at a fixed "dt")? Simple, you use a Waveform Graph, where you give the X and Y values explicitly. Drop down a LabVIEW Waveform Graph, right-click it, and read its Help (or look up Waveform Graphs) to learn how to do this.
Bob Schor
12-09-2021 08:00 AM
@ChrisNo17 wrote:
can i please consult a question that in an VI program, if I would like to change the variables (eg from the 'default' frequency VS data point number) in the wavechart, to the real pressure/volume reading from the instrument VS elapse time
12-09-2021 08:14 AM
many thanks, both !
so to make my question clear, I attached the snapshot (one for X- acquisition time, one for Y- pressure/volume) - the version from supplier, the properties on the wavechart are:
"
Y: "amplitude" for both Pressure/Volume, which have no specification,
X: On the time axis, the results are shown depending on the sample time and the values are in sample numbers instead of absolute time
"
So my aim is to change these to the real data of pressure/volume VS time.
Please advise where the changes should be made ?
(Sorry I am a beginner if the question sounds basic 🙂
many thanks again !
12-09-2021 09:00 AM
Your images are completely useless (and why are you covering most of them with right-click menus???). Please attach your VI instead. What's the loop rate (which determines dx of the chart).
12-09-2021 10:22 AM
Please find the VI. file attached.
Many thanks,
Chris
12-09-2021 11:08 AM
There is no easy way for me to find the update rate of the chart. (So many states, so many loops inside loops inside loops. I see a 5 second wait in the outer loop and e.g. a 500ms wait deeply buried in a stacked sequence inside one of the numeric states. From the outermost structure, this looks like a subVI but there are no connectors defined. Very strange....
12-10-2021 03:29 AM
Many thanks though.
actually we only need to modify the properties that to be shown on the wavechart, I suppose somewhere around the middle wavechart, but not sure how to do it (as the image attached) ?
12-10-2021 10:54 AM
The chart assumes a regular update rate (constant dt between points), but for me it is impossible to determine what that actually is by looking at your code and since some of the timing is via a control, it might not even be regular. One option would be to actually measure each update time and use an xy graph and some suitable history code.