03-20-2012 10:11 AM
Hello,
I want to use the CVI examples, available in the NI Example Finder, in TestStand. For that, I have compiled the example project as a debuggable dll, but that did not match my needs because the functions in this dll are those of the header file, which are, somehow, low level functions. What I want is to create a dll containing a function that has the essential inputs and outputs, like the concept of connector pane for a sub VI.
The example that I'm working on is WriteDigChan.cws "C:\Users\Public\Documents\National Instruments\CVI\Samples\DAQmx\Digital\Generate Values\Write Dig Chan"
I want to realize a dll that have the channel name, the digital value to write and error in as inputs and has only error out as output.
03-22-2012 10:43 AM
Hello there,
There are two possible ways I can see this being done which I think will be easiest. First use the corresponding .Net example when importing to TestStand. You could also create a wrapper around the CVI DLL with a simpler CVI function. This could have just the function that you are expecting in TestStand. If you choose to create a wrapper I highly recommend you search Google for some examples.
Daniel
03-26-2012 04:24 AM
The fact is that i have to use a CVI Adapter in TestStand. I think it should exist a simple way to use Example Finder Examples in TestStand, or may be there is some guide to use these two ready provided functions in the header :
int CVICALLBACK PanelCallback(int panel, int event, void *callbackData, int eventData1, int eventData2);
int CVICALLBACK WriteCallback(int panel, int control, int event, void *callbackData, int eventData1, int eventData2);
Does anyone have some experience in using these prototypes?
03-27-2012 01:37 PM
So what I would do is create some source code to call CVICALLBACK PanelCallback and CVICALLBACK WriteCallback. Once you have created some source code to use that, then create that in its own DLL that you can import into TestStand. A good example that I think explains this well would be SimpleDLL.c in which it shows creating a DLL, then calling it in source code. Turning the whole example into another DLL is similar to the strategy I am suggesting.
03-28-2012 02:30 AM
Ok ,thanks a lot 🙂 I will have a look to SimpleDLL workspace.
03-29-2012 10:09 AM
Sounds good, let me know if you need any further help.