Licensing error using measurement studio classes to create plugins!

Hello. I’m trying to use NI’s network variable to send some results to labview program. Inside the result listener, I added code like this:

       //initialize the network variables
        _stringWriter = new NetworkVariableBufferedWriter<string>(StringNetworkVariableLocation);
        _stringWriter.Connect();

It showed errors in session log like this:

16:26:01.407 Summary -------- Test plan completed successfully in 3.67 s --------
16:26:01.419 PyPowerAnalyzer Device PSU closed
16:26:01.419 PyPowerAnalyzer Resource “PyPowerAnalyzer” closed. [591 us]
16:26:09.619 Settings Error during creating instance of ‘results_listener_PSP.resultlistener_PSP’.
16:26:15.174 Serializer Unable to create instance of results_listener_PSP.resultlistener_PSP.
16:26:15.174 Serializer Could not create an instance of ‘resultlistener_PSP’: NationalInstruments.NetworkVariable.NetworkVariableLicenser is unlicensed.

I found out myself. I thought it was something license management conflicts. It turned out to be a setting mistakes.
Because this project was started using tap sdk new project, then I added measurement studio classes. licenses.licx was generated automatically but build action was not set correctly. It was set None before. When I changed it to Embedded resource, it worked perfectly.
image

4 Likes

Hi @hongbo.huo was just interested to learn a bit more about your project. Connecting to an NI power analyzer? We’re very interested to see people engage OpenTAP with a wider array of instruments.

And thanks again for documenting on the Forum! Even if you solve your own question :wink:, it’s very helpful for the next person.

Again, welcome to the OpenTAP community!

1 Like

Hello @jeff.dralla . I’m working in an automotive electronics company. We do use power analyzer for USB adapter to test the charging curve. And we also have projects for LED controllers and some oil motor controllers.
Test program was in Labview and I’m evaluating OpenTap now. We don’t have a good labview drawing style. It is a headache to read other’s labview program especially when it is very big.
Actually, I want to use openTap for environment tesing. Lab technicians want a very friendly user interface so they can see enough information. I’m very sure they don’t want read session logs so I need to try the customize UI first. We used a lot of NI instruments like DAQ, CAN,LIN tools. Then I want to check Measurement studio which works easily with NI’s equipments. I think It will be awesome if OpenTap can connect to Labview directly.
Our tester runs slower in 1 or 2 years in a windows environment and I want to see if it can be better in Linux. I didn’t try this yet.
OpenTap has a package manager. It is seperated to resourse and teststeps. It has a rest API and there is a possibility we can monitor all testers on Web. The concepts are good. We need to evaluate if the team can work with this when we have only a little c# knowledge.

3 Likes

Hi @hongbo.huo great to hear more about your story and use-case. Certainly the OpenTAP community will love to help you out.

Keysight does make a std UI, PathWave Test Automation for commercial usage (free version for community edition if you meet the criteria), but you are free (and for $0) to create any operator UI you need for OpenTAP using the c# API.

Also, there is a Python-OpenTAP plugin/SDK which Keysight decided to open source under MIT last year…so might be another option for you if you want to develop yourself.

Lastly, if you are going web…you might consider the Keysight KS8106A/B REST API plugin…which allows you to integrate with WebGUI’s in a straightforward way. Inexpensive way to save you quite some time.

Anyways, we look forward to your continued interaction here on the Forum and I think you will find many helpful people are happy to give you some pointers if you get stuck! Again, welcome to the OpenTAP community.

1 Like

Hello @hongbo.huo,
How are your experiments with OpenTAP and NI hardware going? Are you trying to replace the pure LabVIEW solution or is it LabVIEW + TestStand (a common pair of tools)?

I use a lot of NI hardware in my projects. Usually, my test sequences are made in TestStand and I call from them LabVIEW helper VIs to interact with my hardware.

I was wondering if OpenTAP can be a good replacement for TestStand (or LabVIEW-based test executive)? Can I ask for your opinion? For sure it might be some money-saving :slightly_smiling_face: not to mention the power of open surce.

1 Like

Hello @bienieck ,
I’ve been using Teststand and Labview for a long time, and I’ve been learning OpenTap off and on during this time:
1: It’s not easy to convince your colleagues and subordinates to put down Labview and use C# programming.
2. If it’s a simple project, Teststand+Labview is much faster than OpenTap.
3. If you want to change the interface, openTap is obviously more difficult. visual studio is really not a vegetarian, the configuration is very complex.

