LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to open COM1?

Dear All,
I have just tried to use VISA Configure Serial Port,vi to use COM1, but I use other program to find out it is not using the Com1.
I don't know why. Is it the reason that I haven't installed MAX?
 
Thank you!
0 Kudos
Message 1 of 9
(3,587 Views)
What do you mean you open another program to find out it is not using Com1? On the front panel of your VI, you have ASRL2::INSTR selected. This is com2. What port is your instrument connected to? When you click the arrow on the right side of the control, what ports are listed?

Com1 and Com2 are actually aliases for the actual VISA resource names of ASRL1::INSTR and ASRL2::INSTR. I think the aliases are created when you install VISA and not when MAX is installed. You can open MAX to see what is listed.
Message 2 of 9
(3,581 Views)
Thank you for your reply.
I mean that when one program are using COM1, while another program also want to use COM1, it will find COM1 is being used.
I use this vi to use COM1, while use another program to use COM1, it find that COM1 can be used. That is my vi are not open COM1 succesfully.
And the arrow on the right side of the control is gray and disable.
is VISA installed when Labview is installed automatically?
I only want to use COM to send some data out.
 
Thank you!
0 Kudos
Message 3 of 9
(3,572 Views)
Hi,
I have just telephoned to NI, the engineer of NI said, If I want to use COM, I should use NI-VISA.
But I find that the NI-VISA is not free.
I only want to use COM to control a printer, Must I buy NI-VISA?
If I want to run my program in a computer which haven't installed Labview and NI-VISA, can it run properly?
Is there any other ways to use COM to control the printer without NI-VISA?
 
Thank you for any useful reply!
0 Kudos
Message 4 of 9
(3,548 Views)


@hugoliang wrote:
 
I mean that when one program are using COM1, while another program also want to use COM1, it will find COM1 is being used.
I use this vi to use COM1, while use another program to use COM1, it find that COM1 can be used. That is my vi are not open COM1 succesfully.
 
You cannot have two applications both talking to the same COM Port at the same time. 
 
And the arrow on the right side of the control is gray and disable.
is VISA installed when Labview is installed automatically?
 
It should be..
 
I only want to use COM to send some data out.
 
You can use the COM Port to send out data, but not while an other application (or another vi for that matter) is using the port.


RayR
Message 5 of 9
(3,534 Views)
NI-VISA is included with LabVIEW. You simply have to install it. It's on the Device Drivers CD. When you build an application, you include the VISA run-time engine with the app and install both. There is no additional charges.
Message 6 of 9
(3,533 Views)


@hugoliang wrote:
I have just telephoned to NI, the engineer of NI said, If I want to use COM, I should use NI-VISA.
 
That is correct, especially for LV-7.0 and up.
 
But I find that the NI-VISA is not free.
 
What??  It should be part of the basic package...
 
I only want to use COM to control a printer, Must I buy NI-VISA?
 
Are you using a Serial Printer or a USB Printer?  In any case, you should have a driver for the printer..  You could use the printer vi's.
 
If I want to run my program in a computer which haven't installed Labview and NI-VISA, can it run properly?
 
Only if you create an executable.  This feature is not part of the basic package...
 
Is there any other ways to use COM to control the printer without NI-VISA?
 
Are you using a Serial Printer or a USB Printer?  In any case, you should have a driver for the printer..  You could use the printer vi's.
 

You should be able to see the palette shown in the attached image from a block diagram..  That is the NI-VISA for the serial port..
 
RayR

Message 7 of 9
(3,527 Views)
I have just installed NI-VISA,and the COM work properly.
 
Thank you again!
0 Kudos
Message 8 of 9
(3,502 Views)

Glad that everything worked out well

😄

0 Kudos
Message 9 of 9
(3,497 Views)