06-15-2012 01:56 AM
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?
06-15-2012 02:05 AM
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.
06-15-2012 03:52 AM
Both VIs have to be able to send and receive,so using a single resource how it can be?
06-18-2012 04:05 AM
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.
06-18-2012 04:48 AM
Please go through LabVIEW example "Basic 2 Port Serial Write and Read.vi", that might help you
regards
Rajesh
06-18-2012 04:55 AM
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.
06-18-2012 04:59 AM
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.
06-18-2012 05:21 AM
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
06-18-2012 06:00 AM
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...
06-18-2012 07:31 AM
Pls go through attached vi's.. this may help you....