LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview interface with Arduino using Serial port 1

Highlighted

Hello All,

 

Im trying to communicate with Arduino from Labview VISA. Is it possible to select hardware port such as Serial1, Serial2 etc other than Serial0 in VISA. As Labview LINX provides such options for selecting UART channel. If it is possible please help me how to do in VISA.

 

Thanks in advance:)

0 Kudos
Message 1 of 8
(308 Views)
Highlighted

The VISA Resource control is a drop down that will show all available VISA connections/sessions.  If there is a serial port, it will likely show up as a "COM" device.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
0 Kudos
Message 2 of 8
(274 Views)
Highlighted

I think my question is not clear.

Crossrulz, as you said it is true if there is serial port it will appear as COM device.

But what I want to achieve is, for eg, If my serial device is Arduino MEGA then this will be detected with COM port number in VISA drop down control. Then VISA uses default hardware serial TX0 and RX0 for communication. Instead how can I achieve VISA communication with TX1 and RX1 in VISA between pc and arduino MEGA

0 Kudos
Message 3 of 8
(218 Views)
Highlighted

Are you referring to the serial ports on the Arduino?  If so, then it is just a matter of which pins you are wired up to.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
0 Kudos
Message 4 of 8
(202 Views)
Highlighted

Are you referring to the serial ports on the Arduino?

yes Serial0, Serial1, Serial2 kind of...

 

 

 If so, then it is just a matter of which pins you are wired up to.

how that can be done in VISA

 

0 Kudos
Message 5 of 8
(180 Views)
Highlighted

@Priya.dharshini wrote:

Are you referring to the serial ports on the Arduino?

yes Serial0, Serial1, Serial2 kind of...

 

 

 If so, then it is just a matter of which pins you are wired up to.

how that can be done in VISA


VISA is not running on your Arduino.  What I was referring to is a hardware connection between a serial port on your computer and one of the serial ports on your Arduino.  Software cannot control where your cable goes.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
0 Kudos
Message 6 of 8
(169 Views)
Highlighted

@Priya.dharshini wrote:

VISA uses default hardware serial TX0 and RX0 for communication. Instead how can I achieve VISA communication with TX1 and RX1 in VISA between pc and arduino MEGA


The USB serial port is HARDWIRED on an Arduino to Tx0 and Rx0 (UART0) you can not change this.

 

-------------------------------------------------------------------
Unfortunately, most readers of this Forum, including some real Experts, have not mastered the skill of being able to read the code that Posters fail to post. If we cannot see "what you did wrong", we are unable to tell you how to fix it. (Bob Schor 28 August 2018)
0 Kudos
Message 7 of 8
(152 Views)
Highlighted

Too late to edit my original response so...

 

This has nothing to do with LabVIEW or VISA because VISA is going to use whatever serial virtual port Windows assigns the Arduino or USB to serial converter.

 

I am not saying you can't use a different UART in the Arduino (at least the ones with more than one UART) but you are going to have to build the RS232 to logic or use a separate USB to serial (3.3v or 5v) logic converter and wire it up to the proper UART pins on the Arduino.

 

Communicating with an Arduino using VISA and serial (rather than using LINX) is no different than communicating with any other device on a (virtual) serial port using VISA.

 

In fact I say it's easier because you are programming the Arduino, so you have full control over the serial protocol, queries, commands, and Arduino responses.

-------------------------------------------------------------------
Unfortunately, most readers of this Forum, including some real Experts, have not mastered the skill of being able to read the code that Posters fail to post. If we cannot see "what you did wrong", we are unable to tell you how to fix it. (Bob Schor 28 August 2018)
0 Kudos
Message 8 of 8
(142 Views)