VeriStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Impose a scaling factor between model and FPGA

Solved!
Go to solution

Hello all,

 

I have a VS project setup that deploys onto a real time system. The project has a FPGA and a model. A few of the output from the model maps to the AO of the FPGA. Also, a few of the AI of the FPGA maps to the inputs of the model. Here is my problem. The FPGA AI gives me a voltage measurement, but the model only takes a pressure (bar) as the input. That means I need to convert my voltage into pressure using a table or a formula. How do I make that happen?

 

Also, I want to use the same FPGA lvbitx and the same dll model on various physical setup. The only difference between these physical setups is the table/forumla (for example, a different pressure sensor is used). Is there a convinient way of tell VS to use different sets of table?

2012-03-06_165659.png

Message 1 of 2
(5,690 Views)
Solution
Accepted by topic author oeua.uoeuoau

Hi oeua.uoeuau,

 

If you have a formula to convert the voltage into a pressure you can use a calculated channel to implement it. You would just need to point to the FPGA output in your calculated channel and the inport of your model to the calculated channel. If you need a lookup table you can create a LabVIEW model that takes in the voltage and uses a lookup table to get the pressure reading and port the outport of the LabVIEW model into the inport of your other model. 

 

To change between different scallings you can simply use a procedure to set a variable to be one input or another. 

 

Cheers,

< Brian A | National Instruments | Applications Engineering >

Message 2 of 2
(5,655 Views)