Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

GPIB instruments read and write

How to read data from a GPIB when sending a command.
I'm using Signal generator SMY02 and power meter from Rohde and schwarz.
I am trying to read and write data to above mentioned instruments.now my questions are? When I write command such
as "*IDN?" to the GPIB device signal generator , everythings is fine and I can read what the
GPIB device return me. But when I send a command like RF 23 MHZ or Level 5DBM the writing seems to be okay, but when I try to read the data, I
alway get a "Timeout expired before operation completed" error message. I
have tried with the Instrument asisstant in labview express but the result are the same with both.
i am sending the VI. moreover in powermeter i am even not able to write *IDN? c
ommand.i am using the address28 for the signal generator and address 13 for the power meter.
thanks for your help.
regards
0 Kudos
Message 1 of 6
(4,877 Views)
Sending this VI doesn't help much since it is just a generic GPIB Write and Read that I know works just fine. What are the actual commands that you are sending to the instrument and expecting to read data back? "RF 23 MHZ" does not seem valid. Most instruments these days require a "?" at the end of the command to send data back to the controller. Have you looked in the instrument manual and verified the commands? Is IDN? a supported command? Who is the manuafacturer of the SMY02 and what is the model number of the R & I instrument? Have you done a scan for instruments in MAX and verified that they are detected and that the addresses are correct?
Message 2 of 6
(4,877 Views)
Thanks for detailed reply. yes i have gone throgh instrument manual.yes IDN? is supported command. Rohde & schwarz is the manufacturer.i attached the pdf file for instrument details.
i have done scan for instruments in Max. in Max it is the same like in this generic VI.
moreover in MAX i am not getting a reply from power meter. i give GPIBaddress 13 for power meter and GPIB address 28 for signal generator.
ok now please tell me how should i proceed?
Download All
0 Kudos
Message 3 of 6
(4,877 Views)
I've looked through the R&S manual and was unable to find the *IDN? command. If I've missed it, could you tell me on what page it is? There is a command "ZV" that should return an identification string. Try that and see if you get a response. You should also download the driver for it. There is a link to it here.
0 Kudos
Message 4 of 6
(4,877 Views)
Thanks Denis, i downloaded the driver and now the command ZV when i send to the power meter.in reply of this power meter also sends identification string.
but my another question was, when i send the command RF 200 MHz to signal generator. i dont recieve any reply string from signal generator SMY02.and i get the above mentioned error.if there some value on signal generator like 23 MHZ and 3DBM value in amplitude display and i want to read these values from signal generator or some value value from power meter what string i must send to these instruments. this is that i would like to know.
Regards
0 Kudos
Message 5 of 6
(4,877 Views)
You're not supposed to receive anything back when you send a command. A GPIB instrument will not automatically echo back a command you just sent it. Most instruments do have a separate query command if you wish to use them. As I stated earlier, most of these commands are terminated with a "?" at the end. Section 3.3.2 of the manual lists the supported queries. For example, you would write an RF? and then do a read to determine the frequency setting.

Just like the other instrument, there is a LabVIEW driver available here. However, queries for instrument settings are not oftern included in drivers. The sim
ple reason for this is that since you are sending the parameters to the instrument, you already know how it is setup and there is seldom any need to do a read back.

For reading the power meter, the only thing I can suggest is that you use the RSNVRS Measure VI in the driver. It looks like the instrument must receive a trigger command first and then the command "N0" is sent. The response requires a bit of parsing to get something. This appears to be a very old instrument as the command set is very non-intuitive and you have to hope that R&S wrote the driver correctly.
0 Kudos
Message 6 of 6
(4,877 Views)