09-03-2020 04:10 AM
Hello,
I have built an application using FPGA of cRIO of NI. My application includes the FPGA VI, a real-time VI (including other dependencies) and a Host VI. I have also built a TestStand sequence for my application. Every time I run the sequence, I first run the RT VI and then run my sequence in which Host VI communicates with RT VI and run the FPGA application. I want to run the RT VI using TestStand automatically and move to the next step of the sequence.
I have tried using the Running VI asynchronously step of TestStand for another application using Automation Refnum, but this method is not suitable for RT VIs as the target does not support the Automation Refnum and also the RT VI is dependent on other VIs. Can someone please guide me about the procedure to run the RT VI using TestStand and then move on to the next step automatically instead of getting hanged in the RT VI? Any help will be appreciated!
09-03-2020 04:42 AM - edited 09-03-2020 04:43 AM
Hi JohnRick7117,
We have a RIO_Controller VI, that is responsible for FPGA interaction. The RIO_Controller VI is started from a TestStand step by a call to RIO_Initialise VI, that launches RIO_Controller using VI Server (the RunVI Invoke Node). RIO_Finalise VI is provided to close thing out and stop RIO_Controller.
RIO_Controller contains an Event Structure with a dynamically registered event case that we can Generate Events for RIO to FPGA comms and a Queue for FPGA to RIO comms.
Regards
Steve
09-03-2020 04:47 AM
Hi SercoSteve,
Thank you for your reply. I wanted to confirm that when you call the Action step for calling Initialise_RIO, doesn't it get stuck in the actual RIO_Controller VI? As RIO_Controller has event structures and while loops (same as mine).
Regards
John
09-03-2020 04:51 AM - edited 09-03-2020 04:52 AM
Nope, the call to the RunVI Invoke Node (that we are using to launch the RIO_Controller from inside RIO_Initialise) has a parameter called Wait Until Done, we pass FALSE to this parameter. This will launch RIO_Controller and allow RIO_Initialise to complete and the TestStand sequence to continue.
Hope this helps
Steve
09-03-2020 04:57 AM
Ok. I will try this implementation. Thank you for your support. Once it works, I will accept your solution. Thanks mate!
Regards
John
09-03-2020 05:31 AM
Hello SercoSteve,
When I call the RT VI with invoke node, it works fine in LabView call. But when I call this Initialise_RIO VI using TestStand, I always run into error 1004 (VI not in memory), although my RIO VI is in the memory. Have you faced a similar issue?
Regards
John
09-03-2020 05:41 AM
1004 doesn't ring a bell. Are you deploying your LabVIEW to the TestStand system? If so you will need to include RIO_Controller in the build as as it is being called dynamically it might not be getting picked up by the build process.
09-03-2020 05:46 AM
I am trying to start the RIO_Controller VI using TestStand and then move to the next step without getting stucked in looping and event structures inside the RIO_Controller VI.
09-03-2020 06:04 AM
Understood. My suggestions so far have been working towards that. My comment was about attempting to isolate the error you are getting.
09-03-2020 06:08 AM
As you said to include the RIO_Controller VI in the build. Could you please tell me what do you mean by this? Error 1004 says that the VI has been removed from path or deleted (although none of these is true). The Initialise_RIO, RIO_Controller VIs and the TestStand Sequence files are all in the same folder.