B&K 4070A user manual Return

Page 72

IF PointVal < 0 THEN PointVal = PointVal + 2: j = 32768!

a = INT(PointVal * j)

' Get a number 0 to 65535

a = INT(a / 16) ' Mask off lower 4 bits ($FFF0) a = a * 16

IF

PointNumber = 2 THEN a = a OR &H8

'

Set SYNC Out bit for second point

a$

= HEX$(a)

'

Convert the integer to hexadecimal

'For negative values, the HEX$ fctn will return a 32 bit value, ie $FFFF FFD8,

'so chop off all but the last 4 chars

IF a < 0 THEN a$ = RIGHT$(a$, 4)

PRINT #1, a$' Send hex point to 4070A

RETURN

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

Send Binary data to 4070A ------------------------

'This is the fastest way to send points to the 4070A since it transfers

'the data point with only 2 characters. It is also the least forgiving

'as far as getting the data sent correctly.

'

'Each data point is a 16 bit word which is sent to the 4070A in two bytes.

'The high byte is sent first, followed by the low byte.

'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 Binary format:

'1. IMMEDIATELY after the "B" character in the header the 4070A expects the

'first high byte of data point 1. No whitespace is allowed after the "B"

'in Binary mode.

'

'2. The high byte of each data point is sent first, followed by the low byte.

'3. 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.

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

SendBinary:

IF PointNumber = 1 THEN PRINT #1, "WB"; ' Put header info before 1st data

' point. Must not have CR or LF after

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

IF PointVal < 0 THEN PointVal = PointVal + 2: j = 32768!

a

= INT(PointVal * j)

'

Convert -1.0,+1.0 to

0,65535

a

= INT(a / 16)

'

Only the uppermost

12 bits are used, so

a

= a * 16

'

Mask off the lower

4

bits (AND fff0)

IF

PointNumber = 2 THEN a = a OR &H8

' Set SYNC Out bit for second point

' If you let Basic send a 16 bit variable to a port, it will send the low byte

67

BK Precision 4070A User Manual Rev.2.2

Image 72
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 ModesInstallation and setup Sync out connectorSIG 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 keyTrigger key Numeric keys 0 to 9,É, ê, è, ç keys One Touch Mode Keys Clear keyMHz/dBm, KHz/Vp-p/Sec, Hz/mVp-p/mS keys Operating mode selection Operating guideChanging frequency 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 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 Mode External FM Mode ParametersExternal FM Pk dev 10,000 Hz 000,000.00 Hz 10.0 dBm 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 Mode External PM Mode ParametersExternal PM Pk dev 180 deg 000,000.00 Hz 10.0 dBm 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 Mode Introduction Burst Mode Trig Ton 10,000 mS 000,000.00 Hz Off 10.0 dBmBurst frequency 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 Mode External SSB Mode ParametersExternal SSB Upper Sideband 000,000.00 Hz +10.0 dBm 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 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 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 FrequencyConnecting Remote OperationChecking your connection with Hyper Terminal Remote Control Operation Remote Control Programming RulesRemote Control Commands Reset 4070A 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 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 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 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 FrequencyPulse Generator Mode Positive OnlyDuty Cycle Using WAVELOAD.EXE Downloading arbitrary waveformsSaving 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 Hexadecimal Format Rules for Hexadecimal formatExample The data value E468 is handled as follows Binary Format Rules for Binary formatExample Multiple Units Locking ArbGenerator 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