Getting Started with Running the SDK Source Code on a Device

NI InsightCM™ SDK 3.3 Help

Edition Date: December 2018

Part Number: 375191F-01

»View Product Info
Download Help (Windows Only)

Parent Topic: Overview: Developing Software for Devices in an NI InsightCM System

Before you begin extending the NI InsightCM SDK source code, ensure that the device can run the code, connect to NI InsightCM Server, and receive authorization from the server. Verifying that the device can run the source code without any modifications reduces the potential sources of issues when you start to modify the code. Complete the following steps to reach this milestone:

Make Physical Connections between the Device, Power, and the Network

  1. Connect the controller to an Ethernet network using Ethernet port 1 on the controller front panel. Use a standard Category 5 (CAT-5) or better Ethernet cable to connect the controller to an Ethernet hub.
  2. (Optional) Wire sensors to C Series modules installed in the device chassis.
  3. Connect the chassis grounding terminal to the grounding electrode system of your facility.
  4. Connect the positive lead of the power source to either V terminal on the power connector plug, and the negative lead to the C terminal.
    Caution  The C terminals are internally connected to each other.


    When you apply power to the controller, it starts up.

Reformat the Device Hard Drive

  1. Launch NI MAX.
  2. Reboot your target into user-directed safe mode. Refer to your device documentation for more information on rebooting into safe mode.
  3. Under the Remote Systems node in the tree at the left side of the window, right-click your target and select Format Disk.
  4. If your target supports more than one file system, select the file system you want to use. Reliance is the preferred file system for real-time targets, if available for selection, because it prevents data loss due to file system corruption. (RT Linux) UBIFS is the only file system available on RT Linux targets.
  5. Confirm that you want to format your target.
    Caution  Formatting your target drive will destroy all data on the LabVIEW Real-Time partition of the drive.


    Your target will reboot when formatting is complete.

Adding the Device to the InsightCM Web Application

  1. To access the InsightCM web application, open a web browser and navigate to the URL appropriate for the computer you are using:
    • On the server machine, http://localhost:82.
    • On any other computer or device on the same network as the server machine, http://serverIpAddress:82 or http://serverDNSHostname:82.
      Note  If a server administrator has configured the InsightCM web application to require SSL, enter https:// and remove the colon and port number from the end of the URL, such as https://serverDNSHostname.
  2. Add the device to the InsightCM web application as an online device. For step-by-step instructions, refer to the Adding a New Device Configuration topic in the NI InsightCM Server Configuration and Monitoring Help. When you complete the step to test the connection between the server and device in the Test Connection dialog box, step 2 is expected to fail. Continue adding the device according to the instructions.
  3. Browse to the Devices page»Software tab in the InsightCM web application.
  4. Select the device, and then click the Update Application button to download application software that is appropriate for the device type you configured for the device.
  5. Watch the Deployment Status column on the Software tab, refreshing if necessary until it displays Succeeded.
  6. Select the device again, and then click the Action menu and select Connection»Reset Connection to reset the credentials that the server expects the device to possess and the credentials on the device so they match.

The device now has all the software and configuration files it needs to run the NI InsightCM source code and connect to NI InsightCM Server.

Disable the RT Startup App

  1. Launch NI MAX.
  2. Under the Remote Systems node in the tree at the left side of the window, select your device.
  3. On the System Settings tab, find the Startup Settings section, and then remove the checkmark from the Disable RT Startup App checkbox.
  4. Right-click your device and select Restart.

Create a Copy of the NI InsightCM Reference Source Code

Complete the following steps to create and deploy the NI-developed CompactRIO source code to the device.

  1. Navigate to <InstallDrive>:\Program Files (x86)\National Instruments\LabVIEW\InsightCM\Devices.
  2. Find and open the RT application that is most similar to your device.
  3. Click File»Save As»Duplicate .lvproj file and contents.
    Note  To avoid changing the template library VIs, make copies of the VIs within Main.vi and edit only the copies.
  4. Navigate to <InstallDrive>:\Program Files (x86)\National Instruments\LabVIEW\vi.lib\addons\InsightCM\Devices\Shared\Cms\Fpga.
  5. Find and open the FPGA application that corresponds to your objective and module arrangement.
    Note  The two single digit numbers in the project filename represent the number of dynamic and static modules respectively. For example, CMS_9065_4_0.lvproj has four dynamic modules and no static modules.
  6. Click File»Save As»Duplicate .lvproj file and contents.
  7. Copy the FPGA target information from your copy of the FPGA application and paste it into your copy of the RT application.
  8. Configure the RT application to suit your project needs.
  9. In the Project Explorer window, right-click the RT CompactRIO Target node and select Properties.
  10. On the General page, enter the IP address of the device in the appropriate text box.
  11. Click OK.
  12. Right-click the RT CompactRIO Target node again and select Connect.
  13. Open Main.vi in the project tree.
  14. Click the Run button. LabVIEW deploys the source code to the device and the application starts running.

Where to Go Next

After your device is successfully connected and authorized, you can begin extending the source code while knowing that the device is able to perform the same functionality as NI-supported devices that run the SDK source code. For general information about how to extend the source code, refer to Getting Started with Implementing New Features in Device Software.

WAS THIS ARTICLE HELPFUL?

Not Helpful