Lisa Lord wrote in message news:<3B7CBB41.89C25714@yahoo.com>...
> I am trying to sample a HP 34401A for a dc voltage, then plot the points
> to a graph.
> I can communicate withthe instrument through my GPIB board, and have
> done single
> voltage reads. But does anyone have an example or advice on the graphing
> portion?
> Thanks,
> -LL
Lisa,
I'll assume you want to sample one point at a time continuously, and
plot the points to a strip chart-style graph. Place your single
voltage read code in a while loop and wire the single value to a
Waveform Chart found in the Graph palette. The Waveform Chart has a
built-in FIFO buffer that will add each new single read to the chart.
The default length of the chart is 1024 points. You can change this
by
right-clicking the graph and selecting Chart History Length from
the pop-up menu. The pop-up menu will also have items for showing the
scroll bar for scrolling through the data and formatting the x and y
axes, etc.
If you want to sample a bunch of points at once from the HP, you can
use the SAMP:COUN scpi command to configure the instrument for
multiple readings. You'll have to parse these and convert them to an
array. You can then pass the array to a Wavefrom Chart (or Waveform
Graph if you don't want buffering) and it will plot all of the points
at once. It is also possible to put this type of code into a loop and
graph chunks of data at each iteration. Try the
Help->Examples->Fundamentals->Graphs and Charts help section. Email if
you need more help.
sm