From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Dividing 2 anologue input variables FPGA

Hi for all,

 

i wana implement shematic controller 2 loop

the inner loop  need  to explain set point expression

the probléme its wiring  types because variable are note similar type so i used different converter blocs but don't function what type of convert i must use to set point with division of 2 analog input from FPGA

labbv2.png

0 Kudos
Message 1 of 7
(3,515 Views)
Just when you were thinking that nothing could be more more useless for troubleshooting than a screenshot... A picture from your phone? Really? And with the flash on yet...

Mike...

PS: CODE. We need to see code.

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 7
(3,493 Views)

LABVIEWONE.png

my problem is conformity of types after division of 2 input 16 bits integer to set point  type f regulator thanks

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

You will need to convert to fixed point numbers to perform the divide.

 

If you drop a to fixed point on each of the inputs it "should" (but check) convert it to a 16,16 fixed point number which means you don't lose any data but the divide will work.

James Mc
========
CLA and cRIO Fanatic
My writings on LabVIEW Development are at devs.wiresmithtech.com
0 Kudos
Message 4 of 7
(3,439 Views)

please some precision in your responce  i'am not expert so you want to say i add 2 converter to fixed point before dividing opération !

for your second solution  after dividing i integrate converter ?!! thanks.

0 Kudos
Message 5 of 7
(3,402 Views)

Hi Rayden,

 

I believe James Mc was suggesting that you should try to convert each input (Ubus and Ucapa) to fixed point before dividing, instead of converting after division.

Try that and let us know how it works out.

 

Thanks,

 

Lauren

Applications Engineer

National Instruments

0 Kudos
Message 6 of 7
(3,346 Views)

Hi Rayden,

 

Yes exactly as Lauren said.

 

We need a number type that can have a fractional part for divide since even if you start with integers you can get a non-integer result. By converting to fixed point before the divide then the output will automatically be a fixed point number which can store the result.

 

 

Cheers,

James

James Mc
========
CLA and cRIO Fanatic
My writings on LabVIEW Development are at devs.wiresmithtech.com
0 Kudos
Message 7 of 7
(3,319 Views)