LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

fpga to generate pulse train and counter

Solved!
Go to solution

Hi,

 

I have some experience with Quartus, but new to the NI FPGA.

 

I have a PCI-7811R. I am trying to use it to sequentially light up 144 LEDs repetitively. The period of each pulse is 480us. 

 

Basically, I need to generate a pulse generator and a counter to record the pulse number, and according to this number, select which LED is on.

 

I designed a pulse train generator based on a example from FPGA help, and added a counter in it. You can see it in the attached vi.

 

My question is,

When I put the I/O node inside the single-cycle timed loops, it can generate the correct pulse.  However, when I tried to use the local variable to transfer data out of the SCTL, and then connect it to another I/O node, I cannot detect the pulse signal when I measured this I/O.

Is there something wrong with my code when I try to transfer data out of the SCTL? Can I also use local variable to transfer the counter value, because I will need it in the following part.

 

Thank you!

 

 

0 Kudos
Message 1 of 2
(2,499 Views)
Solution
Accepted by topic author bluerunner

If you're referring to the local variable wired to DIO2 in your attached VI, the problem is very simple: it's outside a loop, so it only executes once.  Put that local variable and the IO node in a loop and I think you'll get something close to the pulse you expect (although if it's not in a single-cycle loop you may not get exactly the same timing).

Message 2 of 2
(2,492 Views)