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.
As of TestStand 3.0, you can use the following expression function:
Pow(base, exponent) This function returns a base value raised to a specified power. Parameter 1: A number specifying the base value. Parameter 2: A number specifying the exponent value. Returns: The number x raised to the power of y.
In 2.0.1 or earlier, your best bet would be to call a code module to do it.
Thanks. I also discovered if you're looking to raise 2 to a power (i.e. a binary value), you can use the expression "1 << y" where y is the exponent, to left shift a bit some number of bits. Specifically that's what I was trying to do, and this solution worked very well.