Contents Previous Next Index
3 Working with Your Block in NI VeriStand or LabVIEW SIT
Using the RLC circuit block that you generated in Example: RLC Circuit Model, this chapter describes how to work with your block in NI VeriStand or the LabVIEW SIT environment.
Preparing Your MapleSim Model to Run in NI VeriStand
Importing a MapleSim Model to the LabVIEW SIT Environment
3.1 Preparing Your MapleSim Model to Run in NI VeriStand
Creating a New Project File
1. Open NI VeriStand.
2. From the File menu, select New Project.
3. In the New Project Name field, enter RLC Circuit.
4. Click OK.
5 In the Create New Project window, select the System Definition tab.
6. Select the Create a new NI VeriStand System Definition file radio button.
7. Click OK. A new project file is created, along with a system definition file.
Adding the MapleSim Model to the System Definition File
1. From Start > All Programs > National Instruments > NI VeriStand 2010, select System Explorer.
2. In the System Explorer window select File, then Open,
3. Navigate to the project you created in the previous section, Preparing Your MapleSim Model to Run in NI VeriStand.
4. Open RLC Circuit.nivssdf.
5. In the left pane, expand Controller, click Simulation Models then click Models.
6. Click the Add a Simulation Model button located above the right pane. The Add Simulation Model window appears.
7. In the General tab, click Browse (
) and open the .dll that you created in Example: RLC Circuit Model.
8. In the Parameters and Signals tab, select Import all Signals.
9. In the Inports and Outports tab, select Segment into scalar channels.
10. Click OK.
11. Save your changes.
Running the Project
1. In the NI VeriStand Getting Started window, click Run Project.
2. In the blank workspace that you opened, from the Screen menu, select Edit Mode.
3. Click the Workspace Controller tab on the left side of the workspace.
4. In the Workspace Controls menu, expand Model.
5. From the Workspace Controls pane, drag the Model Control label into the workspace to add a model control component.
6. From the Item Properties window, select RLC.
7. Click OK.
Adding a Dial to the Workspace
1. Click the Workspace Controller tab.
2. In the Workspace Controls menu, expand Numeric Control.
3. Drag the Dial component into the workspace.
The Item Properties window appears.
4. In the Item Properties window, click Channel (
5. Expand Controller>Simulation Models>Models>RLCParallelCircuit1>Inports.
6. Select Main_RLC_Parallel_Circuit1__RealInput1_t_
8. Click OK.
Adding a Graph to the Workspace
2. In the Workspace Controls menu, expand Graph and drag the Simple label into the workspace.
3. In the Graph Channel Selection window, in the left pane, expand Controller > Simulation Models > Models > RLCParallelCircuit1 > Outports.
4. Select Main_RLC_Parallel_Circuit1__RO1_t_
5. Click the right-pointing arrow (
) to include the outport quantity in the graph.
6. Click OK.
7. From the Screen menu, clear the Edit Mode option.
8. In the workspace, rotate the dial to change the input behavior. The results are shown in the graph.
3.2 Importing a MapleSim Model to the LabVIEW SIT Environment
Creating a LabVIEW SIT Interface
1. Open a new VI file.
2. In the Front Panel, right-click to open the Numeric Controls panel.
3. Select Numeric Controls and then select Dial.
4. Drag the Dial component into the Front Panel
5. Right-click the Front Panel
6. Select Graph Indicators
7. Select Chart.
8. Drag the chart component into the Front Panel
Connecting the MapleSim Model and the LabVIEW SIT User Interface
From the Tools menu, select SIT Connection Manager.
In the SIT Connection Manager window, select Driver VI on Localhost.
In the Current Model DLL section, browse to and select the .dll that you created.
In the left pane of the SIT Connection Manager, select Mappings.
In the Current Mappings table, double-click the first row which corresponds to the dial that you inserted.
Expand rlcparallelcircuit1 > Input_param.
Below Current Mappings, double-click Waveform Chart.
Expand rlcparallelcircuit1 > Output > Main_RLC_Parallel_Circuit1__RO1_t_.
Select Port 1 - Main_RLC_Parallel_Circuit1__RO1_t_.
Click OK. The SIT Connection Manager will now build the model.
Click Run (
) to run the simulation. When the simulation is complete, you can rotate the knob to change the output.
Download Help Document
What kind of issue would you like to report? (Optional)