Creating or Migrating a Linux_64 64-Bit VeriStand 2021 Custom Device LabVIEW Project

Updated Mar 4, 2024

Environment

Software

  • VeriStand
  • VeriStand Custom Devices
  • LabVIEW

This document will show you how to create a LabVIEW 2021 64-bit project from the VeriStand Custom Device Project Wizard or migrate an existing custom device project, to match the migration of VeriStand 2021 to a 64-bit application, and target a Linux 64-bit Real-Time target for use with a Linux 64-bit CompactRIO, sbRIO or PXI controller.

Note that VeriStand Custom Devices created to target a NI LinuxRT PXI will also work on a 64-bit Linux CompactRIO target. To compile a Custom Device for a Linux64 target in LabVIEW 2021, we need to change one of the generated targets to a LinuxRT PXI target. To do so, follow the below steps:

If creating a new Custom Device:
  1. Install a release of the VeriStand Custom Device Wizard for LabVIEW 2021
  2. Generate the Custom Device project template in LabVIEW 2021 64-Bit
If migrating an existing Custom Device:
  1. Download or otherwise acquire the source of your custom device
  2. Make a backup of the source files if required
  3. Save and close the project
  4. Open the .lvproj in a text editor, such as Notepad++
  5. On the generated RT CompactRIO Target - Linux x64 target, replace the attributes with the correct attributes for a LinuxRT PXI chassis. To do so, replace the following lines in the XML:
<Item Name="RT CompactRIO Target - Linux x64" Type="RT CompactRIO">
        <Property Name="alias.name" Type="Str">RT CompactRIO Target - Linux x64</Property>
        <Property Name="alias.value" Type="Str">0.0.0.0</Property>
        <Property Name="CCSymbols" Type="Str">TARGET_TYPE,RT;OS,Linux;CPU,x64;DeviceCode,7735;</Property>
        <Property Name="crio.ControllerPID" Type="Str">7735</Property>
        <Property Name="host.ResponsivenessCheckEnabled" Type="Bool">true</Property>
        <Property Name="host.ResponsivenessCheckPingDelay" Type="UInt">5000</Property>
        <Property Name="host.ResponsivenessCheckPingTimeout" Type="UInt">1000</Property>
        <Property Name="host.TargetCPUID" Type="UInt">9</Property>
        <Property Name="host.TargetOSID" Type="UInt">19</Property>
        <Property Name="host.TargetUIEnabled" Type="Bool">false</Property>
        <Property Name="target.cleanupVisa" Type="Bool">false</Property>

             with the following lines:
<Item Name="RT PXI Target - Linux x64" Type="RT PXI Chassis">
        <Property Name="alias.name" Type="Str">RT PXI Target</Property>
        <Property Name="alias.value" Type="Str">0.0.0.0</Property>
        <Property Name="CCSymbols" Type="Str">TARGET_TYPE,RT;OS,Linux;CPU,x64;</Property>             
        <Property Name="host.ResponsivenessCheckEnabled" Type="Bool">true</Property>
        <Property Name="host.ResponsivenessCheckPingDelay" Type="UInt">5000</Property>
        <Property Name="host.ResponsivenessCheckPingTimeout" Type="UInt">1000</Property>
        <Property Name="host.TargetCPUID" Type="UInt">9</Property>
        <Property Name="host.TargetOSID" Type="UInt">19</Property>                           
        <Property Name="target.cleanupVisa" Type="Bool">false</Property>
  1. Save the .lvproj file in your text editor.
  2. Re-open the LabVIEW project. The CompactRIO Linux64 target will now be a supported PXI Linux64 target and will contain the correct build specifications for a Linux64 target.
  3. Remove any unsupported or undesired targets from the LabVIEW project and the Custom Device XML.
    1. This is done by deleting the <Source> sections that have a SupportedTarget attribute of Pharlap, VxWorks or Linux_32_ARM from the <CustomDevice>\<CustomDeviceVI>\SourceDistribution section within the XML.
  4. Under the new Linux64 target, expand "Build Specifications" -> "Engine Release" and ensure that the "Source Files" section has "RT Driver VI.vi" as Always Included.
  5. Develop your Custom Device code as usual.
  6. Build the Engine build specification under the Linux PXI target, and this will successfully run on both a LinuxRT PXI and a LinuxRT 64-bit CompactRIO target.