05-24-2012 07:02 AM
Hi,
what Iam trying to do is in the attached VI.
Sending data from one VI and receiving it in another VI.My question is:-
1)Can it be done using serial port reading??Assuming "data sender" as an external device and reading and displaying them in receiver.
2)As I have no hardware and the only available thing is a null modem cable,to connect between two ports,is it possible using VISA read and write??
3)Is there any methods otherthan VISA to be used here??
05-24-2012 07:05 AM
Hi Danil,
1) How can you send values from one VI to an other, when your data source is an "external device"? Did I mention you have to write better questions?
2) it's possible
3) VISA is to be used for serial port communication...
05-24-2012 07:08 AM
Sorry we can continue here.....
"Assuming "data sender" as an external device"
Because no actual device to send data.Just assume that "data send" acts as a device that sends data.
05-24-2012 07:16 AM
05-25-2012 06:12 AM
Hi Gerd,
Yes,we have already discussed.But Iam still struggling with it.I just want to ask you one thing:-Is it possible to send array elements from model write.vi and display it in model read.vi using VISA read and write?If yes how can we connect them?For communication between two VIs we know queues and some other functions are there.But I just want to did it using Visa read and write.Please give possible suggestions.model write.vi and model read.vi are attached below.
05-25-2012 06:16 AM
Hi Danil,
yes, it's possible.
You need to use two COM ports, connect them with a proper cable, and that's it...
In the "Read" routine I would not limit to read just 2 chars, especially when you want to send U32 values as noted in your other thread. You already configured your VISAInit to use the TermChar, so you don't need to limit the VISARead function...
05-25-2012 06:26 AM
OK.
1)It means we have to wire the byte count with exactly the number of bytes that we are sending??
2)After wiring the two COM ports togather,Is VISA read can read from the array in model write.vi??
05-25-2012 06:31 AM
Hi danil,
"1)It means we have to wire the byte count with exactly the number of bytes that we are sending??"
No, it means you have to wire a number greater than the expected number of bytes. You use the TermChar to signal the EndOfString!
VISARead stops in 3 cases:
- number of bytes to read is received
- TermChar is received
- TimeOut
You want to use case 2...
05-25-2012 06:37 AM
OK.thanks for explaining.What about this one
After wiring the two COM ports togather,Is VISA read can read from the array in model write.vi??I mean,In queue we have queue reference...anything like that?
05-25-2012 06:39 AM