B&K 4071 user manual Cls

Page 78

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

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

'

Program Start

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

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

DECLARE SUB Delay (X%)

' Declare functions used below.

 

' (The Delay function waits x mS then returns)

DECLARE SUB Pause ()

' (The Pause fctn waits for a keypress then returns)

CLS

' Clear the screen

'Open serial port 1 for communication with the 4071 with these parameters:

'Ignore the CD,CTS,DCD flow control lines

'Set a 5 sec maximum time-out for basic to open the port

'Set the receive buffer to 2K bytes

'Disable the RTS flow control line

'Set the transmit buffer to 1K bytes

'File access type is Random

'Set random access buffer size to 2K

OPEN "COM1:9600,n,8,1,CD0,CS0,DS0,OP5000,RB2048,RS,TB1024" FOR RANDOM AS #1 LEN = 2048

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

Make sure a 4071 is attached to the serial port --------------

' If we send the 4071 a control E character, it will respond with a control C. ' We use this feature to see if a 4071 is attached.

' If a 4071 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 4071, 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 4071

PRINT "Connect the 4071 to the serial port and power the 4071"

ConnectLoop:

 

PRINT #1, CHR$(5);

' Print a control E to 4071 (ASCII char 5)

'Wait for the 4071 to give us some characters. When they arrive, put

'then into the string a$

GOSUB GetResponse1

' Wait for and get response from 4071 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 4071? IF INSTR(a$, CHR$(3)) THEN GOTO GotSG100

GOTO ConnectLoop

GotSG100:

73

BK Precision 4071 User Manual Rev.2.2

Image 78
Contents User’s Manual Page Model User’s Manual +K Precision CorpTable of Contents Arbitrary waveform system Warranty informationRemote operation DC Operation OptionIntroduction Description Feature summary ModesInstallation and setup Sync out connectorSIG Out connector External Modulation In connector External Trigger/Gating/FSK/BPSK input RS232 Interface connector External Reference Input / Ext Arb. Clock connectorExternal Arb Sync In / Out connector Line in connectorField arrow keys Mode keyOperating controls and 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 Changing frequency Operating mode selectionOperating guide 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 Input gain 000,000.00 Hz PEP level -10.0 dBm External AM ModeExternal AM Mode Parameters Input GainInt FM 1,000 Hz Pk dev 10,000 Hz 000,000.00 Hz 10.0 dBm Internal FM ModeInternal FM Mode Parameters Peak Frequency DeviationExternal FM Mode External FM Mode ParametersExternal FM Pk dev 10,000 Hz 000,000.00 Hz 10.0 dBm Peak Phase Deviation Internal PM ModeInternal PM Mode Parameters 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 timeMark Frequency Internal FSK ModeInternal FSK Mode Parameters Space FrequencyExt FSK Mark 1,000,000.00 Hz Space 2,000,000.00 Hz 10.0 dBm External FSK ModeExternal FSK Mode Parameters Ext FSK InputBurst Mode Introduction Burst Mode Trig Ton 10,000 mS 000,000.00 Hz Off 10.0 dBmBurst frequency Int SSB 1,000 Hz Upper Sideband 000,000.00 Hz 10.0 dBm Internal SSB ModeInternal SSB Mode Parameters Upper/Lower Sideband selectionsExternal SSB Mode External SSB Mode ParametersExternal SSB Upper Sideband 000,000.00 Hz 10.0 dBm Dtmf Generation Mode Parameters Dtmf Generation ModeDtmf generation # Duration 200 mS Delay Level -10.0 dBm BackgroundDtmf Delay Dtmf DurationDtmf detection on Ext Mod input 3 # a Dtmf Detection ModeDtmf Detection Mode Parameters Dtmf detected digitsPower Level Power & Voltage Measurement ModePower & Voltage Measurement Mode Parameters 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 Parameters Data Modulation ModeUsing the Data Modulation Mode Baud RateDownloading Modulation Message Data Example MessageTriggering the Transmission Saving the MessageStart End 1,000,000.00 Hz 10.0 dBm Voltage Controlled Oscillator VCO ModeVCO Mode Parameters End FrequencyConnecting Remote OperationChecking your connection with Hyper Terminal Remote Control Operation Remote Control Programming Rules× Ø Remote Control CommandsReset 4071 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 F0-9 Move cursor to field 0 to Stp 31,500,000.00 HzLinear Trig Up Time 10,000 mS ? or H Print help menuRemote 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 GeneratorFunction Generator Switching ModesFeature Summary Pulse GeneratorPhase Arbitrary Waveform ModeInt Clock / Ext Clock / Lock Master Lock slave mode Continuous/Triggered modeWaveform Function Generator ModeFunction Gen Wave Pos Ramp Rep Freq 100,000 Hz 000 mV Repetition FrequencyPulse Generator Mode Positive OnlyDuty Cycle Saving Arbitrary Waveforms Using WAVELOAD.EXEDownloading 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 Rules for Integer formatHexadecimal Format Rules for Hexadecimal formatExample The data value E468 is handled as follows Binary Format Rules for Binary formatExample Multiple Units Locking ArbGenerator Starting Address = Number of waveform points * Phase Offset More on Phase OffsetsPhase Resolution Waveform Size RestrictionsExample Arb Program Program Listing ARB.BASClose System Subroutines Return Print #1, a Send integer value to Return Return Wiring Diagram DC Operation Option4071 Specifications Operating ModesSoftware CD RemoteHardware Setup Appendix aCLS CLS Print Print Subroutines END SUB Television Remote Control Example Appendix BCLS 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