To download NI software, including the products shown below, visit ni.com/downloads.
Overview
This VI demonstrates how you can divide two numbers, and check for Infinite (inf) or not a number (NaN) errors before using the result in your calling VI.
Description
This VI first take two inputs (divisor and dividend) and divides one by the other to get a quotient, then compares the quotient and checks if it is infinity or not a number, and finally displays an error if it is equal to infinity or not a number and displays a message informing the user if the error is caused by either the quotient being equal to inf or NaN.
Use the VI as a subVI, or use it directly. You can modify this subVI to not do the division itself within the subVI, but instead just take a single numeric input and do the logic on that value - i.e. taking out Numeric Two, the division function, and Result.
Requirements
Steps to Implement or Execute Code
Additional Information or References
VI Snippet
**This document has been updated to meet the current required format for the NI Code Exchange.**
Regards,
Imtiaz Chowdhury
Project Manager
Green Running / Austin Consultants
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.
Nice