The advantage of OpenTap is:
1.Compare to Teststand+Labview, OpenTap has a small installation size and does not require high computer performance.
2. OpenTap supports python. python is much more capable than Labview. python is also easier to write standard code. C# is too slow to prgroam compared to Labview or python.
3. Opentap is a very open platform, you can write a lot of your own plug-ins.
4. You can turn most of the code written in Labview into .net dll, then call it in python, and finally turn it into a test step of OpenTap.

To summarize, we will try to use OpenTap to replace teststand, but it will be a long process. If OpenTap’s documentation is better, or if it just tells me how to use the interface written in Labview to call OpenTap’s sequence, we will follow it without any hesitation.

3 Likes

Hi @hongbo.huo thanks for your explanation! I’ve been really interested, since I haven’t used TestStand, in customers’ comparisons in their experiences with using TestStand vs OpenTAP, and I don’t think there have been many who have used both, so sharing any difference in experience you have is valuable. Please feel free to keep us updated on your progress in your migration process!

I do have a couple questions about your points, if you don’t mind.

  1. What makes developing a simple project faster with LabView/TestStand vs OpenTAP?
  2. What do you mean by “changing the interface”? Are you talking about development environment?
  3. I haven’t heard of compiling LabView code into a .NET DLL. Does that still require the LabView runtime?
  4. Have you noticed any significant differences in test time between the two?
  5. I thought TestStand supported Python - am I mistaken? And if it did, would you prefer TestStand?
2 Likes

Hello John. Thank you for your attention.
I think OpenTap has a lot of potential for growth if it continues to be updated and improved over time. And I am going to spend years to study and follow this project. For your questions:

  1. I put a python instrument plugin written by myself as an example. This is not difficult but for labview,it only needs some clicks. Teststand is the test executive engine like openTap. It uses labview program directly almost with little modification. For openTap, using python or c#, you have to add some lines of special code like display attributes,sef.debug etc. This is not difficult but will take some additional time.
    IT65xx_example.txt (3.0 KB)
  2. User interface of openTap, I have no idea how to change it. In many conditions, special user interface will be asked for the tester user. If there is an example using c# using only 2 buttons “start” and “stop”. That will be very much helpful. This is very important to us.
  3. You can convert labview into .net code. Labview runtime is still needed. This means you can use command expert for visa controlled instruments also use labview for NI DAQ control.
  4. For teststand, a wait for some seconds can be much longer that it sets when cpu is busy. I haven’t tried openTap for long time running yet.
  5. I prefer opentap. this installation process is so cool. This job looks very technical when you put a bunch of installation commands on screen. :grinning:
3 Likes

@hongbo.huo Thanks very much for the response! As for #2, I could do that, and provide you with the source.

@hongbo.huo Here you go: John Berlien / SimpleOpenTapGui · GitLab
I think this does what you were wanting. Let me know if you have any questions about it.

@john.berlien Hello, I met some errors when I loaded the program. Trie reinstall .net framework 4.7.2 and restart computer but still not work.

Okay @hongbo.huo I tried cloning on another PC and ran into the same problems. It might be something weird with the .csproj files. Here’s a way around it, it only takes a few minutes.

  1. Create a new .NET Framework WPF project in VS, call it SimpleOpenTapGui
  2. Add the OpenTAP Nuget package to the project
  3. Copy the folders “Windows” and “ViewModels” from the cloned project to your new project.
  4. Refresh the Solution, select “Show All Files” (at the top of the Solution Explorer), select the “Windows” and “View Models” folders, and Right-Click and select “Include In Project”
  5. Modify App.xaml where it says StartupUri and make it StartupUri="./Windows/MainWindow.xaml"
  6. Open the simpleopentapgui.csproj file in a text editor, and add the line <LangVersion>9.0</LangVersion> under the top PropertyGroup
  7. Now build. Should work

I’ll try modifying the GitLab project, see what’s causing the issues when cloning

@hongbo.huo Okay I think I’ve fixed the root problem, so please pull the project and try again.

2 Likes

@john.berlien I tried and this is working perfectly. This demo is very important for me to understand how openTap works and how to customize the user interface, thanks a lot!

4 Likes

@hongbo.huo Very glad it’s working! Thanks for your patience! Let me know if you have any questions.

2 Likes