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.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

time on x axis of waveform graph under 0,1 s

Solved!
Go to solution

Hello I have problem with time on x axis. I am measuring voltage from torque tranducer on y axis and time on x axis of XY graph.

If my while loop is acting on every 100 miliseconds I get correct data.

But if  I my while loop is acting on every 8 miliseconds I get data like this. (see my attachment).

Does anbody know how to display the correct time on x axis?

 

Thank you for your suggestion and answers.

 

 

0 Kudos
Message 1 of 20
(3,310 Views)

In the title you say "waveform graph" while in the post you mention "xy graph". What is it?

 

What is the format of the x-axis?

How do you determine or measure x? What is the datatype of x?

Can you attach some simple code that reproduces the problem with simulated data?

0 Kudos
Message 2 of 20
(3,304 Views)

Sorry It is waveform chart. Format of x axis is absolute time system time format 3 digits under properties of chart.

I measure voltage with 2 samples and 2000 Hz sample rate.

I have attached some code ODZIV NA STOPNICO is that graph.

From block MER NAV I measure voltage (=TORQUE).

 

0 Kudos
Message 3 of 20
(3,287 Views)

I did my program on help of that program.

0 Kudos
Message 4 of 20
(3,278 Views)

Well, a chart has only one x0, so why are you rewriting it to the current value with every iteration?

 

Set xo and dx once and feed the chart a single cluster containing your two scalars. Don't build arrays with one element and construct waveforms!

0 Kudos
Message 5 of 20
(3,277 Views)

I did not undesrstand what to do. So I have two values 1 value and 2 value both on y axis. x axis is time.

How to connect them without build array.

 

Here is my small program.

0 Kudos
Message 7 of 20
(3,263 Views)

DODI wrote:

How to connect them without build array.


You already do, in the upper part of your diagram (using bundle)! The rest you can do as in my example. (Forget building waveforms).

0 Kudos
Message 8 of 20
(3,260 Views)

Ok I tried that. But what bothers me is that firstly I can not save time x axis in notepad as before.

Secondly the time which I get is going forward and I get strange results (see my attachement).

 

What time format would be the best for representing on X scale?

 

 

 

0 Kudos
Message 9 of 20
(3,238 Views)

Hello !

 

I tried also with block elapsed time and get the same results.

If I set while loop on every 0,1 s I get right results.

But if I set time of while loop on 0,01 s I get double points.

 

here is my program

 

any suggestion?

 

Thank you.

0 Kudos
Message 10 of 20
(3,217 Views)