Instrument Control (GPIB, Serial, VISA, IVI)

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

No device response even with open serial port under linux -- normal behavior under Windows

We are consolidating another thread into this one since they are related issues:

How to get a baudrate of 921600 with visaconf

RECAP: The serial driver is responsible for possible baud rates, not NI-VISA. There is further discussion on what VISA properties are when it comes to Serial.

Cheers,
-Marshall R
0 项奖励
11 条消息(共 26 条)
2,539 次查看
Hi Fusselpelusa,

There should be a file that is generated by NI-Spy that has a *.spy extension. Please attach that file to your post, because it will make me easier to analyze the results.

Also, I would like the NI Spy capture of what happens when you do this in Windows. This will make it easier to understand why it works in Windows and not in Linux.

Please let me know if you have any questions.
Rasheel
0 项奖励
12 条消息(共 26 条)
2,535 次查看
Hi Fusselpelusa,

I read through your replies again and I realized that you did put a Windows NI-Spy capture. However, it would be very much easier for us to analyze the data if you could attach the .spy file and post it here.

Also, could you please explain what you mean by the time delay? You mentioned that with different time delays you get different results in Linux, could you explain that a bit further? Is this time delay you are refering to the timeout?

Thanks!
Rasheel
0 项奖励
13 条消息(共 26 条)
2,532 次查看
Hi,
I try to attach the .spy files. Following your suggestion, I am using the labview "Basic Serial Write and Read vi". Thats where the option time delay comes into the game. Do you want me to use our vi? Another remark: With liunx every second request was successful with 0ms, the error comes with 50ms (or 20ms, 10ms as well ....) For windows I am not getting any read for 50ms, for 0ms occasionally there is the right bytes on the port. If there is any, it is the right configuration though.
Re: Marshall:
Sorry that I frustrated you with all my over and over questions regarding bauds and visa. I do understand VISA does support any baud rate, what I do not understand what the resource editor is all about then. Why do i have to specify a specific baud while creating a static serial port? I certainly give the requested 921600 bauds when I open the port using VISA open in my vi, but the setting with visaconf is still 460800, maximum possible from the scroll down menu.
I will add the last attachement (the one when linux failed) to the next message, its 9MB not sure if I am allowed to attache such a large file. I shoudl probably change the timeout specs.
Thanks a lot for all your help
Thomas

0 项奖励
14 条消息(共 26 条)
2,521 次查看
Here is the last file using the Basics Serial vi with the linux error (1s timeout setting now its only 950K).
And then there are the two files using our vi (wavevi). The error in linux and the run under windows.
Thanks

Thomas
0 项奖励
15 条消息(共 26 条)
2,520 次查看
Hi Fusselpelusa,

I'm still looking at the NI-Spy captures to figure out what's going on. It seems like the
Capture_windows_0ms.spy file does not work fully, it only loads some of the calls. Please recapture that, and reupload to the forum.

"For windows I am not getting any read for 50ms, for 0ms occasionally there is the right bytes on the port. If there is any, it is the right configuration though. "
What do you mean by this? Are you saying that sometimes it does not work in Windows also?
Rasheel
0 项奖励
16 条消息(共 26 条)
2,487 次查看
Hi.
here is the capture file again. The reason that Windows is not always responding is only by using the Basics read/Write vi . This is due to the matter our vi always waits until there are bytes no matter when they come, and the simple serial vi has only a couple of ms open port. But when our bytes happen to be in this opnening window, they are correc. So this is  no matetr of concern.
Thanks
Thomas

0 项奖励
17 条消息(共 26 条)
2,481 次查看
Hi Thomas,

Thanks for reattaching the Windows capture file. It looks like for some reason in Linux the VISA Get Attribute returns that there are 19 bytes in the buffer, when there should only be 17 bytes. It is trying to read 2 extra bytes but these 2 bytes do not exist, which is why it times out. You had mentioned exactly this earlier and that's what it looks like.

I'm not sure what's going in Linux, I'll take a bit more of a look and let you know what I think. This could be some sort of an incompatibility between the USB-Serial bridge, and our Linux VISA drivers.

I'll let you know what I find out!
Rasheel
0 项奖励
18 条消息(共 26 条)
2,441 次查看
Hi Thomas,

I'm still looking into this and need some more information. What version of NI-VISA are you using, and what Linux distribution and kernel do you have installed?

Let me know, thanks!
Rasheel
0 项奖励
19 条消息(共 26 条)
2,422 次查看
Hi Rasheel,
thanks for the help. I am using Mandriva 2007.1 with VISA 4.3., Labview 8.2, Kernel 2.6.17-13mdv.
Thomas
0 项奖励
20 条消息(共 26 条)
2,417 次查看