LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Boolean indicator doesn't update after reading from FIFO

Solved!
Go to solution

Hi folks, 

I build a simple VI that reads the value in line DIO0 of 9401 module and it works I see the boolean indicator blinking. 
My purpose is to transfer boolean values from FPGA to the host and I used FIFO. When I execute the VI the indicator output from FIFO.read doesn't blink. I don't know how to resolve this issue. 
I uploaded a screen with VI code. 

0 Kudos
Message 1 of 10
(1,310 Views)

Please also post the code of the host-VI.

 

Regards, Jens

Kudos are welcome...
0 Kudos
Message 2 of 10
(1,299 Views)

Hi Jens,

I uploaded the host code

0 Kudos
Message 3 of 10
(1,287 Views)

I assume the FIFO To_fpga goes from host to the FPGA?

 

Do you write to that FIFO anywhere? Otherwise the FPGA will wait infinitely at that node before writing another element to the FIFO to your host.

 

Regards, Jens

Kudos are welcome...
0 Kudos
Message 4 of 10
(1,284 Views)

I executed the host VI and I obtained the error -50400, I attached a screen with the explanation of the error. 

0 Kudos
Message 5 of 10
(1,249 Views)
Solution
Accepted by topic author Loop3r_III

As I already stated your FPGA code is stuck at the FIFO node "To_fpga", as long as you do not send data from the host to this FIFO. It will only put 1 sample inside the FIFO "From_fpga". Therefore your HostVI cannot read 100 samples as you request which results in an error.

 

I strongly recommend to redesign your FPGA-code.

 

Regards, Jens

Kudos are welcome...
0 Kudos
Message 6 of 10
(1,218 Views)

I tried to figure out how to redesign FPGA code but I don't know from where to start. I am working to a thesis and I have to develop a operative code.

0 Kudos
Message 7 of 10
(1,204 Views)

I redesigned the FPGA code and now the boolean indicator has a true value and does not blink. Is this because in the FIFO I stored only one value? 

Download All
0 Kudos
Message 8 of 10
(1,194 Views)

Can you explain what you want to achieve?

Your last code is meaningless since the FPGA will not have an HMI. It just pushed the state of the DI before the first loop starts from one loop to another as fast as possible...

 

Regards, Jens

Kudos are welcome...
0 Kudos
Message 9 of 10
(1,151 Views)

I wanted that the boolean indicator output from read method blinks, and I solved putting DIO0 inside the while loop.

0 Kudos
Message 10 of 10
(1,141 Views)