LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Modified x-axis values?

Measurement is made using a sampling frequency of 100 Hz. And now, when I read the file in LabVIEW, the x-axis values are hundred times greater than the actual time. How do I get the modified x-axis values hundred times smaller.

0 Kudos
Message 1 of 9
(2,536 Views)

It would definitely help to see some example code and data.

 

My gut feeling is that you're wiring an array of Y values to a waveform graph, e.g. 10, 5, 11, 12, 5, 3. The waveform graph, given an array of values, will plot the data against an x axis of sample number, so your data will appear at an interval of 1.

 

If you have a sampling period (dt) value, you can use Build Waveform with your Y array and the dt component, and then feed this waveform to the waveform graph. Alternatively, you could build an array of time values of the same length as your dataset, bundle into a cluster and send to an XY graph. Examples are below:

 

timing.png

---
CLA
0 Kudos
Message 2 of 9
(2,527 Views)

That help littlebit. but after ``convert from dynamic data`` promblem come back, WHY?

I have heartrate pulsewave (about one pulse per second and one pulse included 100 values). I want at my x axel show seconds not ms

0 Kudos
Message 3 of 9
(2,515 Views)

If you posted your code, it might be easier to see where the issue is.

---
CLA
0 Kudos
Message 4 of 9
(2,511 Views)

Here is part of my code. I think that this is the crux of the problem. After this I count  parameters in the signal.

0 Kudos
Message 5 of 9
(2,494 Views)

"convert from dynamic data" returns the original array, without any time information.

 

If it's just about the graph representation, you can right-click the graph on the front panel and open the properties dialog, then select the scales tab --> X-axis --> Scaling factors --> Multiplier= 0.01

 

If you want to add time information to your array, build a time array (same size) and bundle it with your values array, then pass it to the graph.

 

0 Kudos
Message 6 of 9
(2,488 Views)

Hi Pianne and Toni,

 

"convert from DDT" can also output waveforms. No need to build them on your own or even create additional arrays...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 7 of 9
(2,485 Views)

It depends what the input text file is. If it's just a 1D array of data with no timing information (and there is no tick against "First column is time channel") then he needs to build it into a waveform at some point.

 

Scaling graph axes is not ideal. Building into waveform, or building a time axis if needs be, are both preferable.

 

I and many others dislike Express VIs and Dynamic Data Type for reasons such as this. It's very easy to back yourself into a corner without really understanding what you're doing.

---
CLA
0 Kudos
Message 8 of 9
(2,478 Views)

Yes, my data is only 1D array  with no timing information. 

0 Kudos
Message 9 of 9
(2,470 Views)