Instrument Control (GPIB, Serial, VISA, IVI)

取消
显示结果 
搜索替代 
您的意思是: 

serial read and write simultaneously

i want to write to a serial port and simultaneously be able to read what is send back to the pc. over the same port.

is it possible to attach a visa read and a visa write to the same port number?

if so, can someone tell me how to do it.
if not, maybe there is another way of doing it in Labview 6.1
0 项奖励
1 条消息(共 13 条)
5,080 次查看
Stranger:

You need NI-VISA 3.0 or higher. This is from the readme:

"For a Serial INSTR resource, multiple sessions to the same port caused weird behavior if you tried to both write and read data simultaneously. This has been fixed."

You also need to open 2 separate VISA sessions to the same port because LabVIEW limits you to a single I/O operation at a given time on a given session. Not an unreasonable restriction, just something you need to know. Just set the "Open duplicate session" input parameter to VISA Open to TRUE.

Dan Mondrik
National Instruments
0 项奖励
2 条消息(共 13 条)
5,080 次查看
i dont have NI-VISA 3.0 or higher.
i have the visa deliverd with LabView 6.1.

is there any way of doing it with the older version, or is it a bug in that older version.

also i am quite new to programming in Labview. if anyone has any sugestions on solving this problem, i'd really appreciate it.

thanks in advance
0 项奖励
3 条消息(共 13 条)
5,082 次查看
Hi Stranger,

This was not a BUG! It was a limitation. This limitation does not exist in the newer versions of VISA.

You should be able to download the most recent version of NI-VISA.


Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 项奖励
4 条消息(共 13 条)
5,084 次查看
Hi Ben,

where can i download the most recent version of
NI-VISA, and is it compatible with LabView 6.1?
0 项奖励
5 条消息(共 13 条)
5,084 次查看
Try this

http://digital.ni.com/softlib.nsf/webcategories/85256410006C055586256BBB002C0E91?opendocument&node=132060_US

I just strarted at NI's home page and chased down the links under support.

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 项奖励
6 条消息(共 13 条)
5,084 次查看
hi,

i have downloaded and installed NI-VISA 3.0.
and it still does not work.

i want to be able to read and write to the serial port simultaniously. is it possible to address the TxD & RxD lines sepperately.

i've attached my program, and hope someone can tell me what i'm doing wrong.
0 项奖励
7 条消息(共 13 条)
5,084 次查看
Sure, you're not opening 2 references like you need to do, as described above. Each usage should call VISA Open first.

Dan Mondrik
0 项奖励
8 条消息(共 13 条)
5,084 次查看
i've done wat you said, now i get the following error message:

error code: �1073807339
"Timeout expired before operation completed."

i've tried to increse the timout (even to 20 seconds) but the error remains.

i've attached my program again to clarify

thanks in advance.
9 条消息(共 13 条)
5,087 次查看
You still didn't have 2 sessions because you didn't pass "T" to "Create Duplicate Session". Also, explicitly calling VISA Open after it's been configured doesn't guarantee that the port remains in the same state. So I took the liberty of moving a few elements around in your diagram. What I have attached should work now.

Dan Mondrik
10 条消息(共 13 条)
5,084 次查看