B&K user manual Make sure a 4070A is attached to the serial port

Page 84

'-----------

Make sure a 4070A is attached to the serial port --------------

'If we send the 4070A a control E character, it will respond with a control C. We use

'this feature to see if a 4070A is attached. If a 4070A cannot be found, wait until

'one is attached.

'User can abort the program at this point by pressing any key.

'When power is applied to the 4070A, it prints a menu to the serial port.

'We wish to disregard these characters, so flush them.

GOSUB FlushBuff1

' Flush all received chars from buffer

' Tell the user to connect up a 4070A

PRINT "Connect the 4070A to the serial port and power the 4070A"

ConnectLoop:

PRINT #1, CHR$(5); ' Print a control E to 4070A (ASCII char 5)

'Wait for the 4070A to give us some characters. When they arrive, put them into the

'string a$

GOSUB GetResponse1

' Wait for and get response from 4070A to a$

' Allow the user to exit the program by pressing a key.

IF INKEY$ <> "" THEN SYSTEM ' Exit on first terminal keypress

'Did we get a control C (ASCII char 3) from the 4070A? IF INSTR(a$, CHR$(3)) THEN GOTO GotSg100

GOTO ConnectLoop

GotSg100:

'-----------

Switch the 4070A to Burst mode --------------

'Send the following command string to the 4070A:

'A M6 F2 xxX F1 xxX F3 xxX F0

'These characters have the following meaning:

'A - Reset the 4070A to Sinewave mode (ensures the state of 4070A)

'M6 - Go to Burst Mode

'F3 - Move cursor to field 3 (the burst frequency field)

'

xxX

- Enter a frequency of xx Hz (infrared carrier freq)

'

F2

- Move cursor to field 2 (the burst duration field)

' xxX

- Enter a duration of xx mS (burst on time)

'

F4

- Move cursor to field 4 (the burst delay field)

' xxX

- Enter a duration of xx mS (burst off time)

'

F0

- Move cursor to field 0 (turns cursor off)

 

PRINT #1, "A M6 F3";

 

 

PRINT #1, CarrierFreq$; "X";

' Send measured carrier freq

 

PRINT #1, "F2 ";

 

 

PRINT #1, OnTime$; "X";

' Send burst on time

 

PRINT #1, "F4 ";

 

 

PRINT #1, OffTime$; "X";

' Send burst off time

 

PRINT #1, "F0";

 

' The 4070A will now trigger a single burst for each "t" char we sent it. After the

' 4070A executes each "t" command, it will return a prompt character (">"). We wish to

'wait until after all prompts have come in, since that's when the 4070A has finished

'processing the last "t". The GetResponse1 subroutine has a time-out feature which will

'accomplish this purpose.

GOSUB GetResponse1

' Wait for and get response from 4070A to a$

79

BK Precision 4070A User Manual Rev.2.2

