04-28-2011 07:19 AM
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
04-28-2011 07:21 AM
more files
04-28-2011 07:22 AM
one more file.
04-28-2011 10:31 AM
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.
04-28-2011 01:35 PM - edited 04-28-2011 01:36 PM
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.