From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

VeriStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to create a Veristand System Def File using Matlab?

Hello, I have a VeriStand project that uses a Simulink model.  I have multiple Simulink models for different vehicle architectures.  The dabases for the vehicle architectures are often updated.  When the databases are updated I must update the Veristand System Definition file by Importing Frames, adding User Channels, changing X-NET databaes exc.  What I have attempted to do is use the information from my databases and my Simulink mapping file to create a Veristand System Def.  

 

I started by opening an already made SDF in notepad++.  I wrote a Matlab script that will copy all unchanged info, write to a new xml file, also update all necessary information.  When I tried to load my created file (saved as .nivssdf, and even gives me the Veristand icon on my desktop) I receive the following error:  Is it possible to change the VeriStand SDF by changing the information in notepad++ or Matlab?  Any and all feedback is very much appreciated!

 

Error -307606 occurred at Project Window.lvlib:Project Window.vi >> Project Watchdog.lvlib:Watchdog.vi >> Project Watchdog.lvlib:Execute LoadCreate Action VI.vi

 

Possible reason(s):

 

NI VeriStand:  The file does not contain a valid file format.

=========================

NI VeriStand:  Message: Project Window.lvlib:Project Window.vi >> Project Watchdog.lvlib:Watchdog.vi >> Project Watchdog.lvlib:Execute LoadCreate Action VI.vi >> PW Actions.lvlib:Refresh Dependencies.vi:690002 >> Project Window.lvlib:Get Sysdef Root.vi >> NIVSSDF_Filemanager.lvlib:Load NIVSSDF.vi >> NIVS_DataStorage.lvlib:LoadDataXMLFile.vi

<append>=========================

 

NI VeriStand:  There is an error in XML document (5348, 179).The 'BiFiends' attribute is not declared.

 C:\Users\Public\Documents\National Instruments\NI VeriStand 2014\Projects\Testing\Testing.nivssdf

 

Error -307606 occurred at Project Window.lvlib:Project Window.vi >> Project Window.lvlib:Command Loop.vi >> Project Window.lvlib:Get Sysdef Root.vi >> NIVSSDF_Filemanager.lvlib:Load NIVSSDF.vi >> NIVS_DataStorage.lvlib:LoadDataXMLFile.vi

NI VeriStand:  The file does not contain a valid file format.

=========================

NI VeriStand:  There is an error in XML document (5348, 179).The 'BiFiends' attribute is not declared.

0 Kudos
Message 1 of 3
(3,943 Views)

Hello, your error looks like an XML syntax error. Your generated text must be wrong (maybe missing quotes or so..?)

 

Best regards.

0 Kudos
Message 2 of 3
(3,939 Views)

I would recommend invoking the VeriStand System Definition API from Matlab(TM) directly using Matlab's .NET integration. This will be much more reliable than trying to write the XML file directly. This is the supported API for scripting system definition files. I am not an expert in this area, but I believe Matlab has really good support for calling .NET code.

Jarrod S.
National Instruments
Message 3 of 3
(3,929 Views)