LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview 2014 Waveform Min/Max

Hi.

 

My VI started crashing repeatedly after I upgraded from Labview 2013 to 2014.  After some detective work, I found which part of my code was causing the trouble (see attached  file "prob.png").

 

After some work, I was able to find a solution (see attached file "sol.png") which involves more VIs and is a bit less elegant.  However, the final result is the same.

 

I wanted to share this with others who might be experiencing the same thing, and ask whether or not this is a known issue...?  Maybe there is a better way to fix this...

 

Thanks,

 

Orel.

 

 

Problematic code:

prob.png

 

Solution:

sol.png

Download All
0 Kudos
Message 1 of 11
(3,935 Views)

Hi Orel,

 

- What means "crashing" to you?

- What's the data in "waveform out 2"?

- What happens when you use a wire instead of a local variable?

Best regards,
GerdW


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

Hi GerdW,

 

1.  "Crashing" is getting the attached "LabVIEW Crash Reporter" window, after Labview closes.

 

2.  The data is just a regular waveform, for example:

                                                                                                     waveform.png

 

3.  Using a wire instead of a local variable seems to work.  Any explanation for this?

 

Thanks,

 

Orel.

 

0 Kudos
Message 3 of 11
(3,903 Views)

Hi Orel,

 

3. THINK DATAFLOW! 😄

 

It could be related to some weird kind of compiler optimization in combination with your local variable. With DATAFLOW the compiler is much more sure about when to touch data…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 4 of 11
(3,889 Views)

Are you looping as fast as possible? A waveform is a weird thing to have as a local variable because usually you want data points one by one without repeated points.

 

Like GerdW said, dataflow. If you can, share your code so we can take a look. This could be something weird with that local variable and a race condition.

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


0 Kudos
Message 5 of 11
(3,883 Views)

Yes, but it used to work in Labview 2013 and it works if I change around some VIs...  For some strange reason, only this VI combination crashes it.

0 Kudos
Message 6 of 11
(3,879 Views)

There are compiler differences between 2013 and 2014, so if something wasn't coded in the best way it could cause a problem with one compiler and not another. Dataflow is a big deal.

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


0 Kudos
Message 7 of 11
(3,870 Views)

Thanks, James.

 

It's no problem using a local variable.  I have one infinite loop which acquires the waveform using an FPGA and a second loop which analyzes the data.  There shouldn't be any repeated points because the acquisition is done so that the variable is updated only when a full waveform is output.  I would rather have both loops running independently.  If I use a wire, then that's not the case.

0 Kudos
Message 8 of 11
(3,845 Views)

OK thanks.

 

I'll keep thinking about it.

0 Kudos
Message 9 of 11
(3,833 Views)

Hi Orel,

 

use a queue, when you want to have a nice producer-consumer scheme!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 10 of 11
(3,830 Views)