From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview calls CVI dll

I got a problem for calling a CVI dll from Labview, anybody can help me out.
 
I implemented a CVI function to open a COM port and write a string to the poer, like:
 
OpenComConfig (1, "COM1", 9600, 0, 8, 1, 2048, 2048) ;
 
ComWrt (1, "This is a test string", 21);
 
then I can the function from labview, the function OpenComConfig alwany return -7 to tell me
"Cannot open port". If I run the function in Labwindow eveything is fine.
 
Fengfeng
0 Kudos
Message 1 of 2
(2,315 Views)
Hi,
 
Please make sure that you did not do any mistakes when creating the CVI DLL. This KB describes how to create a CVI dll.
 
Regards,
Ankita
0 Kudos
Message 2 of 2
(2,303 Views)