LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview interface with Arduino using Serial port 1

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 9
(2,698 Views)

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
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 9
(2,664 Views)

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 9
(2,608 Views)

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
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 9
(2,592 Views)

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 9
(2,570 Views)

@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
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 6 of 9
(2,559 Views)

@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.

 

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 7 of 9
(2,542 Views)

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.

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 8 of 9
(2,532 Views)

You have mentioned in the above post using RS232 to logic we can read data from serial1 or 2 in Labview. How to achieve this, What is that logic can you brief it out?

 

I need to read from serial port 3 of Arduino in Labview.

Any help is highly appreciated

0 Kudos
Message 9 of 9
(1,808 Views)