©
National Instruments Corporation
I-1
I
Programming Steps
and Examples
This appendix contains program examples you can use as guidelines as you
start writing programs for the GPIB-232/485CT-A.
The first part of the appendix applies to S mode. The remainder of the
appendix applies to G mode.
General Programming Steps for S Mode
The following are general programming steps for S mode operation.
1.
Send serial port initialization functions if you need to change default
serial port settings.
2.
Send the
stat
function to have status information returned to you after
your programming message.
3.
Send GPIB initialization functions if you need to change default GPIB
settings.
4.
Communicate with the device using the
rd
and
wrt
functions,
and check status if you requested it.
After you initialize the GPIB-232/485CT-A, the
rd
and
wrt
functions may
be the only functions you need.
S Mode Sample Programs
The following pages contain detailed explanations of these steps along with
sample programs.
Using an HP 7475A Plotter with a Terminal
This program is a sequence of programming messages and data strings
entered from a terminal to draw a circle using an HP 7475A Color Plotter.