LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

visa

I struggle with a fundamental problem...visa serial read/write.

How do I make a program that both sends data and recieves data via visa serial read/write "at the same time"?
I want it to read data whenever there is incoming data(all the time ready to read) and write whenever
there is something to write(for example a "send command" buttom that user pushes).

I have tested to program in some different ways but I get the same problem(tested program between two PC:s via
hyperterminal)

PROBLEM:
Reading data works fine, it answers on incoming data, but to write data the program´s readfunction
must execute first. The readfunction must take its specified number of bytes before the program
sends the "writebytes". In other words: I cant write anything to hardware unless there is incoming data to read!!

I have tested with one loop containing both read and write. I have tested with two parallell separated
loops with read in one and write in the other.

You can take a look at my attached programexample if you want.

Any suggestions how to solve this?

/thanks fredda
0 Kudos
Message 1 of 6
(3,483 Views)
Try attached.
Message 2 of 6
(3,473 Views)
Hi!

Thanks for answer!

I cant open your file, I have LV version 7.0!

Could you send it in my version or..?

/Fred
0 Kudos
Message 3 of 6
(3,454 Views)
Hi! Fred,
The attached VI is in LV 7.0 version.
Try and see if you can open it.
0 Kudos
Message 4 of 6
(3,447 Views)
Seems like the VI was not attached.
0 Kudos
Message 5 of 6
(3,446 Views)
Here is the bitmap of the block diagram.
I am using LV 7.1.
0 Kudos
Message 6 of 6
(3,431 Views)