05-09-2015 05:11 AM
Hi, I am developing a real time application using a cRIo, I am trying to do sequential control.
I need a loop to run for a certain time (10 sec), and then move to the next sequence, and so on.
The problem is I cannot find a function in the FPGA module, that is similar to elapsed time express VI.
05-09-2015 09:37 AM
05-09-2015 09:57 AM
05-11-2015 07:48 AM
Sounds like a simple state machine inside of your FPGA. You could also just use commands of some type to tell the FPGA to do something different. You should be able to easily combine your FPGA VIs into a single bit file.
05-11-2015 07:52 AM
Thanks alot, but how do I use a timer in a state machine for a sequential task inside FPGA?,I need it to perform a certain task for 10 seconds and then move to the next task and so on. without the the need for elapsed time express VI?
Do you have example code please?
05-11-2015 08:26 AM
You can use the Loop Timer function to get how much time has elapsed.
05-11-2015 08:43 AM
I need to time the loop,to do a certain task for a pre-defined time. take an input measurement for 10 seconds, take the average, then change output to change speed of the motor for another 10 seconds take the input and so on.
05-11-2015 09:08 AM
@Mohamedbakr80 wrote:
I need to time the loop,to do a certain task for a pre-defined time. take an input measurement for 10 seconds, take the average, then change output to change speed of the motor for another 10 seconds take the input and so on.
Honestly, that sounds like something that should be taken care of in the RT. The FPGA should be used for sampling the data and sending it through a DMA to the RT. The RT can then tell the FPGA the motor speed. The FPGA should also be keeping the motor running at the desired speed.