ni / niveristand-scan-engine-ethercat-custom-device

Provides NI Scan Engine, EtherCAT and Remote IO support for NI VeriStand
MIT License
16 stars 22 forks source link

Changing the bitfile of the local chassis does not remove old dependent file #201

Closed Karl-G1 closed 2 years ago

Karl-G1 commented 2 years ago

Describe the bug While testing hybrid FPGA / Scan Mode deployments, I changed bitfiles using the User Variables page's "Select/Change FPGA Bitfile" button. This works until you delete the original bitfile it was using, as the previously selected bitfiles are not removed as dependent files from the System Definition file. If this happens, you will see a "file not found" error on deployment.

This can be worked around by clicking the "Clear Configuration" button first on that page or by manually removing those lines in the XML.

<Property Name="user.CD.Bitfile Path - Host">
   <String>C:\Users\nitest\Desktop\VSEco-crio9045fpga.lvbitx</String>
</Property>
<Property Name="user.CD.FPGA Target">
   <BinaryString>Y1JJTy05MDQ1</BinaryString>
</Property>
<Property Name="user.CD.FPGA Sig">
   <BinaryString>NzU5REY4MzZENDg4RDNBQkQ5OTFERTVCMUFGRjBDNjU=</BinaryString>
</Property>
<Property Name="user.CD.Bitfile Path - Target">
   <String>/c/ni-rt/NIVeriStand/Custom Devices/Scan Engine/Bitfiles/VSEco-crio9045fpga.lvbitx</String>
</Property>
<Property Name="Dependency_1">
   <DependentFile Type="Absolute" Path="C:\Users\nitest\Desktop\crio9045udvXNET.lvbitx">
      <Version />
      <ForceDownload>false</ForceDownload>
      <RTDestination>/c/ni-rt/NIVeriStand/Custom Devices/Scan Engine/Bitfiles/crio9045udvXNET.lvbitx</RTDestination>
      <SupportedTarget>All</SupportedTarget>
      <MD5>6679fd86dcd1af0639cb5458d545645c</MD5>
   </DependentFile>
</Property>
<Property Name="Dependency_2">
   <DependentFile Type="Absolute" Path="C:\Users\nitest\Desktop\VSEco-crio9045fpga.lvbitx">
      <Version />
      <ForceDownload>false</ForceDownload>
      <RTDestination>/c/ni-rt/NIVeriStand/Custom Devices/Scan Engine/Bitfiles/VSEco-crio9045fpga.lvbitx</RTDestination>
      <SupportedTarget>All</SupportedTarget>
      <MD5>145db1f470aa2fa22f7da6d29ac44ce2</MD5>
   </DependentFile>
</Property>

To Reproduce

  1. Add an instance of the custom device in System Explorer
  2. Add a bitfile on the User Variables page
  3. Change bitfiles
  4. Inspect the XML file

Expected behavior When bitfiles are changed, only the latest should be in the system definition file.