B&K 4070A user manual Subroutines

Page 80

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

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

'

SUBROUTINES

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

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

' These subroutines are also used by other example programs.

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

'

Get ASCII response from 4070A

'Wait for an incoming char, then collect incoming stuff until we get a

'800 mS Rx char time-out

'Returns with a$ = received stuff

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

GetResponse1:

IF

LOC(1) = 0 THEN GOTO GetResponse1

' Wait for incoming char

a$ = ""

 

 

GetRespLoop1:

 

 

a$ = a$ + INPUT$(LOC(1), #1)

' Get all waiting chars in Rx buffer

' Now wait for a time-out time to make sure no new stuff is coming in.

CALL Delay(.8)

' Do a 800 mS delay

IF LOC(1) <> 0 THEN GOTO GetRespLoop1

' If something came in during

RETURN

 

' our time-out, grab it

 

 

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

 

 

'

Wait for a command prompt from 4070A

' Returns A$ = all stuff received before the command prompt.

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

PromptWait:

' If we have no chars in Rx buffer, wait until we have 1 or more

a$ = ""

PromptWaitLoop:

IF LOC(1) = 0 THEN GOTO PromptWaitLoop

a$ = a$ + INPUT$(LOC(1), #1) ' Get all waiting chars in Rx buffer

IF INSTR(a$, ">") THEN GOTO GotPrompt

GOTO PromptWaitLoop

'Here we got a prompt. Exit GotPrompt:

RETURN

75

BK Precision 4070A User Manual Rev.2.2

Image 80
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 ModesSIG Out connector Installation and setupSync 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 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 mode selection Operating guideChanging 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 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 Pk dev 10,000 Hz 000,000.00 Hz 10.0 dBm External FM ModeExternal FM Mode Parameters 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 Pk dev 180 deg 000,000.00 Hz 10.0 dBm External PM ModeExternal PM Mode Parameters 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 frequency Burst Mode IntroductionBurst Mode Trig Ton 10,000 mS 000,000.00 Hz Off 10.0 dBm 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 Upper Sideband 000,000.00 Hz +10.0 dBm External SSB ModeExternal SSB Mode Parameters 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 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 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 FrequencyChecking your connection with Hyper Terminal ConnectingRemote Operation Remote Control Operation Remote Control Programming RulesRemote Control Commands Reset 4070A to Sine wave mode× Ø Returns CReport hardware and software versions K1.0 Enable, Disable front panel keys and rotary knobE1,0 Enable, Disable LCD echo to terminal 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 ExamplePin 9-pin cable Pin 25 pin cable adapter Arbitrary Waveform ModeQuick Start Guide 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 FrequencyDuty Cycle Pulse Generator ModePositive Only Using WAVELOAD.EXE Downloading arbitrary waveformsSaving Arbitrary Waveforms Cwaveload /COMx /y /baudz filename.extUsing your own program Rules for Floating Point format Data FormatsFloating Point Format Time & Value Floating Point Format Example #2Digital 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 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