LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

RT/FPGA Generation and logging syncronization

I have a cRIO unit that controls a Servohydraulic machine (using a PID controller on the FPGA). The analog output comes from a NI-9269 and I read displacement and load from a NI-9205 connected to signal conditioning boxes (±10 V).

 

Currently I am developing software to send "blocks" of waves. The idea behind the blocks is that each block can have a different frequency and logging rate, so for example, if part of the test has a hold, you don't log at 1 kHz, but at 10 Hz.

 

The system works with a logging frequency range that goes from 10 Hz to 10 kHz.

 

My FPGA/RT would need to do this for each block:

1) Receive a message with the following info (minimum):

a) Output rate

b) Array with displacement data

c) Logging rate (can be equal or different to the output rate)

2) Configure the RT or FPGA logging loops to:

a) Send the displacement data to the PID loop at the predefined output rate

b) Log the displacement and load data at the predefined logging rate

a) and b) have to start and stop at the same time (e.g. I should not have delays between logging and generation and I should not have any data missing or extra zeroes at the end)

 

I have lots of ideas on how to do this, but I am writing this to ask for tips on getting the generation and logging running and stopping at the same time with the smallest delay between blocks (a delay of <100uS between blocks would be ideal), even if the logging and generation rate are different

 

My FPGA loop for logging:

FPGA logging loop.png

 

Well, I'll be waiting for your comments!

 

Thanks!

--
Smarter than the average bear!
0 Kudos
Message 1 of 1
(2,581 Views)