So the method that you used in your example isn't too far off - you can
simplify your code a bit by utilizing autoindexing on the for
loop. In the block diagram, you have an array of visa constants
wired to the for loop, and if you look at the tunnel (the square on the
edge of the for loop) that you have created you will see that it is set
to autoindex through the array. What that means is with nothing
else connected to the count terminal, the for loop will execute once
for every item in that array. This is one way you can simplify
your code.
In addition, I took a look at the different functions you are calling,
and the "HP8133A_Application Function2.vi" is set to be called every
time the loop executes. There are a number of subVIs that this VI
calls, and that may be what you want to do, however be aware that you
will be working with some possibly slower loops because each loop is
doing all those same functions all over again. It's not a bad
thing unless you don't need all those same functions.
Also, in your example VI, you are using scalar inputs and
outputs. Once again this is ok, but may not be the best setup, if
you care to set different values for each instrument, or you care what
the outputs are for each instrument. Because the inputs are
inside the loop, chances are you will not be able to manipulate the
different values from one iteration to the next, assuming you are on a
reasonably quick system. In addition, the only values you will
see in the indicators is the last values written to those indicators.
You might get more useful information from that for loop by grouping
together some of the data into a cluster and output an array of values
that may have more meaningful information.
Finally, with regards to editting the 8648a driver to work with the
8648c, this may not be a trivial process. Some of the function
calls may be the same, some may be totally different, some function
calls may be unnessary, and some functions may be missing
altogether. The 8648a driver is definitely a good place to start,
just be aware that you will need to find and manipulate all functions
and VIs that you want to use with the 8648C that do not work as
is. If this is just one or two function calls, this should be
pretty easy, but I honestly don't know what needs to be changed for
your specific application. Make sure you follow the previous
suggestion of creating a copy of the current driver to as a backup, use
the manual for the 8648C to know how to change functions, and if needed
look into taking a driver development course. Also, if you
haven't already, make sure you have submitted a request for that driver
via ni.com/idnet under "Request Driver".
Good luck!
Logan S.
Message Edited by LoganS on 09-07-2005 10:25 PM