Benchtop Measurement and Test
Distributed Measurement and Control
Systems Engineering Software
Perspectives showcases how NI sees what’s next in the world of test and technology.
You can request repair, RMA, schedule calibration, or get technical support. A valid service agreement may be required.
Provides support for NI data acquisition and signal conditioning devices.
Provides support for Ethernet, GPIB, serial, USB, and other types of instruments.
Provides support for NI GPIB controllers and NI embedded controllers with GPIB ports.
i noticed an error in my script using the in-build Round() function. Why do these 2 statements output the same result (at least for me using DIAdem 2022 Q4):
Logfilewrite Round(1.5) ' Output = 2
Logfilewrite Round(2.5) ' Output = 2 (?)
Is this a bug or what could be the problem? Obviously Round(2.5) should output 3 and not 2.
Thanks in advanced for your support!
Go to Solution.
Microsoft follows IEEE 754 standard - round half to even. So it is working perfectly to the standard.
Thanks for your reply.
Is there an in-build function to round 'mathematically', which means:
The built-in rounding in VBS is just that one.
Call LogFileWrite(FormatNumber(1.5, 0))
Call LogFileWrite(FormatNumber(2.5, 0))
2. You can implement your own logic for rounding
3. DIAdem has built in whole channel rounding:
You can record it to get the script with the needed options
What do you need our team of experts to assist you with?
We'll be in touch soon!