Discussion:
RT Host VI does not communicate with FPGA VI with PID Discrete controller
(too old to reply)
Mani's World
2008-08-07 17:40:07 UTC
Permalink
Hi. I am using LV 7.1 RT with PXI 7831R. While developing an application with a PID controller in the FPGA vi, I have run into the following problem:
 
1.   After a successful FPGA compile, the code runs directly on the FPGA device and the PID controller works fine.
2. After I switch to the RT and run the host vi, it shows no activity from the FPGA vi. I look at the while loop count of the FPGA (indicator named 'FPGA-count' in the snaps below)) and it shows 'zero'. I have refreshed the FPGA vi reference but to no avail.
3. If i take out the PID related stuff from the FPGA vi, then the Host vi to FPGA communication works.
 
I have attached snaps of a simplified version of the fpga and RT vi's. If anyone can help, that would be greatly appreciated.
 
I also read that the PID control toolkit needs to be installed. It is installed on the host computer and shows in Automation explorer under LV 7.1. Does it need to be installed on the remote machine that is the RT controller as well. if so, then how to do that.
 
Thanks
 


RT-frt panel.JPG:
http://forums.ni.com/attachments/ni/170/347620/1/RT-frt panel.JPG


fpga-block.jpg:
Loading Image...


RT-block.JPG:
Loading Image...
Christian L
2008-08-08 01:40:05 UTC
Permalink
It seems like the FPGA is not running for some reason when you are running the RT VI. Without having the actual VIs to look at I can only make a few guesses why.

- On the Open FPGA VI Reference make sure the option is set to Open and Run, not just Open. Right click on the node to check this option.

- On the RT VI, make sure that stop-FPGA is False before you start.

- On the FPGA VI, make sure that the default value for stop-FPGA is set to False.

- In the RT VI check the error cluster passed to the loop to make sure that there are not errors and the FPGA VI is actually running.

If you are using the PID function on the FPGA, you do not need any additional SW installed on the RT controller. If you are using the PID function in LV RT then you do need to install the PID toolkit on the RT controller. This is done from MAX (Measurement and Automation Explorer) using the Install Software option for the controller.
Mani's World
2008-08-08 20:40:07 UTC
Permalink
Thanks for the reply.
I have already tried all that you suggested but nothing worked.
So I started simpifying the code. I first removed the 'saturation' block from the code. Recompiled. The code ran in the FPGA but still nothing when run from RT.
I then removed the 'niFPGA Dead Zone.vi' from the code, recomplied and this time the FPGA PID control worked from the RT.
So my guess is that it is the 'niFPGA Dead Zone.vi' that was the problem. If anyone has any experience with this vi, please let us know.
Thanks 
Mani's World
Brian_A
2008-08-11 21:40:05 UTC
Permalink
I have not heard of of any issues with the Dead Zone VI similar to what you are seeing.  If you just have the loop, counting iterations, and the Dead Zone VI, would you see the same behavoir?  If you would like, post the smallest version of your code that causes the issue.  If the issue can be recreated maybe we can figure out what is going on here. Cheers,
Loading...