LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Convert sample program Serial.C to Dll

Hi all,

Recently I found problem in using Serial flow control in Labivew. The unit under test will lost communication if i use Labview Visa serial to send/receive RS232 commands. When I tried with CVI RS232 sample program in cvi\samples\rs232\serial.prj , i found the communication is ok. However, I am not too familiar with CVI.

is that better to convert to dll to call by Labview or any other way to import the cvi program to labview?

if it's convert to dll, has anyone done that and willing to share the dll? I tried following steps to create dll in cvi, but when i call the function in labview, the front panels never load, what problem?

Thanks for the help!
0 Kudos
Message 1 of 9
(5,920 Views)
Hi Rebecca,

May be this help you, please see the attached file.
If you compile a CVI Project then you get DLL with help file as well.
Br,Sergei
"Only a life lived in the service to others is worth living..." - Albert Einstein
Message 2 of 9
(5,913 Views)
Hi Sergei,

Thanks for the example code. I have tried to compiled it to DLL but doesn't see help file. Anyway, it doesn't matter.

I tried to call the compiled DLL in Labview using the library node. However, the operation is timed out when I tried to receive buffer and the query input length is also zero. FYI, my unit under test will return a string once it is reset. So I am pretty sure the COMPORT has something inside the buffer. See attached for my program and dll

What program you used to call the dll last time? Please help to advise. Thanks a lot!

rgds
rebecca
0 Kudos
Message 3 of 9
(5,906 Views)
I'm using NI TestStand to call the dll witout any problems, as I seen your vi at least you need to have a loop mode until the read string is comming after reset. Better way is to use VISA functions for it. I will try to do it and let you know....
"Only a life lived in the service to others is worth living..." - Albert Einstein
Message 4 of 9
(5,903 Views)
Hi again,
The exsample is attached, for your solution just remove the write fun. and leave from the loop after getting the reset string
"Only a life lived in the service to others is worth living..." - Albert Einstein
Message 5 of 9
(5,896 Views)
Hi,

I used Visa Serial but has some problems. Anyway, have got the issue solved by doing some modifications on the software. Thanks for your help!
0 Kudos
Message 6 of 9
(5,871 Views)
Hello Sergei,
I came across your rs232.zip file which I used to create the rs232 dll sucessfully,
however when trying to use them in TestStand I found the help file (*.hlp) was not included,
could you share it with me?

Many Thanks
Luis
0 Kudos
Message 7 of 9
(5,811 Views)
Hi Luis,
The help file is attached.
Br,Sergei
"Only a life lived in the service to others is worth living..." - Albert Einstein
0 Kudos
Message 8 of 9
(5,754 Views)
Hi Sergei
Thank You.
0 Kudos
Message 9 of 9
(5,749 Views)