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

Visa Serial Control

已解决!
转到解答

I am attempting to communicate with a Neslab Chiller. The instrument takes hexadecimal commands. In NI VISA Interactive Control I am able to communicate and get the correct responses back from the instrument. Unfortunately, when I attempt to communicate in labview using VISA read and write I keep getting a VISA read error (a timeout error) and the instrument cannot be controlled. I know there is some weird catch with having to different programs calling the same instrument, so I make sure every time to just labview open and not NI VISA Interactive Control. I also am very careful to match the baudrate, parity, last bit, and end mode for the read and write commands. I have attached images of the NI VISA Interactive Control Settings that were successful as well as my thus far unsuccessful labview vi. Please help me! Thank you in advance!

0 项奖励
1 条消息(共 21 条)
6,696 次查看

I am attempting to communicate with a Neslab Chiller. The instrument takes hexadecimal commands. In NI VISA Interactive Control I am able to communicate and get the correct responses back from the instrument. Unfortunately, when I attempt to communicate in labview using VISA read and write I keep getting a VISA read error (a timeout error) and the instrument cannot be controlled. I know there is some weird catch with having to different programs calling the same instrument, so I make sure every time to just labview open and not NI VISA Interactive Control. I also am very careful to match the baudrate, parity, last bit, and end mode for the read and write commands. I have attached images of the NI VISA Interactive Control Settings that were successful as well as my thus far unsuccessful labview vi. Please help me! Thank you in advance!

0 项奖励
2 条消息(共 21 条)
6,704 次查看

The backslashes seem to be wrong.... depending on the setup, this could lead to escaping.

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 项奖励
3 条消息(共 21 条)
6,694 次查看

Double Post

 

EDIT: Moderator took care of this

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 项奖励
4 条消息(共 21 条)
6,690 次查看

What do you mean by escaping?

0 项奖励
5 条消息(共 21 条)
6,684 次查看

Also, I read here http://digital.ni.com/public.nsf/allkb/19B075803E013125862575CF006B37F8

that this is the proper format for a hexadecimal command in VISA

ex. \CA\00\01\F0\02\00\FA\12

0 项奖励
6 条消息(共 21 条)
6,673 次查看

I created a link with that word. If you want to know what that is, follow the link.

 

If no escaping takes place, the number of bytes (and used symbols) is not correct due to the backslashes. Please remove them and retry if it works.

 

EDIT: Ah, i see where you got that from. Remark that it clearly states "Earlier version of VISA" and additionally each backslash is followed by a small x (indicating \x as "the following two characters represent a single hexadecimal value of a single byte"). You do not have that small x's in there and i doubt that current VISA uses this terminology.

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 项奖励
7 条消息(共 21 条)
6,671 次查看

In your "Interactive control", I see you have the setting for send End termination on writes.  That is probably either a carriage return or line feed.

 

In your VI, you don't send any termination character.  Actually, you explicitly set ASRL End Out to None.

 

So your device is waiting for a termination character in the command you are sending it, and it never comes., so it never responds.  Thus your VISA Read is waiting on a response that is never sent from the device.

0 项奖励
8 条消息(共 21 条)
6,670 次查看

If Ravens remark does not provide the solution, you have to modify the code additionally. Currently (with the backslashes), you are sending out a total of 26 bytes. But i think you want to send only 8 bytes.

The reason for this discrepancy is that you are defining a string with 26 characters instead of a hexadecimal number displayed as a hexadecimal string. Never checked if VISA Write makes an automated check if the string is build as hexadecimal string....

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 项奖励
9 条消息(共 21 条)
6,639 次查看

I went back to Visa Interactive to check the settings and have attached them here. When I change the end mode for writes to "none" then the termination character option is no longer an option. I attached the Visa communication from interactive if that helps.

 

When I match exactly these settings in labview vi I still get the following error on my read...

-1073807339 error

Also, when I use the light bulb to track progress it always say "OK" on Visa write.

0 项奖励
10 条消息(共 21 条)
6,630 次查看