LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem reading data from arduino with visa read

Solved!
Go to solution

it's NOT the same time the VISA Write and Read are sequential 

 

THINK DATA FLOW!

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 21 of 28
(1,046 Views)

Also you do not HAVE to use the VISA Close IF you have "Automatically Close VISA Sessions" enabled in LabVIEW options

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 22 of 28
(1,042 Views)

So visa read and visa write can work together or not ? In my VI I have to read data serial while I'm writing some commands

0 Kudos
Message 23 of 28
(1,030 Views)

@Reiza wrote:

So visa read and visa write can work together or not ? In my VI I have to read data serial while I'm writing some commands


Are you sending a command and then receiving a response or monitoring received data and sending commands in between?

 

Either way it's sequential, you are either reading or writing, not both at the same time.

 

Post some code so I can see what you are trying to do, maybe that will help me understand what you are asking

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 24 of 28
(1,022 Views)

I can't send my VI now, maybe later. I have to control arm robot dobot magician using arduino and labview as the interface. Arduino always sending the dobot realtome positition. So in my program, I will monitoring the dobot posisition and can give some commands at the same time. I have a real time posisition indicator in labview for reading the data posisition all the time, and this is why I ask about visa duplicate session first to find out that visa read and write at the same time or not

0 Kudos
Message 25 of 28
(1,016 Views)

@Reiza wrote:

I can't send my VI now, maybe later. I have to control arm robot dobot magician using arduino and labview as the interface. Arduino always sending the dobot realtome positition. So in my program, I will monitoring the dobot posisition and can give some commands at the same time. I have a real time posisition indicator in labview for reading the data posisition all the time, and this is why I ask about visa duplicate session first to find out that visa read and write at the same time or not


Your program will be receiving constant position data and you will be sending a occasional command, right?

 

So you have a "receiving loop" that is constantly reading the incoming data and occasionally you break out of that loop, send a command, and reenter the "receiving loop".

 

BTW: Windows and the PC hardware UART buffer should handle any data received while you are sending your command, so you wont lose anything.

 

Also I am willing to bet an Arduino can only send or receive data  I do not believe they are full duplex.

 

 

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 26 of 28
(1,002 Views)

Your program will be receiving constant position data and you will be sending a occasional command, right?

 

So you have a "receiving loop" that is constantly reading the incoming data and occasionally you break out of that loop, send a command, and reenter the "receiving loop".

 

Yes, I need the VI work like that. Can you give me a suggestion how to do that ? I'm sorry if I make you confuse because I'm new with labview and all I know is just about the serial communication

 

0 Kudos
Message 27 of 28
(999 Views)

Don't create a whole new thread where you are asking the same questions you are in the first thread.

You'll notice you are even getting the same sorts of responses.  But people are wasting time answering in two places, or not getting the benefit of what you've already been told in the other thread.

 

These threads are being merged.

0 Kudos
Message 28 of 28
(990 Views)