LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

sending data points to fpga from rt module in crio 9035

Hello, 

 

I have a crio 9035 which I need to use as a controller for 3 devices, the controller is a 3 channel pid loop implemented in the fpga of the chasis which works okay, the thing is that I have a spreadsheet file which contains 2000 datapoints of a waveform (this waveform is the setpoint of the controller), I read the file in a vi, create an array, send that array to the real time module. Now the real time module after strips the array and sends the data point by point to the fpga, I do this in a for loop, inside the for loop I put a delay microseconds function, and depending on the frequency that the user wants of the waveform I calculate the delay for sending each data point, the problem is that it takes longer that it should, if I choose to send the datapoints in order to have a 1 Hz  waveform it takes longer, approx 1.3 seg instead of 1 seg, and if I choose a higer frequency the delay is worse, the period for a 4 hz waveform is .25 seg, it takes to the rt around 0.4 or more to complete the transfer.

 

I already tried to use a timed loop, and changing the delay functions and it doesn't help very much, I will leave a picture of how I am doing things.

 

Thanks.forloop.JPG

0 Kudos
Message 1 of 2
(2,583 Views)

Hi Odisseo039,

 

Try using a Read/Write control instead. For your application, it might be easier to use the DMA FIFO to pass the 2000 datapoint and let the FPGA handing all the timing. On the FPGA side, you can read the FIFO point by point using the delay you want.

 

I think the Real-Time Measurement and Control forum is a better place for your question as well.

 

Ren H.
Applications Engineering
National Instruments
0 Kudos
Message 2 of 2
(2,540 Views)