AnsweredAssumed Answered

AW: Re2: vrf GPIB error --*OPC?

Question asked by VRFuser on Dec 7, 2007

Snippet from Agilent web site:



Using *OPC?

--------------------------------------------------------------------------------

When you programmatically setup an instrument for an operation, you typically send multiple instrument commands. Most instruments are able to buffer multiple commands. Allowing the instrument to receive new commands, even though a previous command is not yet completed.

This code sends several commands to an instrument.

With DMM
   .WriteString "*RST"
   .WriteString "*CLS"
   .WriteString "*ESE 1"
   .WriteString "*SRE 32"
End With
Provided the instrument can complete all these commands before an additional conflicting command or query is sent, the code will work as anticipated. A better way to send a block of commands is to have the instrument report when the block is complete before sending additional commands. The SCPI standard provides the *OPC? query that you can use to ensure the instrument has completed all operations before your program continues.

An instrument responds to the *OPC? query by setting a "1" in the output buffer after all received commands have completed. This allows you to synchronize your program and the instrument operation.

With DMM
   .WriteString "*RST"
   .WriteString "*CLS"
   .WriteString "*ESE 1"
   .WriteString "*SRE 32"
   .WriteString "*OPC?"    ' Assure syncronization
   strTemp = .ReadString   ' Discard returned value
End With
Note that using the *OPC? query holds the I/O bus until the instrument commands have been completed. It may not be acceptable to hold the GPIB bus when you are controlling multiple instruments. In those cases use the *OPC bit in the Standard Event register and implement some form of status reporting system. An example using the *OPC bit is provided in the Using SRQ Events section.

Related Links

Synchronizing Instrument I/O with *OPC?, SRQ, and polling If you have worked through the other section in this series, you have probably come to realize that, in addition to exchanging data, you need control when the exchange takes place.




-----Ursprüngliche Nachricht-----
Von: Baranski, Detlef
Gesendet: Freitag, 7. Dezember 2007 10:55
An: 'Stan Bischof (Richard S)'; VRF
Betreff: AW: Re[2]: [vrf] GPIB error

Why not using the Operation Complete Command  ( *OPC?)  to make sure ?

-----Ursprüngliche Nachricht-----
Von: Stan Bischof (Richard S) [mailto:rsb@soco.agilent.com]
Gesendet: Donnerstag, 6. Dezember 2007 18:16
An: VRF
Cc: vrf@agilent.com
Betreff: Re[2]: [vrf] GPIB error

"Ed Shaw" <eshaw@comtechefdata.com> wrote:

> Recently I've seen a RF power meter that will freeze(comm timeout if
> you try to communicate with it) when the power to the sensor goes below a given level.
> Then when the RF power going to the sensor is increased all is well
> again. In this case my small delay between the query and read command
> mentioned above was of no help.

At low enough power levels some power meters can take a very long time to settle-- and this results in comm timeouts if you haven't set the timeout long enough.

Check your power meter and see how long it takes to settle at the low power levels you refer to. It may well be longer than the timeout you have set in VEE.

Stan


--------------------------------------------------------------------------
Stan Bischof  Agilent Technologies  707-577-3994  stan_bischof@agilent.com
--------------------------------------------------------------------------

---
You are currently subscribed to vrf as: Detlef.Baranski@pilkington.de To subscribe please send an email to: "vrf-request@lists.it.agilent.com" with the word subscribe in the message body.
To unsubscribe send a blank email to "leave-vrf@it.lists.it.agilent.com".
To send messages to this mailing list,  email "vrf@agilent.com". 
If you need help with the mailing list send a message to "owner-vrf@it.lists.it.agilent.com".
Search the "unofficial vrf archive" at "http://www.vrfarchive.com/vrf_archive".
Search the Agilent vrf archive at "http://vee.engineering.agilent.com".


Der Inhalt dieser E-Mail (inkl. aller Anlagen) ist vertraulich und ausschließlich für den Adressaten bestimmt. Jede Art der Verbreitung, Nutzung oder Vervielfältigung ist untersagt. Sollten Sie diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und löschen die E-Mail.

Unternehmensangaben der Gesellschaften mit Sitz in Deutschland:

Pilkington Holding GmbH, Haydnstraße 19, 45884 Gelsenkirchen
Sitz: Gelsenkirchen, Amtsgericht Gelsenkirchen HRB 8997
Geschäftsführung: Jochen Settelmayer (Vorsitz), Dr. Clemens Miller, Thomas Kretschmann, Robert Hales Vorsitzender des Aufsichtsrates: Dr. Axel Wiesener

Pilkington Deutschland AG, Haydnstraße 19, 45884 Gelsenkirchen         
Sitz: Gelsenkirchen, Amtsgericht Gelsenkirchen HRB 2707
Vorstand: Dr. Clemens Miller, Jochen Settelmayer Vorsitzender des Aufsichtsrates: Dr. Axel Wiesener

Pilkington Automotive Deutschland GmbH, Otto-Seeling-Straße 7, 58455 Witten
Sitz: Witten, Amtsgericht Bochum HRB 8443
Geschäftsführung: Thomas Kretschmann
Vorsitzender des Aufsichtsrates: Jochen Settelmayer

Bauglasindustrie GmbH, Hüttenstraße 33, 66839 Schmelz / Saar
Sitz: Schmelz / Saar, Amtsgericht Saarbrücken HRB 52020
Geschäftsführung: Manfred Ebbers



---
You are currently subscribed to vrf as: ming_meng@agilent.com To subscribe please send an email to: "vrf-request@lists.it.agilent.com" with the word subscribe in the message body.
To unsubscribe send a blank email to "leave-vrf@it.lists.it.agilent.com".
To send messages to this mailing list,  email "vrf@agilent.com". 
If you need help with the mailing list send a message to "owner-vrf@it.lists.it.agilent.com".
Search the "unofficial vrf archive" at "http://www.vrfarchive.com/vrf_archive".
Search the Agilent vrf archive at "http://vee.engineering.agilent.com".

Outcomes