How to convert cnt to voltage in PID application?

Applications, development tools, FPGA, C, WEB
Post Reply
tom.zhang
Posts: 10
Joined: Sat Aug 01, 2015 1:09 pm

How to convert cnt to voltage in PID application?

Post by tom.zhang » Sun Oct 04, 2015 8:14 am

Hi

I'm starting to use the PID application in Red Pitaya. However, the PID set point and parameters use this bizarre unit cnt. How do I convert cnt to voltage or is it equivalent to voltage? This information is very important when assigning the set point so does anyone has any ideas? I couldn't find it on Red Pitaya wiki.

Thanks

Nils Roos
Posts: 1441
Joined: Sat Jun 07, 2014 12:49 pm
Location: Königswinter

Re: How to convert cnt to voltage in PID application?

Post by Nils Roos » Fri Oct 09, 2015 9:40 pm

The conversion of pid setpoint voltage to cnt value is the same as for the fast analog inputs, see for example osc_fpga_cnv_v_to_cnt() and osc_fpga_calc_adc_max_v(). They take the calibration values as input, see the wiki on how to set them and calib.c on how to read them.

tom.zhang
Posts: 10
Joined: Sat Aug 01, 2015 1:09 pm

Re: How to convert cnt to voltage in PID application?

Post by tom.zhang » Tue Oct 13, 2015 7:27 am

Thank you Nils for your reply.

Sorry I stilll don't get how to convert between the two because I don't understand the code. Could you give me a simple example? Thanks.

Nils Roos
Posts: 1441
Joined: Sat Jun 07, 2014 12:49 pm
Location: Königswinter

Re: How to convert cnt to voltage in PID application?

Post by Nils Roos » Thu Oct 15, 2015 8:17 pm


Post Reply
jadalnie klasyczne ekskluzywne meble wypoczynkowe do salonu ekskluzywne meble tapicerowane ekskluzywne meble do sypialni ekskluzywne meble włoskie

Who is online

Users browsing this forum: No registered users and 102 guests