Running a VI targeted to a real-time controller in SystemDesigner deploys the code to the physical real-time controller and begins interactive execution of that code. You can interact with the running VI to test your design and make sure it executes as expected.
To complete this task, you need to establish a network connection to a real-time controller and place the controller on the Design diagram of SystemDesigner.
Navigate to the Design diagram of SystemDesigner.
tab, drag the application you want to run on the physical real-time controller to the
section of the controller on the diagram. If you don't have an existing application, create a new application and add a VI to it:
On the controller in SystemDesigner, click
to create a new Application document.
Double-click the Application document, and add either an existing VI that you want to run on the real-time controller or a new VI using the
If you create a new VI, double-click the new VI and create whatever code you want to run on the real-time controller.
Save the VI and the Application document.
On the Design diagram of System Designer, double-click the Application document you added to the controller on the diagram, and open the VI you want to run on the controller.
Opening the VI from the controller ensures you open a copy of the VI targeted to run on the controller. When you open a VI from the
tab, the target of that VI can vary depending on whether it is targeted to multiple devices in SystemDesigner. You can use the target selector, shown in the following image, to verify the target or to switch between instances of the VI on different targets.
Run the VI.
When you click the
button, the VI and its subVIs deploy to the memory of the real-time controller and begin executing. You can modify inputs and view output data to make sure your design executes and generates data as expected.
Because the code deploys to the memory of the controller, it does not persist if the controller reboots. You have to re-run the VI if you reboot the controller.
When you have a final application design, you can build the application and deploy it to the real-time controller as a startup application.