From Saturday, Nov 23rd 7:00 PM CST - Sunday, Nov 24th 7:45 AM CST, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Saturday, Nov 23rd 7:00 PM CST - Sunday, Nov 24th 7:45 AM CST, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
06-30-2017 10:48 AM
I am trying to use TestStand using LabWindows/CVI to connect with Asset's ScanWorks. I have one station which uses two of Assets hardwares, USB-100 and RIC-1000. I want to be able to connect a certain hardware automatically, without manually doing it in ScanWorks. I looked through the ScanWorks API and it uses sw_connectWithController but I am not sure how to implement it into TestStand.
07-03-2017 06:43 AM
Is this a TestStand question or CVI?
Can't you call Scanworks API DLL from TestStand driectly?
I remember there was more than one DLL files in ScanWorks installation. Maybe you are not choosing the right one. If I am not mistaken, there was a subset API called swproto. Can you check its DLL, whether that function is available in it or not?
07-03-2017 09:49 AM
Yes there is swproto. How would I use this inside of TestStand to call all of its functions?
07-05-2017 09:07 AM
You can add a C/C++ step and point to that DLL file as the code module.
TestStand should list the available functions in the DLL, you select one, enter the parameters and you are done.
You should add a separate step for each successive function call, or create a DLL of your own in CVI and code your functionality into suitable functions and call them similarly.
07-06-2017 08:15 AM
I add the DLL and then try to call one of the functions sw_connectWithController but it has "This function does not have parameter information in the DLL or uses types not recognized by TestStand" so I try inputting parameters and still errors. The parameter is char *controllerString which the RIC-1000 would be the string
07-07-2017 02:36 AM
This happens when TestStand cannot resolve the function prototype. In such cases, if you know the function prototypes you can add parameters manually in TestStand and call the function.
Alternatively, you can create a wrapper library project in CVI and create a CVI DLL with same function names, each of which does nothing but calls the same function in the target DLL.
You need the header file, swproto.h for this purpose.
Create a new DLL project, add swproto.h in it. While swproto.h is the active file tab go to Options>Generate DLL Import Source. Point to the original swproto.dll that you want to wrap.
A wrapper source file will be automatically generated. Add it to your project and build to create your new DLL.
Select this new DLL as your code module. The parameters should Show up this time.
Somehow TestStand works always OK with CVI generated DLLs.
Hope this helps,
07-07-2017 08:17 AM
How do I create a new DLL project and import swproto.h
I am only allowed to import .dll files? Can you show me how did you do it?