LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Save data

Hi,

Just a small thing. 

When stop the VI from main stop button in the toolbar, it stop normally, but when I stop it from the stop button of the while loop, I got this message:

 

alhabeeb_1-1738228861380.png

Should I do producer/consumer blocks? Or there is another way? Or it doesn't matter at all?

Thanks   

 

0 Kudos
Message 41 of 47
(133 Views)

Hi Alhaheeb,

 


@alhabeeb wrote:

When stop the VI from main stop button in the toolbar, it stop normally, but when I stop it from the stop button of the while loop, …


When you use the "stop" button in the toolbar then you DON'T stop the VI "normally", but you ABORT it prematurely. (Using the ABORT button in the toolbar is like using a tree to stop your car!)

 

When you use a stop button on your frontpanel to set a loop condition to stop the loop then you use standard DATAFLOW.

 


@alhabeeb wrote:

I got this message: error -200279

 

Should I do producer/consumer blocks? Or there is another way? Or it doesn't matter at all?


Every error "matters"!

  • You should implement some error handling.
  • You should remove any waits in the loop, if there are any.
  • You could read more samples per DAQmxRead to simplify data handling (aka "improve speed of execution").
  • As last resort you might use a producer-consumer scheme to decouple DAQmx handling from data analysis…
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 42 of 47
(129 Views)

The error in the close file.

alhabeeb_0-1738246253607.png

 

0 Kudos
Message 43 of 47
(112 Views)

Hi alhaheeb,

 


@alhabeeb wrote:

The error in the close file.


No, error -200279 does NOT come from FileClose!

 

The error originates from using a 100ms wait function in a loop, where the iteration time should be controlled by DAQmx…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 44 of 47
(110 Views)

Dear @ 

I want to scale m_sec and m_prim from the outside constant. Is it possible? because the formula is (data-0.004)/16.

Alos, I would like to have a chart for m_sec , m_prim and ER.

Thanks

 

Alhabeeb

0 Kudos
Message 45 of 47
(66 Views)

Hi alhabeeb,

 


@alhabeeb wrote:

I want to scale m_sec and m_prim from the outside constant. Is it possible? because the formula is (data-0.004)/16.


Yes, that's possible!

  (data - 0.004) / 16
= data/16 - 0.004/16
= 0.0625 * data + (-0.00025)

Simple math…

 

Please keep your discussion in just one place and follow all suggestions/recommendations of Christia...!

Best regards,
GerdW


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

OK

thanks

0 Kudos
Message 47 of 47
(50 Views)