02-21-2008 12:10 PM
02-21-2008 12:17 PM
02-21-2008 09:59 PM - edited 02-21-2008 10:07 PM
Hi cemal,
Wow, looks like this thread has taken a strange turn. Having spent a day building a CIN, it now looks like an answer to your original question is irrelevant!
Well, similar questions have been asked before; if you're still interested in "How can I call subVI(s) inside a CIN (Code Interface Code)"
the attached .zip contains a LabVIEW 8.2 MyLVDLL project, and a VC++ 6.0 Workspace that will build a CIN (it builds the .lsb file.)
The top-level MyCIN.vi passes a VI path to the CIN which calls MyLVDLL to open the VI.
02-22-2008 04:39 AM
02-22-2008 05:00 AM
Hallo tbd,
I had a look on your example. I wonder where did you take the labview.lib and lvsb.lib from? And where did you find that extcode.h header? They seem to be part of some kind of SDK!? What exactly do these libs do? Are they documented somewhere?
02-22-2008 06:10 AM
Dennis Knutson wrote:
I agree and think your question is confusing. What kind of 'API' does C++, .net. VB, whatever, provide to tcl? A LabVIEW program can be made into an exe or dll. A LabVIEW program has an ActiveX interface and you can access it's properties and methods. If you can call an exe, a dll, or use ActiveX with a text based scripting language, then go for it.
02-22-2008 08:25 AM
LabVIEW is a full featured programming language and is comparable to other programming languages in terms of functions, execution speed, etc. Whatever difficiencies, are made up in that it is easier to write programs with, imho.
As already said, you have the ability to use VI Server/ActiveX to control a LabVIEW VI. There are examples available for c and vb programs on how to use the properties and methods of a VI. This does not require that you build a VI into an exe or dll but it would require you to have the LabVIEW programming environment installed.
LabVIEW does not have hardware drivers. LabVIEW uses hardware dirvers. It uses the same hardware drivers that developers in c, vb, .net, etc. use. I have seen tcl scripts that use NI GPIB calls and suppose that the same is possible with DAQ. Certainly you could write a LabVIEW VI to call those drivers and then call the VI from another program but if you are an accomplished programmer in the other language, why bother?
There also seesm to be some confusion on the use a a CIN and what scripting is. A CIN is a type of dll that you create with something like Visual Studio. It used to be the only way that you could integrate c code into a LabVIEW VI. Since NI introduced the Call Library Function Node that can access any dll, there is very little need for a CIN. A CIN has no relationship to a scripting language such as tcl other than that both require you to use a keyboard.
When you see the term 'LabVIEW Scripting' on this and other forums, what is being talked about is a way to generate LabVIEW code from another LabVIEW program. It is not a simple task or generally available.
02-22-2008 04:50 PM
silicomancer wrote:
... I wonder where did you take the labview.lib and lvsb.lib from? And where did you find that extcode.h header? They seem to be part of some kind of SDK!? What exactly do these libs do? Are they documented somewhere?
02-25-2008 02:02 AM
02-25-2008 02:27 AM
tbd wrote:
The resource-files you mentioned are all installed with LabVIEW and (by default) located in:\Program Files\National Instruments\LabVIEW x,x\cintools Here are some instructions related to use of these files.Cheers!