gongjigongyi.com

与米乐m6网页版登录入口代表实时聊天。 工作时间:上午 9:00 - 下午 5:00(太平洋标准时间)。

电话

致电我们

工作时间:上午9:00-下午5:00(太平洋标准时间)

下载

下载手册、产品技术资料、软件等:

下载类型
型号或关键字

反馈

Remote Operation: Why do I get a VISA timeout (BFFF0015) using RS-232 with a SourceMeter?

问题:

Remote Operation: Why do I get a VISA timeout (BFFF0015) using RS-232 with a SourceMeter?

答案:

Product(s) :
 SourceMeter Instruments: 2400, 2410, 2420, 2425, 2430, 2440


Question : Why do I get a VISA timeout (BFFF0015) using RS-232 with a SourceMeter?


Answer: When programming a SourceMeter through the VISA layer into RS-232, the use of SCPI commands is required. However, there are additional subtle requirements when the communication bus is not a GPIB bus: you must add a termination character like a Line feed (LF) or a carriage return (CR). By default the SourceMeter ships with the RS-232 TERMINATOR set to <CR> i.e. carriage return, but it can be set to other values (LF, CR+LF, etc).

To accomplish this, there are two approaches that can be taken: explicitly append a terminator onto the end of each command you will send (viWrite), or set a global attribute of the VISA session to automatically append a terminator.

For an RS-232 based session, the VI_ATTR_ASRL_END_OUT attribute controls the method used to terminate write operations. This attribute is set to VI_ASRL_END_NONE by default. To have a terminating character automatically appended, you can change this behavior. Below is a typical command line for VB:

status = viSetAttribute(sesn, VI_ATTR_ASRL_END_OUT, VI_ASRL_END_TERMCHAR)

This will cause a terminator, defined by the VI_ATTR_TERMCHAR attribute, to automatically be appended onto the end of each string written with the viWrite command. The default value of VI_ATTR_TERMCHAR is a Line Feed (hex value 0A). This default value can be changed to carriage return or what ever the instrument is configured, via front panel setups, to use.

Similar programmatic control of these session attributes can be asserted from any programming language; for example, use a property node in LabVIEW to set individual attributes of an open VISA session.

While on the topic of setting attributes, setting the VI_ATTR_TERMCHAR_EN from it's default value of false to a true will allow read operations to terminate as soon as the VI_ATTR_TERMCHAR is received during a viRead. Otherwise, the viRead function will not return until the specified timeout period (VI_ATTR_TMO_VALUE) expires. In that case, you'll get an error message like below and your program will execute slowly.

-10738077339 which is Hex 0xBFFF0015 Timeout expired before operation completed."

For applications using IVI or VXI/PnP drivers, you do not need to add any terminator unless you are using the low level KE24xx Write Instrument Data function to send SCPI commands. With the KE24xx Write Instrument Data function you must add a terminator when the underlying communication bus is not GPIB (which asserts an EOI to terminate reads/writes).

 


©Copyright 2003, Keithley Instruments, Inc.


此常见问题适用于:

产品系列: 2400 图形化系列 SMU

产品:

常见问题 ID 72011

查看所有常见问题 »