B&K user manual Print #1, a Send integer value to 4070A

Page 71

PRINT #1, a

' Send integer value to 4070A

RETURN

 

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

Send ASCII Hex data to 4070A ----------------------

'This format sends the same two's complement data that Binary format uses,

'except that each nibble (4 bits) of the hex value is represented by

'an ASCII character.

'

'Each point is a 16 bit word which is sent to the 4070A with 4 characters.

'Each character represents 4 bits of the 16 bit value:

'

'0000 to 1001 - Represented by an ASCII "0" to "9"

'1010 - Represented by an ASCII "a" or "A"

'1011 - Represented by an ASCII "b" or "B"

'1100 - Represented by an ASCII "c" or "C"

'1101 - Represented by an ASCII "d" or "D"

'1110 - Represented by an ASCII "e" or "E"

'1111 - Represented by an ASCII "f" or "F"

'For example, the 16 bit value 1101 0011 0101 1111 is sent as "d35f"

'The 16 bit value is in "two's complement" format, which represents a number

'from -1.0 to +1.0 as follows:

'

 

 

 

 

 

'

8000

---- E000 ---- FFFF,0 ---- 4000

---- 7FFF

'

-1.0

-.5

0.0

+.5

+1.0

'

 

 

 

 

 

'Although a 16 bit value is sent to the 4070A, the Arbitrary Waveform system

'uses a 12 bit D/A converter, so not all 16 bits are used. Only the uppermost

'12 bits are used to form the arbitrary waveform point.

'

'Rules for Hexadecimal format:

'1. Each Hexadecimal value may have 1 to 4 characters. Negative values require

'4 characters since the most significant bit of the value (bit 15)

'must be a 1 for negative values. If there are fewer than 4 characters the

'value is interpreted as positive. Characters are not case sensitive.

'

'2. To separate each number, you may use commas, tabs, spaces, carriage returns

'and/or linefeeds, semicolons, colons or basically any character that is not

'among the following:

'

0 1 2 3 4 5 6 7 8 9 a A b B c C d D e E f F

'

 

'3. The most significant nibble character is the first that is sent to the

'4070A. For example, to send the value 1234, the 1 is sent first, then

'the 2, etc.

'

'4. The SYNC Out output is controlled by bit #3 in the low byte. If this bit

'is set to 1, SYNC Out is set high. If this bit is set to 0, SYNC Out

'is set low.

'

'Examples of ASCII hex numbers, SYNC Out is set high on point #3:

'0, 4000, fed8 4570 8000 fff0 E6D0, 10 FF,C06

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

SendHex:

IF PointNumber = 1 THEN PRINT #1, "WH" ' Put header before 1st data point

'Convert the value in PointVal to two's complement hex j = 32767

66

BK Precision 4070A User Manual Rev.2.2

Image 71
Contents User’s Manual Page +K Precision Corp Model 4070A User’s ManualTable of Contents DC Operation Option Warranty informationRemote operation Arbitrary waveform systemIntroduction Description Modes Feature summarySIG Out connector Installation and setupSync 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 keysÉ, ê, è, ç keys Trigger keyNumeric keys 0 to 9, MHz/dBm, KHz/Vp-p/Sec, Hz/mVp-p/mS keys One Touch Mode KeysClear key Changing level Operating mode selectionOperating guide Changing frequencyEntering 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 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 Pk dev 10,000 Hz 000,000.00 Hz 10.0 dBm External FM ModeExternal FM Mode Parameters 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 Pk dev 180 deg 000,000.00 Hz 10.0 dBm External PM ModeExternal PM Mode Parameters 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 frequency Burst Mode IntroductionBurst Mode Trig Ton 10,000 mS 000,000.00 Hz Off 10.0 dBm 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 Upper Sideband 000,000.00 Hz +10.0 dBm External SSB ModeExternal SSB Mode Parameters 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 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 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 dBmChecking your connection with Hyper Terminal ConnectingRemote Operation Remote Control Programming Rules Remote Control OperationReturns C Remote Control CommandsReset 4070A to Sine wave mode × ØReport hardware and software versions K1.0 Enable, Disable front panel keys and rotary knobE1,0 Enable, Disable LCD echo to terminal Return a C Linear Trig Up Time 10,000 mSF0-9 Move cursor to field 0 to ? or H Print help menuExample Remote Control ExamplesPin 9-pin cable Pin 25 pin cable adapter Arbitrary Waveform ModeQuick Start Guide 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 WaveformDuty Cycle Pulse Generator ModePositive Only Cwaveload /COMx /y /baudz filename.ext Using WAVELOAD.EXEDownloading arbitrary waveforms Saving Arbitrary WaveformsUsing your own program Rules for Floating Point format Data FormatsFloating Point Format Example #2 Time & Value Floating Point FormatDigital 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 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 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