LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Want to make .exe of RS232 program in CVI 2009

 

Hi all,

 

In the existing samples of CVI 2009. I am using rs232 program and want to make its executable on windows 7 32 bit and 64 bit. I created the distribution file but when i installed the executable file on other laptop having no CVI installed. The rs232 program is giving the error that "COM PORT can not be opened / Initialized." Please advise me regarding this issue.

 

 

 

Regards,

mhs1000

0 Kudos
Message 1 of 7
(3,745 Views)

Which comm port (COM1, COM2, etc) is the example program opening and what comm ports do you have available on the laptop? If they are the same can you open it with a third party program such as NI MAX?

0 Kudos
Message 2 of 7
(3,731 Views)

 

 

Hi,

 

Yes i have Com1 in my laptop but can not open the com port .... RS232 ERROR -7 is what i am geting. But i dont want to install NIMAX in my laptop, I think this serial program should work only by running the .EXE file in my laptop. Installing the Labwindows Runitme engine shouldn't be enough????

0 Kudos
Message 3 of 7
(3,709 Views)

If you can see the com port in the device manager ther is no reason for the error you are receiving.

I can confirm you that simply installing the run-time engine is enough for running programs that are using the RS232 library. How are you opening the port? Can you show us the exact code you are using and where you are receiving the error? Are you sure also that no other applications are using the COM port at the same time?

Are you using a USB-to-RS232 converter? If so, can you confirm that the virtual com port is assigned the proper nunber?

The error message too is strange, it doesn't look like a standard library error: can it be your code that rephrases it? Or is it a Windows error rather than a CVI error?



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 4 of 7
(3,702 Views)

 

 

Hi Roberto,

 

I am using exactly the same code as it is written in the As shipped program of RS232. When i built the distribution file, i selected the Run time Engine with all the sub features enabled under its heading. But i disabled ( Unchecked) the NETWORK VARIABLE feature because i was not able to build the distribution successfully while keeping the NETWORK VARIABLE option CHECKED. I dont know whether this is causing the error or not.

 

 

Other thing is that my laptop doesnot have Serial port but when i mount my laptop on docking station having serial RS232 port, the COM Port is enabled and it is listed in the Device manager. I am pretty much sure that the COM port is not used by other application because if this is the case then the advanced window will show like this for e.g COM1(in use), COM2(in use) etc.

 

 

When i did not connect my laptop with the docking station, COM port was not listed in device manager. The RS232 program was giving the error -6 which makes sense for me that the COM Port does not exist. After the COM port is enabled and listed in the device manager then it started giving error -7 (Cannot open the com port) . I dont know why it is giving.

 

Instead of laptop, i tried to install the .EXE file on PC having windows 7 installed and has PCI card of serial port installed in it. I got the same response

 

Please find attached the snapshot.

 

I want to ask if this .EXE file can be run on windows 32 bit and 64 bit or not?

 

 

Regards,

mhs1000

 

 

0 Kudos
Message 5 of 7
(3,692 Views)

 

Hi all,

 

Yesterday, when i tried to run the same program. It didint give the RS232 error -7 and it satrted perfectly.

 But today when i tried to run it again, it started giving the same error -7. Please advise.

 

 

 

 

 

Regards,

mhs1000

0 Kudos
Message 6 of 7
(3,676 Views)

mhs1000 ha scritto:

Yesterday, when i tried to run the same program. It didint give the RS232 error -7 and it satrted perfectly.

 But today when i tried to run it again, it started giving the same error -7. Please advise.


That sentence puzzles me! Normally it happens that either the port is available or not, I can only imagine that the recognition of the com port when the laptop is placed in the docking station is not immediate or for some reason the port is recognized but cannot be accessed for some time after that moment, I have rarely used docking stations so I have no experience on that. Maybe you can try rerunning the program after some minute from when you dock it.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 7 of 7
(3,667 Views)