06-23-2016 04:30 PM
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
Solved! Go to Solution.
06-24-2016 08:57 AM - last edited on 07-17-2024 06:16 PM by Content Cleaner
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:
https://www.ni.com/docs/en-US/bundle/veristand/page/use-models-simulink.html
I also founds this post. Is this one related to that?
MATLAB® and Simulink® are registered trademarks of The MathWorks, Inc.
06-24-2016 01:37 PM - last edited on 07-17-2024 06:16 PM by Content Cleaner
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)
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.
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.
06-27-2016 04:47 PM - last edited on 07-17-2024 06:19 PM by Content Cleaner
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.
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:
(S-Function listed as unsupported)
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,
06-28-2016 09:01 AM - edited 06-28-2016 09:01 AM
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.
06-28-2016 09:10 AM
Can you upload the DLL? I can verify if I get the same behavior on my end.
Regards,
06-28-2016 09:47 AM - edited 06-28-2016 10:00 AM
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!
06-29-2016 09:08 AM - last edited on 07-17-2024 06:20 PM by Content Cleaner
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.
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.
https://knowledge.ni.com/KnowledgeArticleDetails?id=kA03q000000YGwJCAW&l=en-US
MATLAB® and Simulink® are registered trademarks of The MathWorks, Inc.
Regards,
06-29-2016 09:25 AM - last edited on 07-17-2024 06:21 PM by Content Cleaner
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.
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.
https://knowledge.ni.com/KnowledgeArticleDetails?id=kA03q000000YGwJCAW&l=en-US
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.
06-29-2016 10:28 AM
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..."