08-12-2013 08:01 AM
Hi all!
I´m facing big issue here. I have program on PCIe-7852R FPGA that starts the laser on call. When the program ends, the FPGA should switch laser off by sending "Flase" on one port of digital line. And the curious thing is, that it does it while I pres arrow button on target vi and also start host app, but if I call just only host app (that contains Open FPGA VI reference and invoke method - Run), the program does not change the final state of digital line to flase.
After FPGA finishes, host calls invoke metod - abort and close reference.
What can I do to force target app alwas switch off the digital line?
Thank you, Jan
08-13-2013 04:10 AM
Hello Aiken,
First of all, let me welcome you to the NI forums!
This problem could be the result of aborting the FPGA code before it writes the value. (The invoke method - abort close reference is like pressing the abort button, so stops all execution midway.)
There is a possibiliy that the FPGA could not get to the final stage, where it writes the digital line.
For such an application, where the writing of this digital line is critial, I recommend you to use interrupt protokoll (or some handshaking) between the host and the FPGA to make sure you are not aborting the FPGA code too soon.
For this you can for example add simple handshake:
On the final stage of your host application implement a logic, which reads an indicator from your FPGA (an indicator which should represent the value of that critial digital line) in a while loop. Only exit this while loop if the read value is false (so the overwrite is complete.) and only after this loop finished should you abort and close the reference. This way, you can make sure that you are not aborting the task early.
There is one more option to use (called interrupts):
And on the FPGA:
I hope you will find one of these solutions useful, and get successful with your application. Please reply if you found this information useful, or need further help regarding the matter.
Best regards,
Peter