B&K 4070A user manual Appendix a, Hardware Setup

Page 77

Appendix A

Example remote control host program

This chapter contains an example program written in Microsoft QuickBasic for remotely controlling the 4070A. It can be used as a starting point for writing your own remote control applications.

The program illustrates several basic techniques for remotely controlling the 4070A with a control program. The program begins by showing how to detect the presence of the 4070A on the serial port. It also shows how to set the operating mode and enter parameters such as frequency and level. The program also parses information sent from the 4070A to the host computer and displays that information on the screen.

Hardware Setup

You must connect a serial cable between your computer and the RS-232 port connector on the rear of the 4070A. For more information on how to do this, refer to chapter 6.0.

The program assumes you are using serial port 1 (COM1). If you are using another serial port, change the OPEN COM1... statement in the beginning of this program. It also assumes that the 4070A baud rate is set to 9600. To check the 4070A baud rate, press the Mode then offset keys.

This example program switches the 4070A to DTMF Detection mode and displays the detected DTMF digits to the screen. To detect DTMF digits, the DTMF signal must be applied to the Ext Mod Input jack on the rear of the unit. A schematic diagram, which takes these tones from a telephone line, is shown below:

To

Telephone

Line

.001475K

200V

1%

 

Telco Tip

Telco Ring 475K

1%

.001

200V

115K

1%

115K

1%

-12V

 

4

2

LM741

6

3

7

 

 

+12V

To

Ext Mod In

Connector

Figure A-1: Telephone line amplifier

*** Caution ***

Do NOT connect the Ext. Mod In input directly to a telephone line. High voltages exist on a telephone line, which

will cause permanent damage to the 4070A.

This program does the following:

1.Clear the screen

2.Open the serial communications port for communicating with the 4070A.

3.Make sure there is a 4070A connected to the serial port. If we can't find one, wait until it is connected up.

4.Command the 4070A to generate 18.432 MHz at 0.0 dBm.

5.Wait for the user to press a key.

6.Switch the 4070A to DTMF Detection mode.

7.Wait for the 4070A to detect a DTMF digit and print it to the terminal.

72

BK Precision 4070A User Manual Rev.2.2

