LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview does not run with SCPI commands

Solved!
Go to solution

Hello there,

I have the problem that the R&S UPV Audio Analyzer does not understand the SCPI commands sent to it from an external PC (although a communication with the common commands works). As soon as I send a SCPI command to the audio analyzer, the error message: "-113, Undefined header" appears. For example:
I send: INSTrument ANLG (An SCPI command)
-> Error message on the analyzer: -113, Undefined header (INSTrument ANLG) (INSTrument ANLG).
I have the same problem with LabVIEW. As soon as i use a block there which represents a SCPI command(marked red in the picture) an error occurs.

SimonDietz_1-1626328804336.png

 

I have already changed the Remote Language to SCIP in the Audio Analyzer settings (Utilities->Config Panel). Basically a connection already works, because I get a feedback with a common command like "*IDN?" and a window "Remote Operation Active" opens on the display of the analyzer.

 

I've been stuck on this problem for a week and I'm not getting anywhere.

So I would be very happy about an answer.

 

0 Kudos
Message 1 of 24
(4,556 Views)

Hi Simon,

 


@User002 wrote:

I have the problem that the R&S UPV Audio Analyzer does not understand the SCPI commands sent to it from an external PC

As soon as I send a SCPI command to the audio analyzer, the error message: "-113, Undefined header" appears.
I have the same problem with LabVIEW.


So the problem is not with LabVIEW, but with your device!

No matter which software (or computer) you use the device always responds with an "error -113".

 

Does the R&S give this error for all SCPI commands? (I don't mind commands like "*IDN?", but all that stuff like "STATUS:…", see chapter 7 in the manual.)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 24
(4,547 Views)

fortunately most of the STATus commands work...

But when i use another command from chapter 7 in the manual like a command for the generator config (which are the important ones for me), it doesnt work.

Expample: "INSTrument1 ANLG", the typical error "-113, undefined header" occurs.

0 Kudos
Message 3 of 24
(4,510 Views)

Usually the device's menu structure follows the SCPI commands.

 

Can you select ANLG on the device thought the menu?

 

Maybe the command is "INST1:SEL ANLG"?

 

I'd definitely omit the uncapitalized characters. I think they should be optional, but the device might not play nice, or they might actually need to be capitalized (e.g. they're only printed small to indicate that they are optional).

0 Kudos
Message 4 of 24
(4,498 Views)

I'd agree with wiebe here, the command is probably INST1:SEL ANLG (maybe with braces), the full words are there just to tell you what it does.

0 Kudos
Message 5 of 24
(4,492 Views)

According to this manual here: https://www.rohde-schwarz.com/webhelp/upv_onlinemanual_en_1/Content/0a01b598082d47be.htm

 

the syntax is:

 

INSTrument<n1> <generator_type>

 

If you write INST or Instrument shouldn't matter, and it says that a missing <n1> parameter is interpreted as meaning 1 but what if you try:

 

INST1 ANLG;

 

Some SCPI instruments are quite picky in how they want the non minimalized form of the command written. Some accept any number of characters after the upper case part (which is the mandatory part to identify the command), some only accept either the short form or the full form and some require everything to be uppercase, despite the convention to document the SCPI commands with uppercase letters for the mandatory part (short form) and lowercase letters for the optional part (long form) of the command.

 

I even have had devices who would only work if the entire command was either long or short form but not if parts were in one form and others in the other.

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 6 of 24
(4,485 Views)

Hi,

I can select Instrument -> analog on the device in the menu.

In addition to that i can track the changes i make on the Audio Analyzer with the "Local SCPI Recorder" as SCPI code so that there is no spelling mistake. (In the picture you can see that i changed some options in the Generator config window and on the right side the Local SCPI Recorder wrote SCPI commands in parallel.

 

SCPI error.bmp

On the bottom left in the picture you can see the error which occurs.

0 Kudos
Message 7 of 24
(4,470 Views)

I tried every option on how to write the commands.... nothing worked

0 Kudos
Message 8 of 24
(4,466 Views)

If the vendor's software doesn't work, something else must be wrong.

 

How are you communicating? GIPB, RS232, Ethernet?

 

Perhaps the cable is broken or too long? Wrong baud rate, parity, etc. maybe?

 

EDIT: This would be weird, as you do get communication, but if only short messages work correctly, time outs, baud rates, cable length, etc could be a factor. 7 or 8 character bits might mean letters are send over correctly, but spaces won't. I'm guessing here. As you're seeing weird, unexpected things, the problem probably is weird and unexpected. Suspect anything.

 

EDIT2: USB2Serial converters or Ethernet2Serial converters could cause problems too. If you have any complexity going on, now is the time to tell.

0 Kudos
Message 9 of 24
(4,463 Views)

Hard to tell from your blurry pics but it looks like you are using the manufacturer's drivers from here:

UPV | Driver | Rohde & Schwarz (rohde-schwarz.com)

 

If that is so I agree with Wiebe.

 

I would highly suspect your hardware interface is the culprit.  What communication interface are you using?  If it's the standard SCPI over GPIB are you using an official NI GPIB card (or USB to GPIB module)?  Are you using good quality NI (or Agilent) GPIB cables?  The Rohde drivers should take care of all the interface software details so I would be focusing on the hardware side of things.

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019
0 Kudos
Message 10 of 24
(4,454 Views)