LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Full duplex communication using VISA

Hi,

    As a part of learning VISA serial communication.I want to ask one question:

    Suppose we are sending some data from one VI to another using VISA serial port read and write(sender.vi->Receiver.vi).On the same time I want to send a command from Receiver.vi to sender.vi.Both the ports are connected via a null modem cable.I placed another VISA read and VISA write and tried to communicate.That time it shown "Framing Error".I would like to ask,Is a full duplex communication possible here??If yes Is it the approach in the attachment correct or not?

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Thanks as kudos only:)
Download All
0 Kudos
Message 1 of 19
(5,403 Views)

You are creating Two resources for a single serial port and using it seperately am not sure this is a right way of doing it (Since I have not worked much with VISA). Try to use single resource for reading/writing.

-----

The best solution is the one you find it by yourself
0 Kudos
Message 2 of 19
(5,400 Views)

Both VIs have to be able to send and receive,so using a single resource how it can be?

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Thanks as kudos only:)
0 Kudos
Message 3 of 19
(5,385 Views)

Anybody please give me some instructions to do this:-

 

While sending datas from one VI(sender VI) to another(receiver VI).How can we send a command back on button click from receiver VI to the sender VI?Using VISA how can it be done?Above attached VI showing Framing errors indicating that it is not the right way to achieve that.Then how it can be done?

Please give me some necessary instructions to do it.

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Thanks as kudos only:)
0 Kudos
Message 4 of 19
(5,348 Views)

Please go through LabVIEW example "Basic 2 Port Serial Write and Read.vi", that might help you

 

regards

Rajesh

Rajesh Raghavan Nair

Certified LabVIEW Architect
Certified Teststand Architect
0 Kudos
Message 5 of 19
(5,339 Views)

Yes,I went through it, and there sending and receiving takes place in the same VI.Iam sending datas from one VI to another and it is working well.And what I want to know is .Is it possible to send back a command to the senderVI from the receiver VI?Please see the attachment in the first message of this thread.

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Thanks as kudos only:)
0 Kudos
Message 6 of 19
(5,334 Views)

A more detailed explanation:-

 

sender VI---------(sending data)------->receiver VI

   

sender VI (sending commands on button click)<--------receiver VI 

 

On button click the receiver will act as sender.

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Thanks as kudos only:)
0 Kudos
Message 7 of 19
(5,330 Views)

Hi

 

You should follow as P Anand has advised. Moreover in your scenario there is no such thing as sender or reciever. You can call these two VIs as two different programs from which you are sending and recieving serial messages.

 

Whenever you configure a serial port, the Serial port is reserved for that VI till you release it by close VI.

 

Also process of transmitting and recieving should be kept in a loop.

 

Regards

 

Javed

0 Kudos
Message 8 of 19
(5,323 Views)

Hi Danli

I tried your code with two separte channel and got same problem and using same channel it only reads does not write so it is better you take Anand advice...

0 Kudos
Message 9 of 19
(5,314 Views)

Pls go through attached vi's.. this may help you....

Rajesh Raghavan Nair

Certified LabVIEW Architect
Certified Teststand Architect
Download All
Message 10 of 19
(5,298 Views)