06-26-2009 06:19 AM
Hello,
I am acquiring analog signals of 50 Hz frequency using NI 9215 and cRIO 9073.
I am using DC and RMS measurement FPGA VI to get the RMS value of voltage and current in the FPGA.
Similarly, i need to measure the power factor taking the voltage and current values in the FPGA.
I am able to get the power factor in RT using the VI , which calculates phase angle.
But in FPGA, I guess it is not direct. Please can I know, how to obtain the power factor in FPGA itself.
Thank you.
Hema
06-26-2009 11:49 AM
06-26-2009 12:22 PM
I am able to get the power factor in RT using the VI , which calculates phase angle.
Using WHAT vi?
I'm not an expert on FPGA, but calculation VIs are basically the same between RT and normal desktop LabVIEW, It's hard to imagine why it's different in FPGA.
Blog for (mostly LabVIEW) programmers: Tips And Tricks
06-26-2009 10:31 PM
Certain mathematical functions are not available on the FPGA due to its more limited resources that typically have more dedicated purposes. Depending on how the RT power factor VI is written, the mathematical functions may not currently be allowed or possible on the FPGA in their native form. The FPGA also cannot handle floating point math (which I would assume the RT VI is using). This may simply need to be converted to fixed point for it to work. Like others have mentioned though, without knowing the original RT VI's contents it's hard to say exactly why it won't currently work on the FPGA, so these are some possible reasons to look into.
06-28-2009 11:20 PM
Hello,
The VI , that i am using to measure power factor in RT or windows is attached here. It is called PhaseDiff.vi
When i try to use the same VI in FPGA, i get message as to the Fast Hilbert Transform.vi and AC DC Estimator.vi are
not executable. That is why, i meant that power factor measurement in FPGA is not direct.
I am using LabVIEW 8.6
Thank you.
Hema
06-29-2009 05:14 AM - edited 06-29-2009 05:14 AM
OK, I haven't used FPGA version, so I'm out of my cage. If it is indeed limited, as JamesBeams says above, then there's not much you can do except rework the math yourself.
I would think that such a VI would not be allowed to be transferred onto the FPGA in the first place, but that's just a guess.
Perhaps there's a list of acceptable / unacceptable FPGA vi functions, and you could confirm that it's not available.
You might also ask the tech support folks:
http://sine.ni.com/apps/utf8/niae_asc.main
Blog for (mostly LabVIEW) programmers: Tips And Tricks
06-29-2009 06:33 AM
Hi Hema,
As JamesBeans mentioned, the functions that are used in that VI should be supported on the FPGA. You will NEED to rework the math since floating point is not supported (but fixed point is). Also, have a look at the functions palette on the block diagram and you will notice that only those functions that are supported on the FPGA are exposed. You could go through the palette to understand what nodes and functions are supported on the FPGA.
06-29-2009 10:45 AM
Hema,
I took a brief look at your VI and it seems that you will really have to reqork it to get it FPGA happy. Arrays with undefined length will not work in FPGA as you are working and hardware and need to know how much space you need before runtime. Also, as stated above, floating point math is not supported. But this can be easily overcome using fixed point math (the toolbox for which is located here). Also,several of the functions that you are using (such as the array min and max, Hilbert transform and AC DC estimator) are not supporte on the FPGA - for these you will have to come up with your own routines to fit onto the FPGA. There is some info about Hilbert transforms on the FPGA in the forums.
Hope this helps a little.
Cheers, Matt