SRS Labs SR530 manual Program Example IBM PC, Microsoft C v3.0, via RS232, #include stdio.h

Page 53

Program Example 3:

IBM PC, Microsoft C v3.0, via RS232

Machine language routines to interface to the COM1: RS232 port are provided in the file RS232.OBJ found on the SR575 disk. These routines allow for simple interfacing to the SR530 at 19.2 kbaud from C programs.

#include <stdio.h>

To use these routines, the large model must be used. Compile with the /AL switch and link with RS232.OBJ.

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.

/*

Compile with >MSC program name/AL;

 

link with RS232.OBJ (on

SR565 disk)

 

RS232.OBJ defines:

 

 

init ()

 

 

 

Initializes COM1: to 19.2 kbaud

 

txstr (str);

str must terminate with ′$′ char

 

Char *str;

 

 

Sends string str to COM1:

 

rxstr (str);

str must be declared with 15 characters

 

 

or more length.

 

 

Fills str with string received from COM1:

 

If an error occurs, your procedure nocom() is called.

 

Nocom() must be a

C procedure in your program.

 

Example program to read

the SR510 outputs and ramp the x6 analog

 

Output using Microsoft C v3.0 (large model) and the COM1: port.

 

Set all switches in SW2

to UP on SR530 for 19.2 kbaud.

The ramp on x6 can be watched by setting the SR530 display to D/A.

*/

main ()

{

char str1[20], str2[20], STR3[20]; float v1,V2,x;

init ();

/* init

COM1: port to 19.2 kbaud */

txstr (″w0$″);

/* set character interval to 0 */

x = 0;

 

 

while (1)

 

 

{

 

 

txstr (″q1$″);

/* read

channel 1 output */

rxstr (str1);

/* into

str1 */

sscanf (str1, ″%f″, &v1);

/* scan str1 for a float variable */

49

Image 53
Contents Model SR530 Page Table of Contents Appendix C Gpib NON-OPERATING OperatingPage SR530 Specification Summary Gpib DemodulatorFront Panel Summary Enbw Abridged Command List Status Byte Definition Configuration SwitchesSignal Filters Signal InputsSR510 Guide to Operation Front Panel SensitivityStatus Dynamic ReserveDisplay Select Channel 1 DisplayOutput Channel OutputRel Channel Offset ChannelChannel 2 Display Expand ChannelRcosø Output Auto Phase Trigger Level Rsinø OutputReference Input Phase Controls Reference ModeReference Display Time ConstantLocal and Remote PowerDefaults SR530 Guide to Operation Rear Panel Page SR530 Guide to Programming Command SyntaxCommunicating with the SR530 Front Panel Status LEDsTry-Out with an Ascii Terminal RS232 Echo and No Echo OperationLOW Norm High SR530 Command ListN1,n2,n3,n4 Page Bit ErrorsStatus Byte Trouble-Shooting Interface Problems ResetCommon Hardware Problems include Common Software Problems includeSR530 with the Gpib Interface SR530 with the RS232 InterfaceSR530 with Both Interfaces Serial Polls and Service RequestsGpib with RS232 Echo Mode Measurement Example Lock-in TechniqueShielding and Ground Loops Understanding the SpecificationsPage Page SR530 Block Diagram Phase Sensitive Detectors Signal ChannelReference Channel DC Amplifiers and System GainCircuit Description Demodulator and Low Pass Amplifier Reference OscillatorExpand Analog Output and ControlFront Panel Microprocessor ControlGpib Interface Power SuppliesRS232 Interface Calibration and Repair Multiplier AdjustmentsAmplifier and Filter Adjustments Replacing the Front-End Transistors Notch FiltersNon-Essential Noise Sources Appendix a Noise Sources and CuresPage Page Appendix B Introduction to the RS232 Case 1 The Simplest ConfigurationBaud Rate Case 2 RS232 with Control LinesParity Stop BitsVoltage Levels Final TipBus Description Appendix C Introduction to the GpibProgram Example IBM PC, Basic, via RS232 Appendix D Program ExamplesProgram Example IBM PC, Microsoft Fortran v3.3, via RS232 Page #include stdio.h Program Example IBM PC, Microsoft C v3.0, via RS232Page Program Example 4 IBM PC,Microsoft Basic, via Gpib ′INCREMENT X6 Output by 2.5 MV Program Example HP85 via Gpib Documentation PC1 Oscillator Board Parts ListSW1 DpdtBR1 Main Board Parts ListBR2 BT1SR530 Component Parts List SR530 Component Parts List PIN D 22U MINGpib Shielded 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 Static RAM, I.C Z80A-CPUTranscover TIE AnchorMica #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.