From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Read Sensitivity on SR830

Background:  I am using a Stanford Research SR830 to measure the magnitude and phase of some pressure transducers; the pressure transducers are piezoresistive with a Wheatstone Bridge configuration. The SR830 is recognized on MAX, and reads things like magnitude and phase upon request, and, although not needed, the 830 responds correctly to the configuration VI in which the frequency is set.  Hence, the communication link (GPIB) seems to be working.

 

Question:  while the 830 is set to "autogain," there is a circumstance in which knowing the sensitivity is required.  When I try using the 830 Read vi, set for one parameter, only predetermined parameters like magnitude or phase are permitted.  The instruction to read the sensitivity is "SENS?." but the Read vi seems to only allow predetermined integer values. I investigated using a VISA Read vi, and that input is the byte count..

 

I checked Knowledebase and other Discussion Forum threads, but those I read were oriented toward setting or reading the usual suspects, which I can do.

 

Any suggestions, and what obvious solution have I overlooked?  Having programmed HPIB machines decades ago, this really should not be difficult.

 

0 Kudos
Message 1 of 8
(3,400 Views)
The basics haven't changed in a couple of decades. You have to first write the command to the instrument before you do a read.
0 Kudos
Message 2 of 8
(3,377 Views)

Thanks for your suggestoin.  I will try that tomorro.

 

But, doesn't a Write command set a sensitivity?  The syntax for a Write to the 830 contains a number, 1 - 24, each representative of a particular sensitivity setting.  Since I am using "autogain,: the sensitivity will be changing over the duration of the acquisition.  Will each query for sensitivity need be preceded by a Write?

 

As I recall, in the days of HP equipment and HPIB, queries were made without writes, were they not?

 

Cheers,

david

0 Kudos
Message 3 of 8
(3,372 Views)
You need to look up some basic GPIB tutorials and read the instrument manual. With the SCPI standard, a command that ends with ? is a query - a command that tells the instrument to return data.

Your recollection is wrong. There is no difference between GPIB and HPIB and instruments have always been a write then read.
Message 4 of 8
(3,364 Views)

Thanks, Dennis.

 

I have the manual and used parts of NI examples that have worked without difficulty.  I'll again review the tutorial to see what I have forgotten; in preparation for this project, it was a month ago that I reviewed documents. 

0 Kudos
Message 5 of 8
(3,355 Views)

Well, Dennis, sometimes I am just a moron.  I was completely fixated on finding a way to request a value from one of the instrument driver vi's that I did not even consider looking elsewhere, like GPIB vi's.  After considering your messages, and using some examples when I actually had some GPIB devices connected, it was deead simple.  Thanks for your help, and next time I will try to keep tunnel vision in check.

0 Kudos
Message 6 of 8
(3,307 Views)
I would recommend that you actually use the VISA functions instead of the low level GPIB functions. With VISA, you can use the code with Ethernet, USB, serial, and GPIB connections. You are are also not limited to controllers from NI when you use VISA.
0 Kudos
Message 7 of 8
(3,299 Views)

Thanks again.  Changing the VI's to use VISA vi's will be good practice.

0 Kudos
Message 8 of 8
(3,277 Views)