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: 

Target is disconnected, but my target is the host computer I'm on

Solved!
Go to solution

I just started using NI Veristand today, and I was trying to interface a compiled Simulink model to a LABview signal producing VI. I made both files compatible with NI Veristand. 

 

I followed the tutorials online and got to the point where I can run my project. However, whenever I started running my project. It fails due because NI Veristand can't handshake with the target. I looked at my target and saw it was disconnected, but my target is my host computer. 

 

Does anyone know why this might be and how to fix it? 

 

I'm using LABview 2015 with NI Veristand 2015.

 

Thanks

0 Kudos
Message 1 of 22
(8,026 Views)

Hello, 

 

Few things:

 

- The Target will show up as disconnected in the Manage Targets window, even if it is the 'localhost', unless the project is deployed and running.

 

- Are you able to deploy an "empty" project? You can create and deploy a new VeriStand project with no models or anything but  just one or two WorkSpace objects reading System Channels like the Actual Loop Rate or the HP Loop Duration just to make sure VeriStand is working fine.

 

- Are you able to deploy if you remove the model and leave only the LabVIEW VI? What about the opposite? 

 

- What does the model do?

 

- Is the model a dll, mdl or other format?

 

- Can you upload the actual VeriStand, LabVIEW and The MathWorks, Inc. Simulink® files?

 

- Thake a look at this:

http://www.ni.com/tutorial/13066/en/

 

I also founds this post. Is this one related to that?

 

MATLAB® and Simulink® are registered trademarks of The MathWorks, Inc.

Camilo V.
National Instruments
0 Kudos
Message 2 of 22
(8,009 Views)

Yes they are related. I decided to try the MIT method. 

 

VeriStand works with an empty project, but when I just have the VI, the running project window stops at the "Starting deployment group 1" text. (in the running_project_stall image)

running_project_stall.PNG

 

Also, I tried creating the niVeriStand_rtw from my .mdl, but I get the error as shown in the "build_error" picture. I built and imported the model sucessfull with no problems the first time around in MATLAB, but the second time I rebuilt the niVeriStand_rtw, it gave me this error. 

build_error.PNG

I have the right compiler and followed the online tutorial when building the .mdl file. I also was following these demos when making the project.

 

I've uploaded the MATLAB, LABView file, and Veristand project files.

 

Thanks for the help. 

 

Download All
0 Kudos
Message 3 of 22
(7,988 Views)

Hello,

 

Couple things.

 

I noticed one of the links from the other post was broken so here it is. It may also apply for this issue.

 

http://zone.ni.com/reference/en-XX/help/374160B-01/vsmithelp/mit_models_mdl/

 

When you say:


 I have the right compiler and followed the online tutorial when building the .mdl file.


Do you mean .dll? Notice that the imported file is .dll file and not the .mdl. Also, pay special attention to the Fixed Step Type in the Solver Options from The MathWorks, Inc. Simulink®. Have you tried making a pretty simple model like the one used in the tutorial (the Out1 = 'Sine Wave' + In1 thing)? I would like to know if that one also fails to deploy.

 

That is about the MIT/VeriStand procedure.

 

About the Control Design and SImulation approach, I was giving a look to the log file included in the attachment and I noticed that the "missing" nodes seem to be components or instruments instead of "functions". For example, among the missing nodes you will find a Controlled Voltage Source and several Series RLC Branch, IGBT/Diode and S-Function blocks. I haven't been able to find documentation about the others, but the S-Function is definitely unsupported as mentioned in one of the other links I included in the other post. Please refer to the following:

 

http://zone.ni.com/reference/en-XX/help/371894H-01/lvsimconcepts/sim_partial_support/

 

(S-Function listed as unsupported)

http://zone.ni.com/reference/en-XX/help/371894H-01/lvsimconcepts/sim_c_ublocks/

 

Testing a simple model here would be a good idea for the same reason; figuring out if it is just that the components being used are unsupported.

 

Overall, basic functions should work, but if you are using components and "instruments" (like the Voltage Source), issues can arise. The other option would be to just take the partially converted model and replace the placeholder VIs (generated when something cannot be converted) and replace them with VIs that do the same functionality in LabVIEW as outlined in the last two links.

 

 

In any case, please test a basic model like the one from the tutorial with both approaches and if that one fails, we know there is something wrong with the NI Software but if it works, probably there is something wrong in the model configuration or just some incompatibility.

 

Wish I could do more. At least I hope the information helps finding the root cause.

 

Regards,

Camilo V.
National Instruments
0 Kudos
Message 4 of 22
(7,951 Views)

 Also, pay special attention to the Fixed Step Type in the Solver Options from The MathWorks, Inc. Simulink®. Have you tried making a pretty simple model like the one used in the tutorial (the Out1 = 'Sine Wave' + In1 thing)? I would like to know if that one also fails to deploy.

 

