09-11-2008 03:09 PM
Hello All,
I have a VI that outputs a certain pattern of 0's and 1's on the DIO of the 7833R. The timing of the 0's and 1's are important. I have used a Loop Timer to control the loop rate that output my 0's and 1's. Except the Loop Timer doesn't seem to be doing anything, I think I have put the Loop Timer in the wrong place or something. How should I do this so the loop executes at exactly every X mirco second? Also, is the VI too big so it takes too long to run?http://i38.tinypic.com/ajq8if.jpg
09-11-2008 04:11 PM
09-12-2008 12:42 PM
Your diagram looks right. You do have to make sure that the Crank Freq control contains your desired loop timing value before the FPGA VI starts running. If you start the FPGA VI and then set the value of Crank Freq (i.e. change it from 0 to something else) then the inner For loop will run as fast as possible since it is using 0 as the input to the Loop Timer.
Try chaning the Default value of Crank Freq (Right click >> Data Operations >> Make Current Value Default) to something that makes sense, recompile the VI, and run it.
Another option is to edit the host VI: set the Open FPGA VI Reference node to 'Open' only (right click on the node to see this option), change the value of Crank Freq from the host using the Read/Write node, and then call the Run method on the Invoke node in the host to start running the FPGA VI.
Another alternative is to move Crank Freq on the FPGA VI diagram inside the While loop or even inside the For loop so that changes in its value will be applied to the Loop Timer. Remember the wires contain a value and not a reference to the front panel control.
09-12-2008 01:06 PM
Thank you.
I have put the Crank Freq into the while loop, and initialized it with 1. It works now.