Error -1 or Error -307703 When Adding vsmodel to VeriStand

Updated Jul 31, 2023

Reported In

Software

  • VeriStand

Issue Details

I am using VeriStand 2021 or later with the VeriStand Model Generation Support add-on.
I have successfully compiled or built my model but when I try to add either the resulting .vsmodel or .dll to my VeriStand project, I get either:

Adding the .vsmodel:
Error -1 occurred at SE Dialogs.lvlib:Add Simulation Model.vi >> SE Dialogs.lvlib:Check model.vi >> SIT Model API.lvlib:Get Model info.vi

This Error code is undefined. Undefined errors might occur for a number of reasons. for example, no one has provided a description for the code, or you might have wired a number that is not an error code to the error code input. 

Additionally, undefined error codes might occur because the error relates to a third-party object, such as the operating system or ActiveX. for these third-party errors, you might be able to obtain a description of the error by searching the web for the error code (-1) or for its hexadecimal representation 
(0xFFFFFFFF).

rtaImage (2).jpg

Or adding the .dll:

Error -307703 occurred at SE Dialogs.lvlib:Add Simulation Model.vi >> SE Dialogs.lvlib:Check model.vi >> SIT Model API.lvlib:Load Model DLL.vi

Possible reason(s):

NI VeriStand: The specified model is incompatible with NI VeriStand. If you are trying to deploy the model to an RT target, launch the console viewer tool to display the console output of the target, which includes information about the source of the error.

rtaImage (1).jpg

Solution

When using the MATLAB add-on, you should add the resulting .vsmodel to your VeriStand Project, not the .dll.
Additionally, how .vsmodels should be included is different to how we add other models.

To add a .vsmodel to your Project, follow the steps below or see Adding and Configuring a Model.
  1. Go to the Mapping diagram by opening your VeriStand Project and selecting the NI VeriStand System Definition file (.nivssdf) tab, but do not click configure/do not open the system explorer
  2. On the left-hand side palette select Software >> Simulation Model
  3. Place the block and browse for your .vsmodel
How to add model.png