Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

initialize error on Tektronix TBS1072C

Hi, there is an error in the initialization vi in library "Tektronix TBS 2000 Series", version 2020 and 2021, check the expected response form *idn? query

0 Kudos
Message 1 of 4
(121 Views)

My first response would be that you are missing the return character during the NI-VISA write.

  • *IDN?\n
  • or *IDN?;
  • Either the newline (\n) or the semicolon (;) allows the instruments' command interpreter to detect the end of a command and process it accordingly.

 

Next, you need to add probes:

  • Probe the error all the way from the OPEN until after the CASE.
  • Probe the Read Buffer response.

 

This should provide you with insight as to where the issue may be occurring.

Help the Community (and future reviewers) by marking posts as follows:
If it helped - KUDOS
If it answers the issue - SOLUTION
0 Kudos
Message 2 of 4
(94 Views)

The instruments respond at "*idn?" query, but the prefix string in the subvi (TEKTRONIX,TBS1072C\nTEKTRONIX,TBS1072C\n)  is wrong, must be "TEKTRONIX,TBS1072C"

0 Kudos
Message 3 of 4
(91 Views)

That code is using an asynchronous VISA Read and as such will NOT gather anything after the termination character which would include the newline (\n) character.  You will need to update the value in the Array.

 

It would be easier if the array was built through a config file rather than needing to update the code each time a new instrument is added.

Help the Community (and future reviewers) by marking posts as follows:
If it helped - KUDOS
If it answers the issue - SOLUTION
0 Kudos
Message 4 of 4
(83 Views)