LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Importing CVI instrument driver with a struct parameter under LabVIEW

Hello,

I am trying to build an instrument driver under CVI which function panel contains a struct:
typedef struct
{
int iErrorOccurred;
int iErrorCode;
char szErrorMessage[1024];
}
tErrorMgt_T;

I wrote a function and the associated function panel with this struct as a parameter. I made my DLL and now I am trying to use the DLL under LabVIEW

First question is how to recover all struct parameters under LabVIEW?
I am using the "import CVI instrument driver tool" under LabVIEW. LabView is crashing each time I run the VI including the one generated. I selected "adapt to type" option for the parameter and I linked it with the ErrorOut cluster.

I tried
to use "extcode.h" too, to declare my struct but I encounter troubles building the DLL. See picture attach to this question. I tried what is explained on the message, but it isn't working .... I have a syntax error in the odl file. See error message:
fatal error M0001: Syntax error near line 6 column 16: invalid attribute for this item
Second question, how can I include LabVIEW CIN tool code in my source code?

Source code is attached to this question. Is there any examples, articles about this problem?

Thanks for your Help.
Regards, Pascal.
Download All
0 Kudos
Message 1 of 2
(2,616 Views)
I'm not so fond on sharing dll between LV and CVI, but while I was searching the code library I come into this example that could be useful for your needs.

Roberto


Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 2 of 2
(2,616 Views)