Image 77
Contents User’s Manual Page +K Precision Corp Model 4070A User’s ManualTable of Contents Remote operation Warranty informationArbitrary waveform system DC Operation OptionIntroduction Description Modes Feature summarySIG Out connector Installation and setupSync out connector External Modulation In connector External Trigger/Gating/FSK/BPSK input External Arb Sync In / Out connector External Reference Input / Ext Arb. Clock connectorRS232 Interface connector Line in connectorOperating controls and keys Mode keyField arrow keys Recall / Store keyÉ, ê, è, ç keys Trigger keyNumeric keys 0 to 9, MHz/dBm, KHz/Vp-p/Sec, Hz/mVp-p/mS keys One Touch Mode KeysClear key Operating guide Operating mode selectionChanging frequency Changing levelEntering a new value Changing valuesModifying an existing value Sinewave Mode 000,000.00 Hz 10.0 dBm Mode descriptionsBasic Sinewave CW Mode Internal AM Mode External AM Mode Parameters External AM ModeExternal AM Input gain 000,000.00 Hz PEP level -10.0 dBm Input GainInternal FM Mode Parameters Internal FM ModeInt FM 1,000 Hz Pk dev 10,000 Hz 000,000.00 Hz 10.0 dBm Peak Frequency DeviationExternal FM Pk dev 10,000 Hz 000,000.00 Hz 10.0 dBm External FM ModeExternal FM Mode Parameters Internal PM Mode Parameters Internal PM ModePeak Phase Deviation Int PM 1,000 Hz Pk dev 180 deg 000,000.00 Hz 10.0 dBmExternal PM Pk dev 180 deg 000,000.00 Hz 10.0 dBm External PM ModeExternal PM Mode Parameters Sweep Mode Sweep time Up / Down sweepInternal FSK Mode Parameters Internal FSK ModeMark Frequency Space FrequencyExternal FSK Mode Parameters External FSK ModeExt FSK Mark 1,000,000.00 Hz Space 2,000,000.00 Hz 10.0 dBm Ext FSK InputBurst frequency Burst Mode IntroductionBurst Mode Trig Ton 10,000 mS 000,000.00 Hz Off 10.0 dBm Internal SSB Mode Parameters Internal SSB ModeInt SSB 1,000 Hz Upper Sideband 000,000.00 Hz 10.0 dBm Upper/Lower Sideband selectionsExternal SSB Upper Sideband 000,000.00 Hz +10.0 dBm External SSB ModeExternal SSB Mode Parameters Dtmf generation # Duration 200 mS Delay Level -10.0 dBm Dtmf Generation ModeDtmf Generation Mode Parameters BackgroundDtmf Duration Dtmf DelayDtmf Detection Mode Parameters Dtmf Detection ModeDtmf detection on Ext Mod input 3 # a Dtmf detected digitsPower & Voltage Measurement Mode Parameters Power & Voltage Measurement ModePower Level Voltage LevelOther mode Arbitrary ModeRemote Mode Int Bpsk 1,000 Hz 000,000.00 Hz 10.0 dBm Internal Bpsk ModeInternal Bpsk Mode Parameters External Bpsk 000,000.00 Hz 10.0 dBm External Bpsk ModeExternal Bpsk Mode Parameters 10,000 Hz F2 Ton 000 mS Toff 10.0 Dualtone Generation ModeDualtone Examples Using the Data Modulation Mode Data Modulation ModeData Modulation Mode Parameters Baud RateExample Message Downloading Modulation Message DataSaving the Message Triggering the TransmissionVCO Mode Parameters Voltage Controlled Oscillator VCO ModeStart End 1,000,000.00 Hz 10.0 dBm End FrequencyChecking your connection with Hyper Terminal ConnectingRemote Operation Remote Control Programming Rules Remote Control OperationReset 4070A to Sine wave mode Remote Control Commands× Ø Returns CReport hardware and software versions K1.0 Enable, Disable front panel keys and rotary knobE1,0 Enable, Disable LCD echo to terminal F0-9 Move cursor to field 0 to Linear Trig Up Time 10,000 mS? or H Print help menu Return a CExample Remote Control ExamplesPin 9-pin cable Pin 25 pin cable adapter Arbitrary Waveform ModeQuick Start Guide Description of the Arbitrary Waveform Generator Introduction to the Arbitrary Waveform SystemFeature Summary Switching ModesFunction Generator Pulse GeneratorInt Clock / Ext Clock / Lock Master Lock slave mode Arbitrary Waveform ModePhase Continuous/Triggered modeFunction Gen Wave Pos Ramp Rep Freq 100,000 Hz 000 mV Function Generator ModeWaveform Repetition FrequencyDuty Cycle Pulse Generator ModePositive Only Downloading arbitrary waveforms Using WAVELOAD.EXESaving Arbitrary Waveforms Cwaveload /COMx /y /baudz filename.extUsing your own program Rules for Floating Point format Data FormatsFloating Point Format Example #2 Time & Value Floating Point FormatDigital Format Integer Format Example The data value E468 is handled as follows Hexadecimal FormatRules for Hexadecimal format Example Binary FormatRules for Binary format Generator Multiple Units LockingArb Phase Resolution More on Phase OffsetsStarting Address = Number of waveform points * Phase Offset Waveform Size RestrictionsProgram Listing ARB.BAS Example Arb ProgramClose System Subroutines Return Print #1, a Send integer value to 4070A Return Return DC Operation Option Wiring DiagramOperating Modes 4070A SpecificationsRemote Software CDAppendix a Hardware SetupCLS CLS Print Print Subroutines END SUB Appendix B Television Remote Control ExampleCLS Make sure a 4070A is attached to the serial port Print Limited Two-Year Warranty Service Information Savi Ranch Pkwy Yorba Linda, CA 92887 USA TEL