B&K 4071 user manual CLS Print Print

Page 79

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

Set a frequency and level on the 4071 --------------

'Send the following command string to the 4071:

'A F1 18.432Z F2 0.0Z F0

'These characters have the following meaning:

'A - Reset the 4071 to Sinewave mode

'F1 - Move cursor to field 1 (the frequency field)

'18.432Z - Enter a frequency of 18.432 MHz

'F2 - Move cursor to field 2 (the level field)

'0.0Z - Enter a level of 0.0 dBm

'F0 - Move cursor to field 0 (turns cursor off)

PRINT #1, "A F1 18.432Z F2 0.0Z F0";

'After the 4071 executes each command, it will return a prompt character (">"). We wish

'to wait until after all prompts have

'come in, since that's when the 4071 has finished executing the last command. The

'GetResponse1 subroutine has a time-out feature which will accomplish this purpose.

GOSUB GetResponse1

' Wait for and get response from 4071 to a$

'Let the user know what's going on

CLS

PRINT "CW mode selected. Frequency and Level have been set."

PRINT : PRINT

PRINT "Press any key to go to DTMF Detection mode"

'Wait for the user to press a key before we switch to a new mode. CALL Pause

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

Switch to DTMF Detection mode --------------

' This example illustrates how to parse information from the 4071

 

PRINT #1, "M9";

' Command the 4071 to go to DTMF Detection mode

 

GOSUB PromptWait

' Wait for 4071 to finish this command

 

GOSUB FlushBuff1

' Flush all received chars from 4071

'Let the user know what's going on

CLS

PRINT : PRINT

PRINT "Now in DTMF Detection mode. All DTMF detections will be printed."

PRINT

'When the 4071 detects a DTMF digit, it will print the following text

'to the terminal port: CR,LF,"DTMF: 7"

DTMFLoop:

 

GOSUB GetResponse1

' Wait for and get response from 4071 to a$

'The 4071 prints a semicolon (:) character whenever it is reporting data.

'The data follows immediately after the semicolon.

IF INSTR(a$, ":") THEN

a = INSTR(a$, ":") + 1 ' Get the data that follows the ":" character

a$ = MID$(a$, a, 2) ' (Strip off everything else) PRINT "Detected DTMF digit is: "; a$

END IF

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

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

GOTO DTMFLoop

' Otherwise keep looking for more DTMF detections

74

BK Precision 4071 User Manual Rev.2.2

Image 79
Contents User’s Manual Page +K Precision Corp Model User’s ManualTable of Contents DC Operation Option Warranty informationRemote operation Arbitrary waveform systemIntroduction Description Modes Feature summarySync out connector Installation and setupSIG Out connector External Modulation In connector External Trigger/Gating/FSK/BPSK input Line in connector External Reference Input / Ext Arb. Clock connectorExternal Arb Sync In / Out connector RS232 Interface connectorRecall / Store key Mode keyOperating controls and keys Field arrow keysNumeric keys 0 to 9, Trigger keyÉ, ê, è, ç keys Clear key One Touch Mode KeysMHz/dBm, KHz/Vp-p/Sec, Hz/mVp-p/mS keys Changing level Operating mode selectionOperating guide Changing frequencyModifying 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 Input Gain External AM ModeExternal AM Mode Parameters External AM Input gain 000,000.00 Hz PEP level -10.0 dBmPeak Frequency Deviation Internal FM ModeInternal FM Mode Parameters Int FM 1,000 Hz Pk dev 10,000 Hz 000,000.00 Hz 10.0 dBmExternal FM Mode Parameters External FM ModeExternal FM Pk dev 10,000 Hz 000,000.00 Hz 10.0 dBm Int PM 1,000 Hz Pk dev 180 deg 000,000.00 Hz 10.0 dBm Internal PM ModeInternal PM Mode Parameters Peak Phase DeviationExternal PM Mode Parameters External PM ModeExternal PM Pk dev 180 deg 000,000.00 Hz 10.0 dBm Sweep Mode Sweep time Up / Down sweepSpace Frequency Internal FSK ModeInternal FSK Mode Parameters Mark FrequencyExt FSK Input External FSK ModeExternal FSK Mode Parameters Ext FSK Mark 1,000,000.00 Hz Space 2,000,000.00 Hz 10.0 dBmBurst Mode Trig Ton 10,000 mS 000,000.00 Hz Off 10.0 dBm Burst Mode IntroductionBurst frequency Upper/Lower Sideband selections Internal SSB ModeInternal SSB Mode Parameters Int SSB 1,000 Hz Upper Sideband 000,000.00 Hz 10.0 dBmExternal SSB Mode Parameters External SSB ModeExternal SSB Upper Sideband 000,000.00 Hz 10.0 dBm Background Dtmf Generation ModeDtmf generation # Duration 200 mS Delay Level -10.0 dBm Dtmf Generation Mode ParametersDtmf Duration Dtmf DelayDtmf detected digits Dtmf Detection ModeDtmf Detection Mode Parameters Dtmf detection on Ext Mod input 3 # aVoltage Level Power & Voltage Measurement ModePower & Voltage Measurement Mode Parameters Power 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 Baud Rate Data Modulation ModeUsing the Data Modulation Mode Data Modulation Mode ParametersExample Message Downloading Modulation Message DataSaving the Message Triggering the TransmissionEnd Frequency Voltage Controlled Oscillator VCO ModeVCO Mode Parameters Start End 1,000,000.00 Hz 10.0 dBmRemote Operation ConnectingChecking your connection with Hyper Terminal Remote Control Programming Rules Remote Control OperationReturns C Remote Control CommandsReset 4071 to Sine wave mode × ØE1,0 Enable, Disable LCD echo to terminal K1.0 Enable, Disable front panel keys and rotary knobReport hardware and software versions ? or H Print help menu Stp 31,500,000.00 HzLinear Trig Up Time 10,000 mS F0-9 Move cursor to field 0 toExample 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 SystemPulse Generator Switching ModesFeature Summary Function GeneratorContinuous/Triggered mode Arbitrary Waveform ModeInt Clock / Ext Clock / Lock Master Lock slave mode PhaseRepetition Frequency Function Generator ModeFunction Gen Wave Pos Ramp Rep Freq 100,000 Hz 000 mV WaveformPositive Only Pulse Generator ModeDuty Cycle Cwaveload /COMx /y /baudz filename.ext Using WAVELOAD.EXEDownloading arbitrary waveforms Saving Arbitrary WaveformsUsing your own program Floating Point Format Data FormatsRules for Floating Point format Example #2 Time & Value Floating Point FormatDigital Format Rules for Integer format Integer FormatRules for Hexadecimal format Hexadecimal FormatExample The data value E468 is handled as follows Rules for Binary format Binary FormatExample Arb Multiple Units LockingGenerator Waveform Size Restrictions More on Phase OffsetsPhase Resolution Starting Address = Number of waveform points * Phase OffsetProgram Listing ARB.BAS Example Arb ProgramClose System Subroutines Return Print #1, a Send integer value to Return Return DC Operation Option Wiring DiagramOperating Modes 4071 SpecificationsRemote Software CDAppendix a Hardware SetupCLS CLS Print Print Subroutines END SUB Appendix B Television Remote Control ExampleCLS Make sure a 4071 is attached to the serial port Print Limited Two-Year Warranty Service Information Savi Ranch Pkwy Yorba Linda, CA 92887 USA TEL