Creating an on input change I/O server is a three-step process. First, you must create a custom I/O server, then you must create the on input change I/O server using the Custom VI-based Server – On Input Change Assistant, and finally you must set the initial values for the inputs of the on input change I/O server.
After you create a new on input change I/O Server, you do not need to create it again. You can just set the initial values for the inputs to reconfigure the I/O server.
Creating a New On Input Change I/O Server
Complete the following steps to create a new on input change I/O server.
- In the Project Explorer window, right-click a target, such as the My Computer target, and select New»I/O Server from the shortcut menu.
- In the Create New I/O Server dialog box, select Custom VI - On Input Change and click the Continue button.
- In the Configure Custom VI - On Input Change I/O Server dialog box, click the New button to display the Custom VI-based Server – On Input Change Wizard.
You also can select Tools»DSC Module»VI Based Server Wizard»On Input Change to display the Custom VI-based Server – On Input Change Wizard.
Configuring the On Input Change I/O Server using the Custom VI-based Server – On Input Change Wizard
The Custom VI-based Server – On Input Change Wizard converts a VI into a custom I/O server that performs calculations for an application and publishes the calculated results as NI-PSP data items to the network. The Custom VI-based Server – On Input Change Wizard contains three pages that you must configure. Complete the following steps to configure the on input change I/O server.
- On the Select VI page of the Custom VI-based Server – On Input Change Wizard, enter the path to the VI that you want to convert into an on input change I/O server in the Path to VI text box. You also can use the Browse button to navigate to the VI.
- (Optional) If you have the LabVIEW VI Analyzer Toolkit installed, place a checkmark in the Run VI Analyzer on VI checkbox. The VI Analyzer Toolkit can help you optimize the VI by running tests on the VI.
- Click the Next button to continue.
- On the Configure Server Distribution Component page, enter a name for the server configuration in the Configuration name text box.
- Use the Browse button in the Support files section to navigate to the support files necessary to run the server.
- Click the Add button to add the support files to the list of Support files.
- Click the Next button.
- On the Server Distribution Component page, the Custom VI-based Server – On Input Change Wizard shows a summary of what the wizard is going to build. Click the Build button. LabVIEW shows a Build Status dialog box.
LabVIEW creates the I/O server dependency files and places the generated files in the National Instruments\Shared\DSC\Custom VI Input Change Server\8.5\filename folder.
Setting the Initial Values of the On Input Change I/O Server
After the Custom VI-based Server – On Input Change Wizard builds the files, the Configure Custom VI – On Input Change I/O Server dialog box appears again. Complete the following steps to use this dialog box to set the initial values for the inputs for the on input change I/O server.
- Click the Next button.
- On the Select Run Condition page, specify when you want the VI to run. The VI can run when any input value changes or when a specific input value changes. If you select the Run VI when specific input changes option, you must also select an input from the Input pull-down list.
- Click the Next button.
- On the Set Initial Values page, you can assign initial values for the inputs on the VI. Select an input from the Input connectors table and enter a value in the text box that appears to the right of the table.
- Click the Finish button.