B&K 4071 Portable Generator User Manual


 
BK Precision 4071 User Manual Rev.2.2
53
7.7.2 Using your own program
You may use your own application program to send the arbitrary waveform data to the 4071.
To download a waveform to the 4071, you need to send the following to the 4071 through the serial port:
1. A two character header consisting of:
a) The “W” character. This tells the 4071 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 4071 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. Space 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 4071 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 4071. To inspect or change the 4071’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 4071 how many points are in the waveform, or which point is the last. If the 4071 does
not receive any characters over the serial port for a 1 second time-out, then the 4071 assumes that all arbitrary
waveform points have been received. If the 4071 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 4071 that the end of the data has been reached. The 4071 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 4071 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 4071 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 to demonstrate a variety formats for
program to the 4071.