B&K 4070A user manual Print

Page 85

GetCommand:

CLS

PRINT : PRINT

PRINT " 1. Power on/off"

PRINT " 2. Channel Up"

PRINT " 3. Channel Down"

PRINT " 4. Volume Up"

PRINT " 5. Volume Down"

PRINT

PRINT " ESC To exit program"

PRINT

PRINT " Please select a command >"

CommandPoll:

a$ = INKEY$

IF a$ = "" THEN GOTO CommandPoll

IF a$ = CHR$(27) THEN SYSTEM

' Exit the program on ESC keypress

IF a$ < "1" OR a$ > "5" THEN GOTO GetCommand ' Is input valid?

PRINT : PRINT

 

 

 

PRINT "Command sent."

' Tell user command will be sent.

a = VAL(a$)

' Convert selection to a number, 1 to 5

NumPulses = Array(a)

' Look up no. of pulses for this command

'The variable NumPulses now has the number of infrared pulses to form this remote

'control command. Download this many "t" characters to the 4070A which causes it to

'trigger that many pulses in Burst mode.

a$ = STRING$(NumPulses, "t")

' Form a string with NumPulses number

'of "t" chars in it. I.e., if

'Numpulses=3, then a$="ttt"

PRINT #1, a$;

' Dump the "t"'s to the 4070A

'The 4070A will now trigger a 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$

 

GOTO GetCommand

' Go get another remote control command

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

 

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

 

'

SUBROUTINES

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

 

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

 

' The subroutines needed for this example are listed in Appendix A

80

BK Precision 4070A User Manual Rev.2.2

Image 85
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 summarySync out connector Installation and setupSIG 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 keyNumeric keys 0 to 9, Trigger keyÉ, ê, è, ç keys Clear key One Touch Mode KeysMHz/dBm, KHz/Vp-p/Sec, Hz/mVp-p/mS keys Operating guide Operating mode selectionChanging frequency Changing levelModifying an existing value Changing valuesEntering a new value Basic Sinewave CW Mode Mode descriptionsSinewave Mode 000,000.00 Hz 10.0 dBm 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 Mode Parameters External FM ModeExternal FM Pk dev 10,000 Hz 000,000.00 Hz 10.0 dBm 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 Mode Parameters External PM ModeExternal PM Pk dev 180 deg 000,000.00 Hz 10.0 dBm 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 Mode Trig Ton 10,000 mS 000,000.00 Hz Off 10.0 dBm Burst Mode IntroductionBurst frequency 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 Mode Parameters External SSB ModeExternal SSB Upper Sideband 000,000.00 Hz +10.0 dBm 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 LevelRemote Mode Arbitrary ModeOther mode Internal Bpsk Mode Parameters Internal Bpsk ModeInt Bpsk 1,000 Hz 000,000.00 Hz 10.0 dBm External Bpsk Mode Parameters External Bpsk ModeExternal Bpsk 000,000.00 Hz 10.0 dBm 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 FrequencyRemote Operation ConnectingChecking your connection with Hyper Terminal Remote Control Programming Rules Remote Control OperationReset 4070A to Sine wave mode Remote Control Commands× Ø Returns CE1,0 Enable, Disable LCD echo to terminal K1.0 Enable, Disable front panel keys and rotary knobReport hardware and software versions 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 ExamplesQuick Start Guide Arbitrary Waveform ModePin 9-pin cable Pin 25 pin cable adapter 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 FrequencyPositive Only Pulse Generator ModeDuty Cycle Downloading arbitrary waveforms Using WAVELOAD.EXESaving Arbitrary Waveforms Cwaveload /COMx /y /baudz filename.extUsing your own program Floating Point Format Data FormatsRules for Floating Point format Example #2 Time & Value Floating Point FormatDigital Format Integer Format Rules for Hexadecimal format Hexadecimal FormatExample The data value E468 is handled as follows Rules for Binary format Binary FormatExample Arb Multiple Units LockingGenerator 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