I’m trying to log 5 tachometer signals using NI 9401 and the cRIO-9004. All the signals have different frequencies ranging from 3hz to 600Hz. The initial solution I thought of is given below but it is very complex.
I fear im wasting too much space as each target scoped FIFO has a length of a 1000 odd elements.
Can you think of any other method to approach the problem?
Please skip the rest of the post if you can think of a more elegant solution to the problem.
As the frequencies of all these signals are varying, I am using target scoped FIFOs on the FPGA to buffer the data. Since I have 5 different signals, I have 5 parallel while loops for acquisition, each waiting on a rising edge trigger to count.
Outside these loops I have a big while loop which also reads from these target scoped FIFOs and writes into a DMA FIFO. All these target scoped FIFOs write to the same DMA FIFO.
After each target scoped FIFO writes to the DMA, an interrupt is generated.
On the RT side, I am just waiting for the respective interrupt nos and reading from the DMA FIFO and logging to a tdms.
I am not very sure if i have explained myself clearly, and I will post the code if further clarification is needed. However, for now I do not want to clutter up this already lengthy first post.