LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Numerical Integration Method in FPGA

Solved!
Go to solution

Hi,

Thanks for your suggestion I shifted from totally depending on FPGA to (FPGA - RT) system. I was not able to use SCTL for analog NI-9223 since the program did not allowed it, so I take the reading from my Analog input AI0 and send it to FIFO write in while loop and take the reading and calculation in RT side. The program is working now and Calculating the value.

 

However, I am getting one issue here. Even though I disconnect my function generator the program in RT main is still running and calculating the value, although there is no graph in the graph chart. I am observing 10.5958 values from my analog AI0 even without connecting the Function Generator.

 

*Scaling Factor- To calculate current on the basis of current probe sensitivity.FPGA block diagramFPGA block diagramCalculation with Function Generator connectedCalculation with Function Generator connectedAI0 output without function generator connectedAI0 output without function generator connectedRT main diagramRT main diagram

0 Kudos
Message 21 of 24
(54 Views)

Hi Abhi14try,


@Abhi14ry wrote:

However, I am getting one issue here. Even though I disconnect my function generator the program in RT main is still running and calculating the value, although there is no graph in the graph chart. I am observing 10.5958 values from my analog AI0 even without connecting the Function Generator.



That is because your code does not know that  you disconnected your function generator, your AI0 is floating and that is the value that you are seeing. 

BTW, didn't you say you need reaction time in us and that you need to output a signal once the conditions are met? 

0 Kudos
Message 22 of 24
(50 Views)

I tried to add Data Selection Logic for this and put the threshold value to 12 but my I am getting half wave as output between the threshold value of 1-5 and beyond 5 all zero.

Can you please suggest me how can I let my program know if its input is disconnected?

Or should I add this filter circuit between the analog input(AI0) and input source(Function Generator)?

 

Yes I need my reaction time in us and my calculation to stop when it reaches the theoretical value immediately. I tried to implement the calculation directly in FPGA but I did not received any output.

Can you please share your view what can be done here?

Is it possible to do the calculation in FPGA side?

 

 

Download All
0 Kudos
Message 23 of 24
(24 Views)

Hello Abhi,

 

1) I am not fully sure what you mean. What is the amplitude of your input waveform peak to peak? Is it supported by your hardware? 

 

2) Observe, you will be operating in a certain voltage range when connected. But when disconnected, you will see a pattern or a value that you can utilize to detect disconnect. For example, one simple thing to do, a constant voltage above 9V or below .5V for 300us will be considered as disconnect.

3) You should be able to add filters in your code, if needed. I never had to use one and I mostly work with application specific systems. If you are in an environment with high noise, like a servo motor is running near your setup, then you will be using shielding to ground the noise.

 

4) It is totally possibly, message 12 in this thread is proof of concept for the same.

You never confirmed if you need to visualize the data. i.e., the integrated data, if yes, then in your case you will add 3 target to host fifo to stream the data to RT or PC.

0 Kudos
Message 24 of 24
(6 Views)