10-09-2019 10:59 AM
Hello community,
I have an array with Rs and Xs. And I need to calculate the impedance by the formula: Z = Rs + i * Xs.
Do any body have an idea how to handly the imaginary part (i) for an impedance calculation?
How the block diagramm must look specialy for this formula?
Solved! Go to Solution.
10-09-2019 11:18 AM
LabVIEW has a Complex Number set of datatypes. Probably those combined with the nodes on the Numeric palette will get you where you want to be.
You can create one by dropping a Double constant then right clicking and choosing Representation > CDB (complex double) or related types (at the bottom of the group).
10-09-2019 11:21 AM
If you right-click a floating-point constant or control, there's a menu option called "Representation" and if you go to that there's an option to change them to be a bunch of different data types, one of which is CDB, "Complex Double". Using that, you can do math with all of the built-in functions operating on complex numbers.
Also, in the "Numeric" Palette, there is a "Complex" sub-palette that includes a lot of nodes for constructing complex numbers from real components, and deconstructing them to real and imaginary.
10-09-2019 09:32 PM
10-09-2019 09:58 PM
In response to your original question:
@UA wrote:
How the block diagramm must look specialy for this formula?
Something like these options:
Here you can see either the use of the Re/Im to Complex node described above, or the Complex Constant being used to make the (real) "Imaginary Part (X)" into an actually imaginary part (for this you could also use Re/Im to Complex and just wire 0 to the Real input).
Depending on what else you might need to do, the Complex Number functions (a list can be found here) could be useful. But maybe you only need to add these and so the Re/Im to Complex is fine.
10-11-2019 04:03 AM
Solved, thank you.