Image 84
Contents User’s Manual Page Model 4070A User’s Manual +K Precision CorpTable of Contents Warranty information Remote operationArbitrary waveform system DC Operation OptionIntroduction Description Feature summary ModesInstallation and setup Sync out connectorSIG Out connector External Modulation In connector External Trigger/Gating/FSK/BPSK input External Reference Input / Ext Arb. Clock connector External Arb Sync In / Out connectorRS232 Interface connector Line in connectorMode key Operating controls and keysField arrow keys Recall / Store keyTrigger key Numeric keys 0 to 9,É, ê, è, ç keys One Touch Mode Keys Clear keyMHz/dBm, KHz/Vp-p/Sec, Hz/mVp-p/mS keys Operating mode selection Operating guideChanging frequency Changing levelChanging values Modifying an existing valueEntering a new value Mode descriptions Basic Sinewave CW ModeSinewave Mode 000,000.00 Hz 10.0 dBm Internal AM Mode External AM Mode External AM Mode ParametersExternal AM Input gain 000,000.00 Hz PEP level -10.0 dBm Input GainInternal FM Mode Internal FM Mode ParametersInt FM 1,000 Hz Pk dev 10,000 Hz 000,000.00 Hz 10.0 dBm Peak Frequency DeviationExternal FM Mode External FM Mode ParametersExternal FM Pk dev 10,000 Hz 000,000.00 Hz 10.0 dBm Internal PM Mode Internal PM Mode ParametersPeak Phase Deviation Int PM 1,000 Hz Pk dev 180 deg 000,000.00 Hz 10.0 dBmExternal PM Mode External PM Mode ParametersExternal PM Pk dev 180 deg 000,000.00 Hz 10.0 dBm Sweep Mode Up / Down sweep Sweep timeInternal FSK Mode Internal FSK Mode ParametersMark Frequency Space FrequencyExternal FSK Mode External FSK Mode ParametersExt FSK Mark 1,000,000.00 Hz Space 2,000,000.00 Hz 10.0 dBm Ext FSK InputBurst Mode Introduction Burst Mode Trig Ton 10,000 mS 000,000.00 Hz Off 10.0 dBmBurst frequency Internal SSB Mode Internal SSB Mode ParametersInt SSB 1,000 Hz Upper Sideband 000,000.00 Hz 10.0 dBm Upper/Lower Sideband selectionsExternal SSB Mode External SSB Mode ParametersExternal SSB Upper Sideband 000,000.00 Hz +10.0 dBm Dtmf Generation Mode Dtmf generation # Duration 200 mS Delay Level -10.0 dBmDtmf Generation Mode Parameters BackgroundDtmf Delay Dtmf DurationDtmf Detection Mode Dtmf Detection Mode ParametersDtmf detection on Ext Mod input 3 # a Dtmf detected digitsPower & Voltage Measurement Mode Power & Voltage Measurement Mode ParametersPower Level Voltage LevelArbitrary Mode Remote ModeOther mode Internal Bpsk Mode Internal Bpsk Mode ParametersInt Bpsk 1,000 Hz 000,000.00 Hz 10.0 dBm External Bpsk Mode External Bpsk Mode ParametersExternal Bpsk 000,000.00 Hz 10.0 dBm Dualtone Generation Mode 10,000 Hz F2 Ton 000 mS Toff 10.0Dualtone Examples Data Modulation Mode Using the Data Modulation ModeData Modulation Mode Parameters Baud RateDownloading Modulation Message Data Example MessageTriggering the Transmission Saving the MessageVoltage Controlled Oscillator VCO Mode VCO Mode ParametersStart End 1,000,000.00 Hz 10.0 dBm End FrequencyConnecting Remote OperationChecking your connection with Hyper Terminal Remote Control Operation Remote Control Programming RulesRemote Control Commands Reset 4070A to Sine wave mode× Ø Returns CK1.0 Enable, Disable front panel keys and rotary knob E1,0 Enable, Disable LCD echo to terminalReport hardware and software versions Linear Trig Up Time 10,000 mS F0-9 Move cursor to field 0 to? or H Print help menu Return a CRemote Control Examples ExampleArbitrary Waveform Mode Quick Start GuidePin 9-pin cable Pin 25 pin cable adapter Introduction to the Arbitrary Waveform System Description of the Arbitrary Waveform GeneratorSwitching Modes Feature SummaryFunction Generator Pulse GeneratorArbitrary Waveform Mode Int Clock / Ext Clock / Lock Master Lock slave modePhase Continuous/Triggered modeFunction Generator Mode Function Gen Wave Pos Ramp Rep Freq 100,000 Hz 000 mVWaveform Repetition FrequencyPulse Generator Mode Positive OnlyDuty Cycle Using WAVELOAD.EXE Downloading arbitrary waveformsSaving Arbitrary Waveforms Cwaveload /COMx /y /baudz filename.extUsing your own program Data Formats Floating Point FormatRules for Floating Point format Time & Value Floating Point Format Example #2Digital Format Integer Format Hexadecimal Format Rules for Hexadecimal formatExample The data value E468 is handled as follows Binary Format Rules for Binary formatExample Multiple Units Locking ArbGenerator More on Phase Offsets Phase ResolutionStarting Address = Number of waveform points * Phase Offset Waveform Size RestrictionsExample Arb Program Program Listing ARB.BASClose System Subroutines Return Print #1, a Send integer value to 4070A Return Return Wiring Diagram DC Operation Option4070A Specifications Operating ModesSoftware CD RemoteHardware Setup Appendix aCLS CLS Print Print Subroutines END SUB Television Remote Control Example Appendix BCLS 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