Set EOIMode using VisaDev to avoid error from *IDN?

조회 수: 3 (최근 30일)
Corey
Corey 2024년 5월 13일
편집: akshatsood 2024년 7월 16일
It appears that the Visadev function performs a *IDN? when trying to open the connection to a GPIB instrument. This allows it to populate the the information such as model, etc. The issue is that some instruments do not support *IDN? and of those instruments there are some that need the EOIMode set to off in order to function correctly.
So is there a way to suppress sending the *IDN? when using the visadev or is there a way to specify the identity command it is using? Also, is there a way to set the EOIMode before calling visadev? Because it seems like the only way this works now is that you call visadev to connect to the device, it errors out because it needs EOIMode off first and it did not understand what *IDN? command was. At this point you would have to clear the error on the instrument caused by sending an unknown command each time a connection was made.

답변 (1개)

akshatsood
akshatsood 2024년 7월 16일
편집: akshatsood 2024년 7월 16일
Dear @Corey,
I understand that you are looking out for a way to supress sendin "*IDN?" when using visadev or chaning the idenification command.
  1. Suppressing the *IDN? Command: Unfortunately, the "visadev" function sends the *IDN? command to identify the instrument upon opening the connection. There is no built-in way to suppress this behavior..
  2. Setting EOIMode Before Connecting: As you noted, setting the EOIMode before connecting is not straightforward because the connection attempt happens as soon as visadev is called. To work around this, I beleive a possible approach is to use a different method to establish a low-level connection like "gpib". Though please note that, use of "gpib" will be discontinued in upcoming releases.
Also, the Instrument Control Toolbox™ "instrhwinfo" function uses the instrument identification commands as defined by "instrid" when locating and identifying instruments. By default, Instrument Control Toolbox software uses the command *IDN?, which identifies most instruments. However, some instruments respond to different identification commands such as *ID? or *IDEN?.
If "instrhwinfo" does not identify a known instrument, use "instrid" to specify the identification commands the instrument will respond to. If "instrid" returns no commands, an instrument cannot be found.
For more information on "instrid", please refer to the following documentation
I hope this helps.

카테고리

Help CenterFile Exchange에서 Instrument Control Toolbox에 대해 자세히 알아보기

제품


릴리스

R2023a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by