01-30-2006 03:50 PM
01-31-2006
04:32 PM
- last edited on
04-04-2025
11:47 AM
by
Content Cleaner
Oleg,
Usually when LabVIEW disappears like that the calling data types are not correct in the Call Library Function node. I would check to see if there are any questionable data types (those that would be difficult to translate into C data types) and check the calling convention as well (stdcall versus C style). Here are a couple links about calling external code in LabVIEW.
Using External Code in LabVIEW
Hope this helps!
Andy F.
02-01-2006 08:09 AM
02-02-2006 06:10 AM
I assume you mean DLL when you talk about DDL. As such it is very much about external code.
@OlegUA wrote:
Hello,
I successfully use those documents for developing CIN. But a problem is far more difficult unfortunately..... And not relates to external code in LabView in general case. As I understood, the cygwin's DDLs has different internal structure and not to be directly calling from M$ compiled programs.
There is two important reasons for use cygwin:
The firstly, I do not like study of M$'s horror.... 😞 The cygwin and gcc cover all tasks needed for me at all. The secondly, I like deal with GPL instead M$'s license Visual Studio.
02-02-2006 08:19 AM
02-02-2006 08:32 AM - edited 02-02-2006 08:32 AM
Would you care to explain what you mean by saying that CINs are much slower than DLLs? In runtime performance there is nothing I have found that would support that statement. In development time it is basically a question of your experience with either CIN or DLL development.
@DFGray wrote:
It appears you are trying to develop a CIN rather than a DLL. CINs are much slower than DLLs. They also are more difficult to debug. Compile your code as a standard, C callable DLL with basic data types (see previously mentioned documentation for details) and you should have no problems.
Message Edited by rolfk on 02-02-2006 03:35 PM
Message Edited by rolfk on 02-02-2006 03:35 PM
02-02-2006 10:27 AM
Hello Rolf,
However if you are right about your assumption that the OP does want to create a CIN with cygwin I definitely agree with you that he will run into C runtime initialization problems with the LabVIEW CIN interface initialization. Using a DLL instead is likely to ease those problems but I'm not familiar with cygwin and it may be indeed that cygwin created DLLs are intrinsically incompatible with normal MS C compiled applications.
02-03-2006
10:27 AM
- last edited on
04-04-2025
11:48 AM
by
Content Cleaner
Rolf, you are right. Thanks for keeping me honest. There is no significant performance difference between CINs and DLLs. In fact, CINs can be faster due to inherent interface optimizations. However, Oleg is still stuck using DLLs, since you can't make a CIN under Windows with gcc. Oleg, unless you are using some data type LabVIEW does not support (e.g. function pointer) you should be able to make the cygwin DLL work, provided you remember to use the C calling convention in the Call Library Node. Unless you know your code is thread safe, run in the user interface thread.