ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem creating DLL for CINs

I am just learning on how to use CINs in LV. I am facing some problem in
creating
the DLL in Visul C++ IDE.
My cintools directory is D:\National Instruments\LabVIEW 7.0\cintools
In the project->settings->custom build->commands field, I have enterd the
following: D:\National Instruments\LabVIEW 7.0
\cintoolslvsbutil.exe "$(TargetName)" -d"$(WkspDir)\$(OutDir)"
When I build the dll, the error displayed is:
'D:\National' is not recognised as an internal or external command, operable
program or batch file. Error executing C:\Winnt\System32\cmd.exe

Please help me .

Thanks & Regards,
Srini.
0 Kudos
Message 1 of 9
(3,727 Views)
Looks like the batch file needs the quotes for the space in the path. You would need something like

"D:\National Instruments\LabVIEW 7.0\cintoolslvsbutil.exe" "$(TargetName)" -d"$(WkspDir)\$(OutDir)"

If you don't mind, can I ask why you are using CINs? We have put a lot of features in LabVIEW to try to eliminate most of the reasons people used to develop CINs. It may be that there is a better and easier way to accomplish what you are trying to do.
0 Kudos
Message 2 of 9
(3,723 Views)
Srini;

You can also use this little VI I created to perform the custom step:

CIN Custom Step

It is in LabVIEW, so it will be easier for you to edit and customize.

Regards;
Enrique
www.vartortech.com
Message 3 of 9
(3,715 Views)
Hi,
I wanted to use CINs for my DAQ program. I have a custom built PCI DAQ card.Till now I was using a C program. Now I am switching to LabVIEW. I tried using the inport.vi and outport.vi but it is very slow. That's why I thought I can use my C program in LabBIEW and see whetherit will work as fast as the C program. Any comments will be of great help.
0 Kudos
Message 4 of 9
(3,699 Views)
I am using LabVIEW 7.0. Can I use your vi for this version also?
0 Kudos
Message 5 of 9
(3,698 Views)
I enclosed the path in quotes.The error displayed is: "Error executing c:\winnt\system32\cmd.exe
Can you help me?
0 Kudos
Message 6 of 9
(3,695 Views)
If you are primarily trying to just call a C library which interfaces with your hardware, then I definately suggest going with the DLL path rather than CIN. It is much easier to build and maintain.

I really good starting point in terms of designing your C API for LabVIEW is to consider what kind of data you will be passing back and forth. I recommend downloading this example and looking over it. Let me know if you have any questions.

http://sine.ni.com/apps/we/niepd_web_display.display_epd4?p_guid=B45EACE3E78F56A4E034080020E74861

Note that it isn't a CIN, even though it does make use of the extcode.h and certain calls into LabVIEW. It is just one DLL calling into another.
0 Kudos
Message 7 of 9
(3,684 Views)
Yes. If for some reason you have problems let me know.
www.vartortech.com
0 Kudos
Message 8 of 9
(3,681 Views)
This works veryfine. Thanks a lot.
0 Kudos
Message 9 of 9
(3,658 Views)