LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

one master multiple slave signal/pulse trigger

I do not have the HP driver VIs but I think you nedd to create an array of addresses and call the Initialize VI in a loop so that it runs once for each generator. The string you feed the Initialize VI looks like this:

GPIB::10::INSTR
GPIB::11::INSTR
GPIB::12::INSTR
GPIB::13::INSTR
GPIB::14::INSTR
GPIB::15::INSTR
GPIB::16::INSTR
GPIB::17::INSTR 10.000000. 11.000000. 12.000000. 13.000000. 14.000000. 15 16 17

That is very unlikely to be a valid command string for one of the generators.

Lynn
0 Kudos
Message 11 of 19
(670 Views)
Sorry about that - I guess I was just interested in the last VI that you posted.  I have to agree with johnsold though.  If you are trying to communicate with multiple 8133's, you're going to need to call the same function a number of times, not just pass a string of all the instruments that you want to communicate with.  I would not expect passing in a string as you have created in your last VI to work. 
 
Logan S.
0 Kudos
Message 12 of 19
(664 Views)
I would suggest that you attempt to communicate with just one pulse generator and configure the parameters to suit your setup.

I can't remember if there actual is a function were you can actually see the GPIB code one generates when one manually 
setups the instrument. It is a function on some Hp equipment.

 Once you have succeed with one then it is a small step to introduce the other seven. Simple solution would be to use a For Loop to enable the other generators,once you have configured  your initial setup.

With regard to your investigation are you using the signal generator to provide a carrier signal ? Remember that your signal level is reduced by 3 dB (50% power)every time you use a power divider !!!!!

I can see that you are using the 8648A vi library. Check the programming manual for the GPIB commands that you need to use. Modify the appropiate vi's and save copies with new name so that you don't corrupt the original 8648A library. In a nutshell  make a new instrument library 8648C !!!

Hope it helps
Regards
xseadog
 




0 Kudos
Message 13 of 19
(656 Views)
Thanks everyone for your advice and suggestions!
I can see the point that it is not possible to control multiple pulse gens using my previous approach. Then, how can I do this using xseadog's suggestion (using 'For Loop')? Can anyone show how this can be done? I am thinking to do something like this (plz see attached)
 
The idea/plan for the overall test system is to turn 1 to N number of pulse gens and measure/display/export in excel file for each increase (activation) of pulse generators.
 
How can I make a new instrument library for 8648c (from 8648a)?
Just make a new folder, copy/past and change all the file names?
 
Thanks again!
0 Kudos
Message 14 of 19
(637 Views)
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

0 Kudos
Message 15 of 19
(630 Views)
Hum interesting question with regard to Instrument driver!
In my limited experience there are several paths you can attempt.
Option A
Pt 1:
Make a backup of your intrument library
Pt2:
Convert VI library to Directory with Vi's in.
Pt3:
Open 'top' Vi and save as *_8648C.vi in new folder
Repeat process for all vi's
Object is to remove any link to old VI's
Pt 4
Open new'top' VI from new folder and save as libary 8648C.llb
Repeat for all VI's.
Close Labview
Zip folder that contained first extraction of VI's from library.
Then delete all vi's in theat folder
Restart Labview.
Open 8648c.llb
IF you have suceeded then Labview will not complain !!
IF Labview complains then probable due to lost 'VI' location.
IF there is still a link to old code then it is necessary to replace
 appropiate faulty VI with VI from you new library ( create new link/compile)
--------------------------------
Don't be mistaken it is not a simple task- suggest if you perform it not to multitask with
other assignments!!
Remember to backup at all times!!!
---------------------------------
Option B
Open G have developed a VI library package  to achieve the same object.
Suggest you study how the instrument library is built up.
 Also read the NI articules on developiong
Instrument drivers.
 
Go for it
chow xseadog
0 Kudos
Message 16 of 19
(621 Views)

Thanks for all your good answers!

1. test

One of the goal here is to control all 8- pulse gen(8133a) parameters simulataneously. The ultimate goal is to activate one pulse generator increment, measure, plot (in frontpanel graph) and record the raw data in excel spreadsheet. (plz see the attached excel file for the graph)

2. instrument library

sorry to ask this but I could not understand after the 1st step in xseadog's posting. Basically, I created a new folder and copied 8348a.llb into the new folder and renamed all VIs withi "-c" suffix. Could you please elaborate on steps for optionA (again)?

Thanks a bunch!

0 Kudos
Message 17 of 19
(604 Views)
Are you having problems with any particular step in that process (Option A)?
 
Logan S.
0 Kudos
Message 18 of 19
(593 Views)

I think the first three steps are to change file names with new suffix ("-c"). I am not sure how to do the step 4 (Option A). Can someone be kind enough to elaborate on this step?

Thanks,

0 Kudos
Message 19 of 19
(590 Views)