I am with a problem regarding the calculation of capacitator reactance (XC=1/WC), i have a problem when my capacitator is 0 ( i can adjust the value with a knob) the display number will be INF, because i am dividing for 0.
Is there a way to display 0 when this happens?
When capacitator is 0 i want to display that my XC is also 0 and it keeps displaying INF.
Thanks in advance,
Solved! Go to Solution.
I was able to switch the maximum to display at max 16 bits (32768), even tho it wont display INF, but it will display the 32768, which doesnt solve at all my problem.
The problem is that by showing the max number it will affect all my program, that is why i need to fix this issue.
IF divisor == 0 THEN result := 0 ELSE result := dividend/divisor ENDIF
Have you tried to implement this simple algorithm in LabVIEW?
please post your questions here in the forum, using PMs isn't the right way!
Why do you use FXP datatype as shown in your PM?
I give you a hint on how to implement the algorithm:
Btw. to calculate the reciprocal you could find a specialized function called reciprocal… 😄