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.

LabWindows/CVI Idea Exchange

Community Browser
Top Authors
cancel
Showing results for 
Search instead for 
Did you mean: 
Post an idea

Comparison between floating point numbers is best done using FP_Compare() - see CVI help for details.

Often you need to choose the maximum (or the minimum) of the two floating point numbers, and the most common approach is:

if (a > b) {

choose a

} else {

choose b

}

If you use FP_Compare instead of ">" you'll notice that FP_Compare is much slower than ">" (because it involves calculation of the ratio between the two numbers). This is extremely evident if you have to choose the maximum of several couples of numbers.

I think that the maximum (or the minimum) between two floating point numbers could be found in a more effective way, comparing the exponents of IEEE representation (for example), and calculate the ratio only if the exponents are equal.

For this reason I suggest two new functions FP_Max() and FP_Min() that would much more performant than the easy approach.

Using SetTableCellRangeVals to update several thousands table cells is very effective.(better than using ATTR_CTRL_VAL)

I miss similar function for set atribute values in the same way. In example:i need  to set text to be bold or  set background color for each table cell separately.

Ithik that usability of SetTableCellRangeVals will be better if SetTableCellRangeAttributes will be avivaible because there will be the same program approach/logic for values and attributes,instead of mixing multiple cell vallue update and one by one cell attribute update.

 

Not sure if any other IDEs use this, but it would be nice to select an option toif when cut and pasting code to somewhere else in the file, is if the indentation corrected itself.

 

So instead of absolute indentation from where it was at previously (column number from line), it would be relative indentation based on the first line cut/copy and pasted.

Dear NI

I want to measure the time interval between the start signal and the stop signal.The time interval is about 2 to 3 minutes.Start signal and stop signal are collected from Ni usb-6509,There are 16 channels in total。I want to use Labwindows CVI for this purpose。What should i do?Should I use 16 threads for timing or 16 timers for timing?

As discussed here: 

http://forums.ni.com/t5/LabWindows-CVI/how-to-make-visibal-and-disable-a-control-within-a-tab/td-p/1073548#

LuisG called out that the ProcessSystemEvents() may or may not clear all of the System events queue. Could this callback return a percentage scorecard or a Boolean reply on the status of events?

The exit() function will make the application always return 0, no matter what value is passed to the function.  Per the documentation:

Note Due to the way that this function is implemented, the exit status value entered into this parameter is ignored.

 

Thanks.

 

Hello,

 

the Advanced Analysis Library provides some convenient functions for array operations; unfortunately some of them are available only for the 1D case and not for twodimensional arrays. While it is no big deal to add a loop I suppose that these AAL functions are speed-optimized, something that cannot be achieved when using the native CVI compiler.

 

Hence I'd like to suggest the addition of functions Clear2D, Set2D, Copy2D

I hope CVI can maintain its owns Inter Process communication mechanism, such as the share memory, pipe, message queue, etc., not need to call the OS's API.

 

 

 

David

In the Advanced Analysis Library I'd like to see a function for efficiently computing binomial coefficients. The 'standard' definition

 

a! / ( b! * ( a - b )! )

 

is not efficient and susceptible to overflow. A better approach for example could be the calculation of ln (n!) using the gamma function as outlined in Numerical Recipes.