B&K 4070A user manual Using your own program

Page 58

7.7.2 Using your own program

You may use your own application program to send the arbitrary waveform data to the 4070A.

To download a waveform to the 4070A, you need to send the following to the 4070A through the serial port:

1.A two character header consisting of

a)The “W” character. This tells the 4070A to expect the download of an arbitrary waveform.

b)A single character, which specifies the data format. The character may be

“F” for floating point or decimal format “T” for time & value floating point format “D” for digital format

“H” for hexadecimal format “I” for Integer format “B” for binary format

2.The waveform data values

3.An optional “X” or “x” character at the end of the data. The “X” character denotes the end of data. If the “X” character is missing, the 4070A will assume all data has been sent after 1 second timeout.

White space (spaces, carriage returns, tabs, etc.) is allowed before or after the W character. Whitespace may come after the format character except for Binary format. (For more information on data formats, please refer to section 9.0)

EXAMPLE: Sending the following characters downloads a four point waveform in floating point format:

W F .1234 .6874 -2.345e-1 -1.0

The serial port on the 4070A defaults to the following parameters: 1 start bit, 8 data bits, 1 stop bit, no parity. It is important that the sending program’s baud rate match that of the 4070A. To inspect or change the 4070A’s baud rate, press the Mode key and then the Offset key. For more information changing the baud rate, please refer to section 5.20.

You do not need to tell the 4070A how many points are in the waveform, or which point is the last. If the 4070A does not receive any characters over the serial port for a 1 second time -out, then the 4070A assumes that all arbitrary waveform points have been received. If the 4070A is in Arbitrary Waveform mode, the new waveform will be generated immediately after the time-out.

The 1 second time -out can be avoided by placing an ASCII “X” character (upper or lower case) at the end of your data. This character tells the 4070A that the end of the data has been reached. The 4070A will then begin generation of the new waveform immediately. The “X” character cannot be used with the Binary format.

Make sure that there are no interruptions exceeding 1 second while downloading a waveform, else the 4070A will time out and end the download. Also, if you do not have an “X” character at the end of your data then you must stop sending characters to the 4070A for a minimum of 1 second so that the waveform will be generated.

An example program ARB.BAS is included on the supplied compact disk, which demonstrates downloading waveforms in a variety of formats directly from the program to the 4070A.

53

BK Precision 4070A User Manual Rev.2.2

Image 58
Contents User’s Manual Page Model 4070A User’s Manual +K Precision CorpTable of Contents Arbitrary waveform system Warranty informationRemote operation DC Operation OptionIntroduction Description Feature summary ModesSync out connector Installation and setupSIG 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 keyNumeric keys 0 to 9, Trigger keyÉ, ê, è, ç keys Clear key One Touch Mode KeysMHz/dBm, KHz/Vp-p/Sec, Hz/mVp-p/mS keys Changing frequency Operating mode selectionOperating guide 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 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 Parameters External FM ModeExternal 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 Parameters External PM ModeExternal 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 Trig Ton 10,000 mS 000,000.00 Hz Off 10.0 dBm Burst Mode IntroductionBurst 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 Parameters External SSB ModeExternal 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 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 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 FrequencyRemote Operation ConnectingChecking your connection with Hyper Terminal Remote Control Operation Remote Control Programming Rules× Ø Remote Control CommandsReset 4070A to Sine wave mode Returns CE1,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 Linear Trig Up Time 10,000 mSF0-9 Move cursor to field 0 to Return a CRemote Control Examples ExampleQuick Start Guide Arbitrary Waveform ModePin 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 FrequencyPositive Only Pulse Generator ModeDuty Cycle Saving Arbitrary Waveforms Using WAVELOAD.EXEDownloading arbitrary waveforms Cwaveload /COMx /y /baudz filename.extUsing your own program Floating Point Format Data FormatsRules for Floating Point format Time & Value Floating Point Format Example #2Digital 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 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 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