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.

Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

How to scale my wavechart to show my real-time signal?

I don't know how to scale my wavechart to show my real-time signal.  For example, in this application, I would like to display a 2 VPP 100 Hz sine-wave voltage signal on my wavechart.  I set my Host vi loop rate to 10 ms, while my FPGA sample rate is 100 KHz.  What should I do is I want my X-axis has ten unit length and it reprents 10 ms, in which case the frame should contain one period of the sine wave?  And I suppose if I change the denominator into 1000, the rate of change should be in second.  However, seems it doesn't work in this way.  I attach project and both host and fpga vi.  

 

Also I try to scale Y axis to show +/-1V of 2VPP signal.  I used the scaling factor offered by the example vi, but seems it's not right.  the formula is (1V*x)/32767.  I don't know what 32767 stands for in the example vi: it doesn't seem to me the greatest double precision floating number.  

 

Thank you very much for your help.

 

I got the recommendation from Mr Robbob as the following 

"

My recommendation: Convert your number to Fixed Point on the FPGA and do your scaling there. Change your FIFO to handle Fixed-Point numbers of the required Integer and Decimal bit values.  FPGA is fast and great for conversions like that.  That way, when you read your FIFO on the RT side, your values are already scaled properly and you can wire directly into your graph.

"

 

However, could someone please provide me with more information and details how to implement this both on fpga and host vi?  Also, would you please give me some instructions on the scaling of X-axis to show real time?  Thank you very much.

0 Kudos
Message 1 of 2
(2,690 Views)
Duplicate post. Please see http://forums.ni.com/ni/board/message?board.id=280&message.id=5671&jump=true#M5671
Rob K
Measurements Mechanical Engineer (C-Series, USB X-Series)
National Instruments
CompactRIO Developers Guide
CompactRIO Out of the Box Video
0 Kudos
Message 2 of 2
(2,667 Views)