LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

couldn't open port com

HI,

     I am using LabVIEW 8.6 to control an pump through USB (computer) to RS-232 adaptor (pump side) using COM 4. The first time the VI runs fine. But After I quit the VI, and restart the VI. The pump does not respond to the initialize command. Another program (from the manufacturer of the pump) reported that it 'couldn't open port COM 4'. Did I miss anything in closing the com port or in the initiation the com port. My VI is attached. Thanks.

0 Kudos
Message 1 of 4
(2,642 Views)

You did not attach the subVIs so no one can see what is being done in the initialization routine. It does look like you are closing it okay so I don't see why the other program could not access the port.

 

Also, you might want to clean up your wiring.

0 Kudos
Message 2 of 4
(2,637 Views)

Hello RyanWu,

 

Please make sure that you are quitting the VI by clicking the 'Stop Program' button on the front panel and not by hitting the Abort button - this could lead to your VISA session not being closed properly. Apart from this, the problem may lie in the subVIs.

 

 

Vivek Nath
National Instruments
Applications Engineer
Machine Vision
0 Kudos
Message 3 of 4
(2,605 Views)

RyanWu wrote:

Another program (from the manufacturer of the pump) reported that it 'couldn't open port COM 4'. 


Open up MAX (measurement and automation explorer) and look under 'Devices and Interfaces'.

You might want to check that the equipment is still assigned to COM 4. If so, it should say:

COM4              ASRL4 (blah blah blah)        Settings

It may have been assigned to a new com port if you unplugged and replugged in the equipment.


If it is still COM4, please post the code for the subVI you mentioned earlier so I can take a look at what is going on in there.

Cory K
0 Kudos
Message 4 of 4
(2,597 Views)