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.

Programming Examples 3-11<br />

Program Examples<br />

Introduction<br />

The following examples demonstrate interfacing the <strong>DS335</strong> via RS232 and<br />

the GPIB interface using the National Instruments GPIB card. Using a<br />

different brand of card would be similar except for the program lines that<br />

actually send the data. These examples are intended to demonstrate the<br />

syntax of the <strong>DS335</strong>'s command set.<br />

To successfully interface the <strong>DS335</strong> to a PC via the GPIB interface, the<br />

instrument, interface card, and interface drivers must all be configured<br />

properly. To configure the <strong>DS335</strong>, the GPIB address must be set in the GPIB<br />

menu. The default GPIB address is 22; use this address unless a conflict<br />

occurs with other instruments in your system.<br />

Make sure that you follow all the instructions for installing the GPIB card. The<br />

National Instruments card cannot be simply unpacked and put into your<br />

computer. To configure the card you must set jumpers and switches on the<br />

card to set the I/O address and interrupt levels. You must run the program<br />

"IBCONF" to configure the resident GPIB driver for your GPIB card. Please<br />

refer to the National Instruments manual for information. In this example, the<br />

following options must be set with IBCONF:<br />

Device name: dds335<br />

Device address: 22<br />

EOS character: 0Ah (linefeed)<br />

Once all the hardware and GPIB drivers are configured, use "IBIC". This<br />

terminal emulation program allows you to send commands to the <strong>DS335</strong><br />

directly from your computer's keyboard. If you cannot talk to the <strong>DS335</strong> via<br />

"IBIC", then your programs will not run.<br />

Use the simple commands provided by National Instruments. Use "IBWRT"<br />

and "IBRD" to write and read from the <strong>DS335</strong>. After you are familiar with<br />

these simple commands, you can explore more complex programming<br />

commands.<br />

The RS232 program assumes the RS232 option is enabled ([SHIFT][2]) and<br />

the BAUD rate is set to 9600 BAUD.<br />

The GPIB example was written in C and the RS232 example was written in<br />

BASIC.<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!