30.01.2015 Views

DS335 Synthesized Function Generator

DS335 Synthesized Function Generator

DS335 Synthesized Function Generator

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

3-2 Programming Commands<br />

There is no need to wait between commands. The <strong>DS335</strong> has a 256<br />

character input buffer and processes commands in the order received. If the<br />

buffer fills up the <strong>DS335</strong> will hold off handshaking on the GPIB and attempt<br />

to hold off handshaking on RS232. If the buffer overflows the buffer will be<br />

cleared and an error reported. Similarly, the <strong>DS335</strong> has a 256 character<br />

output buffer to store output until the host computer is ready to receive it. If<br />

the output buffer fills up it is cleared and an error reported. The GPIB output<br />

buffer may be cleared by using the Device Clear universal command.<br />

The present value of a particular parameter may be determined by querying<br />

the <strong>DS335</strong> for its value. A query is formed by appending a question mark ""<br />

to the command mnemonic and omitting the desired parameter from the<br />

command. If multiple queries are sent on one command line (separated by<br />

semicolons, of course) the answers will be returned in a single response line<br />

with the individual responses separated by semicolons. The default<br />

response terminator that the <strong>DS335</strong> sends with any answer to a query is<br />

carriage return-linefeed on RS232, and linefeed plus EOI on GPIB.<br />

All commands return integer results except as noted in individual command<br />

descriptions.<br />

Examples of Command Formats<br />

FREQ, 1000.0 <br />

FREQ <br />

*IDN <br />

*TRG <br />

FUNC 1 ;FUNC <br />

Sets the frequency to 1000 Hz.<br />

Queries the frequency.<br />

Queries the device identification (query, no<br />

parameters).<br />

Triggers a sweep (no parameters).<br />

Sets function to square wave(1) then queries the<br />

function.<br />

Programming Errors<br />

The <strong>DS335</strong> reports two types of errors that may occur during command<br />

execution: command errors and execution errors. Command errors are<br />

errors in the command syntax. For example, unrecognized commands,<br />

illegal queries, lack of terminators, and non-numeric arguments are examples<br />

of command errors. Execution errors are errors that occur during the<br />

execution of syntactically correct commands. For example, out of range<br />

parameters and commands that are illegal for a particular mode of operation<br />

are classified as execution errors.<br />

No Command Bit<br />

The NO COMMAND bit is a bit in the serial poll register that indicates that<br />

there are no commands waiting to be executed in the input queue. This bit is<br />

reset when a complete command is received in the input queue and is set<br />

when all of the commands in the queue have been executed. This bit is<br />

useful in determining when all of the commands sent to the <strong>DS335</strong> have<br />

been executed. This is convenient because some commands, such as<br />

setting the function or sweep, take a long time to execute and there is no<br />

other way of determining when they are done. The NO COMMAND bit may<br />

be read while commands are being executed by doing a GPIB serial poll.<br />

There is no way to read this bit over RS232. Note that using the *STB<br />

query to read this bit will always return the value 0 because it will always<br />

return an answer while a command is executing- the *STB command itself!<br />

DETAILED COMMAND LIST<br />

The four letter mnemonic in each command sequence specifies the<br />

command. The rest of the sequence consists of parameters. Multiple<br />

<strong>DS335</strong> <strong>Synthesized</strong> <strong>Function</strong> <strong>Generator</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!