LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Waveform chart x values, using waveform chart as XY graph

Solved!
Go to solution

Hi yamelbio,

 

can you provide an example VI to demonstrate your problem?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 41 of 46
(1,087 Views)

Sure, this is part of my proyect.

Ejemplo.jpg

Every iteration data is sent to the XY graph, and also the time in ms, so, I have a case structure that makes the XY graph be like a chart setting maximun and minimun values of X scale each time.

 

But that makes the loop frequency being reduced! I suspect there is another solution for high performance...I hope. Can you help me?

 

Sorry for my english...

0 Kudos
Message 42 of 46
(1,065 Views)

Hi yamelbio,

 

building (large) arrays in a loop will be slow!

And outputting all those data to a graph in every iteration will also be slow!

 

When you want real help you should attach real code, not just images of parts of code…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 43 of 46
(1,034 Views)

GerdW, Hi!

 

Here is the entire code, please help me, I dont know how to avoid those problems you mentioned. 

Thank you!!

0 Kudos
Message 44 of 46
(1,020 Views)

Hi yamelbio,

 


@yamelbio wrote:

Here is the entire code, please help me, I dont know how to avoid those problems you mentioned. 


To avoid problems you should take a step back and rework the whole (main) VI!

 

Please avoid code like this:

You use way too much local variables - and all the terminals are unused in the block diagram!

Replace locals by either terminals or wire!

 

Using a "Stop" function in a subVI is a no-go ("Password.vi")!

Don't have loops spin as fast as possible, especially for GUI handling (like Save_Channel_Selector)!

Plotting the same data on 21 (!) charts (with a history size of 65536 samples each) in each iteration is also not helping with execution speed! (Don't label a chart as "graph"…) What's the point in displaying 65k samples on a chart of max. 800 pixels width?

 

You are using way too much code: use loops or polymorphic instructions instead of duplicated code (Spread_Save):

 

What's the point of this:

Use a simple timestamp indicator instead of two string indicators! You can edit its display properties to have it look like you need…

No need to release the Cursor in each iteration (at desired 1kHz)!

 

General conclusion:

When you want to read data at 1kHz loop rate (for whatever reason) then you should use a seperate loop just for DAQ.

Other processes (like GUI handling or data display) should NOT run at this speed! Update rate for most monitors is at 60Hz, so you don't need to update your charts more often…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Download All
0 Kudos
Message 45 of 46
(1,006 Views)

Wow...there is a lot of work to do... I guess I need to study consumir/producer loops.

 

That solution as the alternative of cases structures is crazy!! I am impressed, I feel like a noob.

 

I need to study indeed.

 

Oh thank you!! GerdW

0 Kudos
Message 46 of 46
(977 Views)