LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

enable/disable question

I am trying to enable each pair of equipments at a time to execute the "%xtalk vs # of channel" case.
The idea is to do the following steps. (no matter what the front panel status is)
 
1. Enable 1 & 2 (all others off)
2. Set 1 & 2
3. obtain scope data
4. create array, plot and save data
5. Enable 3 & 4 (while 1 &2 still on and all others off)
6. Set 3 & 4 (now 1 thru 4 are on)
 
I am having a trouble how to hook up case selectors for how to enable pairs progressively with each case structure.
(Step 1)
pehaps, I have one too many loop?
 
0 Kudos
Message 1 of 10
(3,266 Views)
Hi Jjlee,

I looked at the code and wanted to make a few recommendations first.

1) make sure to use either the "Number of iterations" input on for loops, or auto index the for loop with an array input to the for loop. Otherwise the loop won't know how many times to run. Also make sure you connect your case selectors for all of your case structures.

2) You could save a lot of space on this VI if you would create sub-VIs for a lot of this functinality. That would make your code much easier to read/troubelshoot.

Regarding what you're trying to do with step 1)  in your post, this should be relatively simple. Before I get too much into possible solutions, I wanted to check this. Do you plan on controlling which instruments are under control with the front panel items after you've done this initial read? Or are you getting rid of the front panel as the way to control this setup? You say you want to do this regardless of the front panel controls, so I was just curious and wanted to make sure I gave an answer that suited your application.

Regards,
Matt S.

LabVIEW Integration Engineer with experience in LabVIEW Real-Time, LabVIEW FPGA, DAQ, Machine Vision, as well as C/C++. CLAD, working on CLD and CLA.
Message 2 of 10
(3,222 Views)
Hi Matt S,
 
Thanks for your response.
 
I would simplify and create a subVI once I can get this to work.
 
1. I am trying to reset (disable) all pulse gens on the front panel regardless of the current status of each instrument.
This is necessary to enable each pair with NAND gate to enable each pair loop...
 
So, I added the numeric array elements then compare the results to 0...
basically, if any one of the enable is ON, then do the loop to turn everything off.....regardless....(please see the %xtalk vs. # of channel case for the commment)
 
I don't know how to write to disenable all instruments.
 
I hope this does make a sense.
 
Regards,
 
 
0 Kudos
Message 3 of 10
(3,207 Views)
Hi Matt S,
 
I added the loop to disable all aggressors on the front panel, but it is still not working as expected.
 
- how should I modify 'HP8133A output channel selec_mod_F.vi' to disable all output channels....(it is doing opposite currently)
 
- once all are diabled, should turn 2 channels at a time (1&2, 3&4, 5&6 and 7&8 sequence) to conduct test and collect data to display and save...
 
thanks,
 
0 Kudos
Message 4 of 10
(3,179 Views)
Hi again,

In your HP8133A Output Channel Selec_mod_F.vi it's using the select line VI to determine which command to build and send out to your device. You could try something like this.

Keep in mind, this is going to give all of the instruments the same settings (what ever you set the Channel 0/2 and req Divider and Trig Source Mode switches to). If you want different settings for each instrument, you'll want to build an array much like the first one that has 0-7 in it that has the settings for each of those instruments.

Let me know if this does what you're wanting done.

Regards,
Matt S.


LabVIEW Integration Engineer with experience in LabVIEW Real-Time, LabVIEW FPGA, DAQ, Machine Vision, as well as C/C++. CLAD, working on CLD and CLA.
Message 5 of 10
(3,126 Views)

Hello,

Could you please re-save it in v7.1 if possible?

(can't open)

 

Regards,

John

0 Kudos
Message 6 of 10
(3,116 Views)
Hi John,

Most certainly!

Again, let me know if this is close to what you want done.

-Matt S.

LabVIEW Integration Engineer with experience in LabVIEW Real-Time, LabVIEW FPGA, DAQ, Machine Vision, as well as C/C++. CLAD, working on CLD and CLA.
Message 7 of 10
(3,082 Views)

Hi Matt S,

First of all, thanks for saving the file in v7.1. I have tried to run the modifed VI you had uploaded with different GPIB addresses and it seems like that is what I want the VI to do....(disable all pulse gens)....

I am not sure how to append the 'modified apps.vi' to the attached VI?

I think it would be necessary to use either one of the sequence structure to disable all pulse gens before start to enable them 2 at a time and measure the data. Let me know how I can accomplish this....

Thanks,

0 Kudos
Message 8 of 10
(3,052 Views)
You can use a number of methods to do what you're trying to do. I would recommend first turnning all of your channels off using the VI I sent (possibly in a for loop so you can turn of the channels for each GPIB address). Then, you can use a sequence structure to enable the channels in what ever order you want, and then a sub-VI that runs these tests inside that sequence structure to run the tests with those particular channels on. That would be just one way to do this. Again, there are many ways to do what you're looking to do.

Regards,
Matt S.

LabVIEW Integration Engineer with experience in LabVIEW Real-Time, LabVIEW FPGA, DAQ, Machine Vision, as well as C/C++. CLAD, working on CLD and CLA.
Message 9 of 10
(3,027 Views)

Hi Matt S,

I was able to create a subVI of the modified VI from your previous posting. used a couple of case structures and for loop to index enable and turn off all aggressors when the overall case is true....it just clears all front panel enables....to off position....

Thanks for your help!

Regards,

 

0 Kudos
Message 10 of 10
(2,998 Views)