LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

floating point exceptions

Does Labview clear the floating point control register to turn off / ignore floating point exceptions.

 

I am using Labview 2010 SP1 to call into a C++ DLL that I have written.

 

If I call the FPU control

 _controlfp_s(NULL, _EM_INEXACT, _MCW_EM);

 

inside every function call, visual studio will break on floating point exceptions like divide by zero.  I should be able to call this once during program start up and have the FPU setting remain constant.

 

Does labview reset the FPU or clear out floating point exceptions after every call to C library

0 Kudos
Message 1 of 3
(2,732 Views)

Hello,

 

I don't think (and hope) that LabVIEW resets any OS settings.

 

In the LabVIEW options (Tools >> Options), in the "Front Panel" section there is an option called "use localized decimal point", I believe it is checked by default, I always uncheck it so that LabVIEW use "." and doesn't care about what the OS uses.

This mainly because french Windows uses coma and swiss french Windows uses dot... insane!

 

Hope this helps.


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 2 of 3
(2,695 Views)

Hi Brian,

 

Calls to the C library from within labview shouldn't clear exceptions that have been thrown in a dll that has been called.  Do you have an example dll and VI that calls to it that shows otherwise?

 

David A.

0 Kudos
Message 3 of 3
(2,684 Views)