Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

Read NI 9870 module (over 64 bytes)

Solved!
Go to solution

Hello,

 

I´m trying to use the NI 9870 module, in FPGA Interface.

When I send data, I don´t have any problem, but I´m having a lot of problems in the reading.

 

If the data that I try to read it´s less than 64 bytes, the program works without any problem, but when I have longer data (>64 bytes), I got overrun error 65575 in the FPGA.

I have tried to changed the speed in the transmision to make the FIFO dont be so fast filled, but it doesnt work. I have also included in the FPGA a time delay for increasing the time, ....but i dont get any solution.

 

I´m very lost with this....Please can anybody help me with this issue???

 

Thanks and best regards,

 

 

0 Kudos
Message 1 of 4
(6,171 Views)

When I have for example 180 bytes in the port to be read

The method "Bytes in Port" in the FPGA, reads only 64 bytes (not the 180), and the first time that it tries to read in RT with READ_FIFO.Read, I got the error 65575 in the FPGA.

If I skip it,(attached "NI 9870 problem2.png"), in the next cycle, there are 63 "Bytes in Port", and this time I got 63 in "Element remaining", therefore I got the 64 firsts bytes of my data (without the first one, this one is missed) (attached "NI 9870 problem3.png"). I carry on, but in the next cycle in "Bytes in Port" is not reading anything, 0 bytes, and therefore the Reading process finishes.

 

I was also trying to increment the "Bytes in Port" in the FPGA (multiplying by three the bytes read) but then, in the RT, when it tries to read, I got the error 65575 again (I attached "NI 9870 problem.png").

 

Please any idea how to solve this??

Thanks and best regards,

0 Kudos
Message 2 of 4
(6,156 Views)
Solution
Accepted by topic author juanfer23

Hello,
 
In case it helps someone. I've solved it, creating in the FPGA program, a parallel loop for reading, to the writing-configuration one, and without the use of interrupts, since they caused me a single cycle reading and therefore the problems.
 

0 Kudos
Message 3 of 4
(6,140 Views)


 Can you say more details?

0 Kudos
Message 4 of 4
(2,248 Views)