LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

FPGA parallel While loops

Solved!
Go to solution

Hello,

 

I´m using a NI 9870 module in my Crio system, and the program was working correctly.


The problem I have is because I also need to use a Profinet PN module, and when i try to use both of the programs included in my FPGA, my 9870 module doesnt work as it´s supposed (it´s writting points....instead of the characters).

 

Can anybody help me with this? is it supposed that the different While loops are working independent and without any problem, is this right?
or should I implement the program in a different way?

I would appreciate any idea or input,

 

Thanks so much for your help!!

0 Kudos
Message 1 of 4
(3,707 Views)

Hi,

 

In fact, While parallel loops are working independent and without any problem normally.

 

I don't understand all parts of your code but I think :

- make sure taht cycle time of the while loops must be diferent of 0 to avoid the while loop takes all the CPU.

It can causes anormal behaviour.

 

- your Memory use is dangerous because of in diferent loops, you can write values at the same time in your memory.

So be careful at your memory adresses where you write in your while loops.

If your diferent loops write at the same memory adress you can have strange values.

 

Best Regards.

 

R. Kaszubiak

0 Kudos
Message 2 of 4
(3,503 Views)

The thing that I'm curious about is if you are using the same memory addresses for the two different functions.  I can't tell since the front panel isn't shown.  So my guess is that your data is being overwritten by the new loop.

 

EDIT:  Nevermind.  I see now that they are different memory sections.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 3 of 4
(3,485 Views)
Solution
Accepted by topic author juanfer23

Thanks everybody for the answers.
I´ve already solved the problem, and it was in the size of the Read FIFO.

I am using only one FIFO for reading, and for this, i include a number after the data, depending which port i´m using. When the size of the data in the FIFO is not exactly the same as in the FPGA program, this function is working not correctly, and returns false data.

After changing this, the program was working correctly.
thanks anyway again for your time!!!

0 Kudos
Message 4 of 4
(3,445 Views)