UVLabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to get errors form R&S AMIQ

Hello everyone.

Here is my objective:

I have a Rohde and Schwarz AMIQ used for waveform generation.

It has a GPIB port and if you ask it *IDN? it will respond with its model and serial number.

If you enter *TST?, the AMIQ will begin a self-test.

At the end of the tests, if you send SYST:ERR?, it will respond with the errors it found. You continually query it and it will continue to respond with errors until it reaches the end of the list. After which point, it will respond with "No Error."

As a beginner task, I want the user to have a drop down list of commands to send to the AMIQ. At this point, it's just *IDN? and *TST?

If, *TST? is sent, I want the program to wait 30 seconds, then issue VISA read commands to retrieve the errors. I would like those errors to be stored in to an array (I think).

Once "No Errors" is returned, then the program should end.

You can look at my attached VI. I put together what I thought would work, and, of course, it did not work.

I used an enum to feed a Case Structure inside of an Event Structure.

The *IDN? case is probably right. But, I can't figure out to remove the SYS:ERR? case (which doesn't need to be a case).

I attempted to use a Timed Sequencer to delay execution between when *TST? is issued and SYS:ERR? is issued and read.

Hopefully, someone can show me the error of my ways.

Thank you very much,

-Shawn

 

0 Kudos
Message 1 of 3
(5,076 Views)

Hi Shawn,

What do you think of the attached file.  Here is what I changed in it:

1. Removed outer while loop.  This loop would just run the command that was selected in the enum over and over again because the enum is outside the while loop.  It also seems like something you would only want to run once when called.

2. Added a search string function after the read function to see if there is "No Errors".  If that is found in the string then we are done.

3. Index the results on the output of the while loop to create the array of errors. (this one will include the "No Errors found")

 

Have you searched to see if there is a driver for the R&S instrument?  The driver will take care of a lot of these things for you.

 

Bryan Heslop

Endigit

0 Kudos
Message 2 of 3
(4,990 Views)

Hello there, Bryan.

I was out last Friday when you responded. I didn't get to try out your changes until late yesterday. I had to make a couple of changes, but it's now working.

And just to make sure I understand the concepts and how things work, I added an additional case of *OPT? to get the AMIQ to respond with its installed options. It works as well.

The VI is attached.

You asked about an R&S panel driver. I did a search, but there doesn't seem to be one specific for this model. But even if there was one for the AMIQ, I probably would not use it. The intent for me doing this is to understand what is going on. I completed the sections on Loops, and Case Statements, and State Machines. I wanted to experiment with those principles on something simple.

Thanks for your help. I wouldn't have been able to do it without you.

I hope this post helps someone,

-Shawn

0 Kudos
Message 3 of 3
(4,970 Views)