10-05-2021 03:06 AM - edited 10-05-2021 03:08 AM
Hello,
I have some experience with LV, LV FPGA and cRIO, however I am a little bit confused with the system design for PXIe. The components are: PXIe-8840 controller, Analog/Digital I/O module PXIe-6341, FPGA PXIe-7971R and dual I/O transceiver module for FPGA PXIe-5782
I measure and process the fast AI (sampling 250 MHz) in the FPGA where the control value is computed with the rate up to 1Mhz. I want to send the control value (0-5 Volts) to AO to PXIe-6341 to close the feedback.
I would like to know the best way how to do it.
I am not able to do it directly from the FPGA code. My idea is to read the FPGA output indicator in the HOST code running on PXIe Windows 10 and send it to the AO. But I do not believe it is the right solution...
10-05-2021 07:52 AM
What's your loop time from input to output?
10-05-2021 08:20 AM
The process description may be useful:
There are laser pulses acting on the surface and its heat accumulation is measured by a detector. The rate of the laser pulses is fixed and can be set in a range up to 1 Mhz. The moving average heat accumulation is computed in the FPGA. It is required to control the energy of the laser pulses to maintain the mean value of heat accumulation. The all process takes a few miliseconds.
The control loop rate depends on the laser pulse rate. I think that the control loop rate may be a few time less than the rate of the laser pulses
10-05-2021 08:53 AM
Seems like there is a non-RT operating system in the loop. This will prevent deterministic functionality.
10-06-2021 01:32 AM
You are right, threre is no RT system intalled on the PXI controller, only the RT save mode. I have found that the RT OS can be installed on the PXI Link and it can be sweetched between WinOS and RT OS. In RT OS Then the timed loop rate can be 1 Mhz Link .
My idea is to read the FPGA output indicator in the 1 MHz timed loop in RT, calculate the control value and command the AO in the PXIe 6341.
Do you agree with the idea ?
10-06-2021 04:24 PM
Reading an FPGA indicator on the Host (RT in this case) is always lossy with a non-deterministic latency in the single digit microseconds (not sure if the upper bound of this goes into the 10s of microseconds). Not sure if this will be a problem in this application.
I have no RT on PXI experience and cannot comment about that.
10-07-2021 01:24 AM
Thank you for the info about the latency of FPGA indicator reading in the RT. I have to consider the consequences.
I suppose, there is not better choise ...
10-07-2021 08:54 AM
Would going with a complete FPGA based approach work for you?
There are many R-series multifunctional RIO cards that have both AI, AO and DIO, allowing you to implement the whole control loop on the FPGA.
10-07-2021 12:30 PM
If I have another R-series FPGA card with right I/O range, I would need to send the control value from PXIe-7971R to it. How can it be done ?
10-07-2021 03:07 PM
You can leverage the P2P technique to share data between RIO cards without going through the host.
https://zone.ni.com/reference/en-XX/help/372831C-01/p2pstreamhelp/p2plv_topo_fpga2fpga/
I don't have experience with this concept but have heard people use this to transfer data between RIO instruments at high rates without involving the host.