IM 253401-01E
App1-10
Appendix 1.2 Sample Program
Appendix 1.2 Sample Program
Before Programming
This section describes sample programs for a IBM PC/AT and compatible system with National
Instruments GPIB-PCIIA board installed. Sample programs in this manual are written in Quick
BASIC version 4.0/4.5
Programming Format
The programming format for this instrument is as follows.
C Par Terminator
The used codes are ASCII codes.
Example
DA
2
CR LF
command
parameter
terminator
Commands
One to three capital characters are used to designate a command.
Parameters
Characters or numericals are in ASCII code.
Terminator
• In case of GP-IB:
When this instrument is set to listener mode, either [CR+LF], [LF], or [EOI] can be used as the
terminator.
When this instrument is set to talker mode, the terminator set using the DL command becomes
valid. Refer to page App1-2.
• In case of RS-232-C:
Refer to page 12-7 and App1-2.
Sending Several Commands
You can express several commands on one line. In such a case, enter a “;” (semicolon) between
two commands (c parameter).
Note
It makes no difference whether a space, tab or similar is entered between command and parameter.
Query
A command followed by a “?” (question mark) is called a query command. When such a
command is sent, the current data will appear.
Query
Current data
DA?
⇒
⇒
⇒
⇒
⇒
DA1
Parameter Values
Up to 5 digits after the decimal point will be recognized.