SRS Labs Lock-In Amplifier Appendix D Program Examples, Program Example IBM PC, Basic, via RS232

Page 50

Appendix D:

Program Examples

All of the program examples which follow do the same thing, only the computer, language, or interface is changed. The programs read the Channel 1 and 2 Outputs and write the results to the computer screen. In addition, the X6 analog output port is ramped from 0 to 10V.

Program Example 1:

IBM PC, Basic, via RS232

In this example, the IBM PC's ASYNC port (known as COM1: or AUX: to DOS users) will be used to communicate with the SR530. Only two wires between the IBM PC's ASYNC port and the SR530 are needed (pins #2 & #3 of the RS232), but pins 5,6,8 and 20 should be connected together on the connector at the IBM end.

10 ′ EXAMPLE PROGRAM TO READ THE SR510 OUTPUT AND RAMP THE X6 ANALOG OUTPUT 20 ′ USING IBM PC BASICA AND THE COM1: RS232 PORT.

30 ′ THE RAMP ON X6 CAN BE WATCHED BY SETTING THE SR530 DISPLAY TO A/D.

40

50

60′ ON THE REAR PANEL OF THE SR530, SET SWITCH #1 OF SW2 DOWN

70 ′ AND ALL OTHER SWITCHES IN SW2 UP. (9600 BAUD, NO PARITY)

80

90 OPEN ″COM1:9600,N,8,2,CS,DS,CD″ AS #1

 

100

′ SET UP COM1: PORT TO 9600

BAUD, NO PARITY,

8 DATA BITS, 2 STOP BITS,

110

IGNORE

CTS

(CLEAR TO SEND),

DSR (DATA SET READY),

120

AND CD

(CARRIER DETECT).

 

130

140 PRINT #1, ″ ″ ‘CLEAR UART BY SENDING SPACES

150PRINT #1, ″Z″ ′RESET SR530

160

FOR

I = 1 TO 200: NEXT

I

′WAIT FOR RESET TO FINISH

170

 

 

′INIT

X6 OUTPUT TO ZERO

180

X

=

0

190

200

PRINT #1,

″Q1″

′READ OUTPUT

210

INPUT #1,V1

′INTO V1

220

PRINT

#1,

″Q2″

′READ

OUTPUT

230

INPUT

#1,V2

′INTO

V2

240

250

PRINT ″CH1 = ″;V1;″

CH2 = ″;V2

260

 

′INCREMENT X6

OUTPUT BY 2.5 MV

270

X =X

+ .0025

280

IF X

> 10 THEN X = 0

′RESET X6 RAMP

290

PRINT #1, USING ″X6, ##.###″;X

′SET X6 OUTPUT VOLTAGE

300

 

′LOOP FOREVER

 

310

GOTO

200

 

46

Image 50
Contents Model SR530 Page Table of Contents Appendix C Gpib Operating NON-OPERATINGPage SR530 Specification Summary Demodulator GpibFront Panel Summary Enbw Abridged Command List Configuration Switches Status Byte DefinitionSR510 Guide to Operation Front Panel Signal InputsSignal Filters SensitivityDisplay Select Dynamic ReserveStatus Channel 1 DisplayRel Channel OutputOutput Channel Offset ChannelChannel 2 Display Expand ChannelRcosø Output Auto Phase Trigger Level Rsinø OutputReference Input Reference Display Reference ModePhase Controls Time ConstantLocal and Remote PowerDefaults SR530 Guide to Operation Rear Panel Page Communicating with the SR530 Command SyntaxSR530 Guide to Programming Front Panel Status LEDsRS232 Echo and No Echo Operation Try-Out with an Ascii TerminalSR530 Command List LOW Norm HighN1,n2,n3,n4 Page Bit ErrorsStatus Byte Common Hardware Problems include ResetTrouble-Shooting Interface Problems Common Software Problems includeSR530 with the RS232 Interface SR530 with the Gpib InterfaceSR530 with Both Interfaces Serial Polls and Service RequestsGpib with RS232 Echo Mode Lock-in Technique Measurement ExampleUnderstanding the Specifications Shielding and Ground LoopsPage Page SR530 Block Diagram Reference Channel Signal ChannelPhase Sensitive Detectors DC Amplifiers and System GainCircuit Description Reference Oscillator Demodulator and Low Pass AmplifierFront Panel Analog Output and ControlExpand Microprocessor ControlGpib Interface Power SuppliesRS232 Interface Calibration and Repair Multiplier AdjustmentsAmplifier and Filter Adjustments Notch Filters Replacing the Front-End TransistorsAppendix a Noise Sources and Cures Non-Essential Noise SourcesPage Page Baud Rate Case 1 The Simplest ConfigurationAppendix B Introduction to the RS232 Case 2 RS232 with Control LinesVoltage Levels Stop BitsParity Final TipAppendix C Introduction to the Gpib Bus DescriptionAppendix D Program Examples Program Example IBM PC, Basic, via RS232Program Example IBM PC, Microsoft Fortran v3.3, via RS232 Page Program Example IBM PC, Microsoft C v3.0, via RS232 #include stdio.hPage Program Example 4 IBM PC,Microsoft Basic, via Gpib ′INCREMENT X6 Output by 2.5 MV Program Example HP85 via Gpib Documentation SW1 Oscillator Board Parts ListPC1 DpdtBR2 Main Board Parts ListBR1 BT1SR530 Component Parts List SR530 Component Parts List Gpib Shielded 22U MINPIN D CX1MPSA18 CY1FU1 SR530 Component Parts List SR530 Component Parts List SR530 Component Parts List SR530 Component Parts List SR530 Component Parts List SR513 Assy SPSTX84PDT SR530 Component Parts List Z80A-CPU Static RAM, I.CMica TIE AnchorTranscover #4 FlatFront Panel Board Parts List RED LD3 LD1LD2 Quad Board Parts List SR530 Component Parts List PC1 SR530 Component Parts List Miscellaneous Parts List SR530 Component Parts List

SR530, Lock-In Amplifier specifications

The SRS Labs Lock-In Amplifier, model SR530, is a powerful tool designed for high-precision measurements in the realm of scientific research and industrial applications. This state-of-the-art instrument excels in extracting small signals from noisy environments, making it an invaluable asset for experiments in fields such as physics, engineering, and materials science.

One of the main features of the SR530 is its ability to perform synchronous detection, which is key to improving signal-to-noise ratios. By utilizing a reference signal, the device correlates the incoming signal with the reference to effectively filter out noise, allowing for the accurate measurement of weak signals that might otherwise be obscured. This process of phase-sensitive detection is fundamental to the operation of the Lock-In Amplifier.

The SR530 offers a wide frequency range, covering from 0.1 Hz to 100 kHz. This broad frequency response allows it to handle a diverse array of signals, making it suitable for various applications including optical detection, capacitance measurements, and in many cases, voltammetry. The device is also equipped with multiple inputs and outputs, facilitating the integration with other laboratory equipment and enabling complex experimental setups.

Precision is further enhanced with its adjustable time constant, which allows users to optimize the response time based on experimental needs. The user can choose time constants from 10 microseconds to 10 seconds, accommodating fast dynamic measurements as well as those requiring stability over longer durations.

Another remarkable characteristic of the SR530 is its digital processing capabilities. The device features a highly accurate digital voltage measurement system, minimizing drift and ensuring long-term stability. Additionally, the use of microprocessors enhances data handling and allows for features such as programmable settings, facilitating automated measurements.

Moreover, the SR530 includes a range of output options, including analog outputs, which can be used for direct signal processing, as well as digital interfaces for integration with computers. This ensures that users can not only capture high-fidelity data but also analyze and display it efficiently.

In conclusion, the SRS Labs SR530 Lock-In Amplifier stands out due to its sophisticated technology, versatile features, and robust performance. Its precision, flexibility, and ease of use make it an ideal choice for researchers and engineers looking to unlock the potential of weak signal measurement in complex environments.