LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error 1097 running a DLL

Hello Friends

                   I am using CLFn to Implement FMI functionality in Labview.

                   For starters the program is pretty simple.
                   It has a for loop under which the step integration of the states takes place.
                   Outside the loop are the CLFN blocks that Instantiate, Initialise and set time of simulation for the model.
                   Using Highlight execution I found out that there were errors from the CLFn that was responsible for the SET TIME function.
                   I am attaching the complete List of required files for you to get some idea.
                   regards

                   raghu

0 Kudos
Message 1 of 5
(2,777 Views)

more files

Download All
0 Kudos
Message 2 of 5
(2,776 Views)
0 Kudos
Message 3 of 5
(2,775 Views)

Is this question related to your other question: http://forums.ni.com/t5/LabVIEW/Calling-DLL-FMI-Objects-in-Labview/m-p/1529302 ?

 

I don't understand what you are asking. You say there's errors. What errors? Are these LabVIEW errors, or errors generated by the DLL? We have no idea how this DLL is supposed to work, so I'm not sure what kind of help you're asking for.

0 Kudos
Message 4 of 5
(2,764 Views)

Well, since those functions have no parameters there is really very little you can do wrong as far as the LabVIEW CLN is concerned. One is the calling convention. You don't specify that in the C code explicitedly so it will depend what you have set in your project file. Visual C uses by default cdecl. Make sure you set the same calling convention in the CLN as you have selected in your C compiler project settings (thus C by default).

 

If you still get an error, then you have a bug in your C code. It is anyhow a good idea to test a DLL first with some C routines before starting to integrate it in LabVIEW through CLNs. As a good C programmer you know, that a bad pointer derereferencing, improper memory allocation or what else is made very easily and needs to be debugged first.

Rolf Kalbermatter
My Blog
0 Kudos
Message 5 of 5
(2,743 Views)