That is about the MIT/VeriStand procedure.

 

 


 I tried the simple Out1 = 'Sine Wave' + In1 thing)  model, and that also failed to deploy with the same error I've been recieving.

 

 

 

0 Kudos
Message 5 of 22
(7,939 Views)

Can you upload the DLL? I can verify if I get the same behavior on my end.

 

Regards,

Camilo V.
National Instruments
0 Kudos
Message 6 of 22
(7,934 Views)

I uploaded the .mdl files (including the simple example model) since I'm having trouble getting to the dll? 

 

I also un-installed and re-installed NI Veristand and MIT in case anything was corrupted, but I still got the error after re-installing. 

 

Thanks!

0 Kudos
Message 7 of 22
(7,931 Views)

Hello,

 

I was able to import the sine_wave_model.mdl with the Simulation Model Converted with no issues. VeriStand definitely needs a dll. You should be able to do the same and test this tutorial if you want to try the model in VeriStand. The Chopper.mdl still can't be imported, again, because it contains at least one unsupported block.

 

If you cannot create the dll from The MathWorks, Inc. Simulink®, maybe that´s where we should focus on. Also, do you mean you cannot even create the dll for the simple model from the tutorial or only for your own project?

 

I gave another look to the build_error.PNG you uploaded. Its quality makes it hard to read, but I was able to understand something about referring to an error messaged generated in the MATLAB® Command Window. Can you tell us something about that error message? Can you upload the picture with a better quality, showing the whole Summary column?

 

I already have the versions of LabVIEW and VeriStand, but can you provide details the compiler you are using, as well as the versions of the compiler and The MathWorks, Inc. software? Please make sure you are within the versions listed for NI VeriStand/LabVIEW 2015 in the article below.

 

http://digital.ni.com/public.nsf/allkb/10BBA745CD5A2FAE86257F9A0054FF71

 

What about the System target file? Can you tell us which one are you selecting?

 

Finally, uninstall/reinstall does not remove all corruption issues (if that is the problem) unless the software folders are manually removed after uninstalling and the registry keys are cleaned up before reinstalling. If this is a corruption problem, maybe you can try the procedure below. The forced reinstall basically will make VeriStand ignore any previous installation and overwrite everything.

 

http://digital.ni.com/public.nsf/allkb/ADD22E807D5A12AD862579EC00760F79

 

MATLAB® and Simulink® are registered trademarks of The MathWorks, Inc.

 

Regards,

 

Camilo V.
National Instruments
0 Kudos
Message 8 of 22
(7,904 Views)

Also, do you mean you cannot even create the dll for the simple model from the tutorial or only for your own project?

 

I gave another look to the build_error.PNG you uploaded. Its quality makes it hard to read, but I was able to understand something about referring to an error messaged generated in the MATLAB® Command Window. Can you tell us something about that error message? Can you upload the picture with a better quality, showing the whole Summary column?

 

I already have the versions of LabVIEW and VeriStand, but can you provide details the compiler you are using, as well as the versions of the compiler and The MathWorks, Inc. software? Please make sure you are within the versions listed for NI VeriStand/LabVIEW 2015 in the article below.

 

http://digital.ni.com/public.nsf/allkb/10BBA745CD5A2FAE86257F9A0054FF71

 

What about the System target file? Can you tell us which one are you selecting?

 

Finally, uninstall/reinstall does not remove all corruption issues (if that is the problem) unless the software folders are manually removed after uninstalling and the registry keys are cleaned up before reinstalling. If this is a corruption problem, maybe you can try the procedure below. The forced reinstall basically will make VeriStand ignore any previous installation and overwrite everything.

 

http://digital.ni.com/public.nsf/allkb/ADD22E807D5A12AD862579EC00760F79

 

MATLAB® and Simulink® are registered trademarks of The MathWorks, Inc.

 

Regards,

 


.

I can't create the .dll for the simple project model or any other Simulink models. I have uploaded the error messages MATLAB gives me in the folder below. 

 

I'm using R2011b MATLAB and Microsoft Software Development Kit (SDK) 7.1  C compiler.

 

The system target file I'm selecting is NIVeriStand.tlc

 

Also, can NI VeriStand handle Simulink SimPowerSystems blocks after the .mdl is converted into a .dll? 

Thank you very much for your help and patience. 

 

 

0 Kudos
Message 9 of 22
(7,901 Views)

I found the solution. For some reason, MATLAB thought I had Visual Studios 2010 which conflicts with the SDK compiler I was using, so I installed Visual Studios 2010, and then went to the following article and installed the service pack: VS 2010 SP1 they mentioned

 

Then in MATLAB, I ran mex -setup and switched my compiler to the Microsoft Visual C++ 2010 Express.

 

This fixed the issue with the dll in MATLAB.

 

I'm still having the Veristand project get stuck at "Starting deployment group 1..."

0 Kudos
Message 10 of 22
(7,887 Views)