LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

formula node

Dear Friends

I would like to calculate rms value of my square wave pulse Arrays in a formula node based in C code

Any Ideas please
0 Kudos
Message 1 of 7
(3,953 Views)
Hi rumayan,

does it have to be C?

Why not use LabView:

(All the functions can be found in the math/statistics palette, at least in LV6.1 to 7.1.)

Message Edited by GerdW on 08-03-2006 10:46 AM

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 7
(3,948 Views)
Dear GerdW,

Thanks for reply. Yes, it must be  C code because it is a part of a big program.
Alternatively,  if I could write the root mean square formula(rms=sqrt (1/n((X)^2) as a C code that great. Because then,  I will be able to define it as a variable
Any Ideas Please


0 Kudos
Message 3 of 7
(3,930 Views)
I'd say that the LabVIEW method is by far the easiest, as the example above shows. However, since you say you need it in C, while you could use a formula node, you're probably better off creating a DLL since you say this is part of a larger C program. Can you simply add the rms function to your C code and compile it into a DLL? That way you can call it from LabVIEW. If you look in the manuals that ship with LabVIEW there's one devoted to calling external code, and there's an example that ships with LabVIEW that's very good in showing how to do it.
0 Kudos
Message 4 of 7
(3,910 Views)
Dear friends,
Is there any way to generate a square wave inside labview with different rise times?

0 Kudos
Message 5 of 7
(3,836 Views)
Hi rumayan,

you need 'square wave with different rise times' ??? Square wave should have an infinite small rise time...

So you probably need something like a saw-tooth. Generally, a wave is just an array of values over time. You can define any kind of values! And there are even functions to generate waveform (sine, square,...) or ramps: look at palette 'signal processing' -> 'Waveform generation' or 'Signal generation'.

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 7
(3,830 Views)
thanks a lot that was helpfull

0 Kudos
Message 7 of 7
(3,816 Views)