NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Start a Real Time VI and move to the next step

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!

0 Kudos
Message 1 of 18
(1,525 Views)

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 

0 Kudos
Message 2 of 18
(1,516 Views)

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

0 Kudos
Message 3 of 18
(1,509 Views)

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

Message 4 of 18
(1,502 Views)

Ok. I will try this implementation. Thank you for your support. Once it works, I will accept your solution. Thanks mate!

 

Regards

John

0 Kudos
Message 5 of 18
(1,497 Views)

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

0 Kudos
Message 6 of 18
(1,482 Views)

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.

0 Kudos
Message 7 of 18
(1,476 Views)

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.

0 Kudos
Message 8 of 18
(1,471 Views)

Understood. My suggestions so far have been working towards that.  My comment was about attempting to isolate the error you are getting.  

0 Kudos
Message 9 of 18
(1,456 Views)

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. 

0 Kudos
Message 10 of 18
(1,453 Views)