LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Does anyone know how I can step between different voltages say from a list or table for a Agilent E3631A?

I am just getting started with Labview. I have the 8.0 version installed.
I currently trying to get the E3631A power supply to step through a list or table of different levels. For example: 2.0,1.8,1.53,1.25 and so forth. Is there anyway that I can create a panel where the user can enter the desired values in a list or table then, he/she can scroll through that values one by one by clicking a next button.
 
Thanking everyone in advance for your help.
 
0 Kudos
Message 1 of 14
(3,591 Views)
Here's a simple example with a numeric array for an input. It uses an event structure to index the array whenever a 'write' button is clicked. There are a lot of other ways that this can be done. You can use a table which is nothing more than a 2D string array. You would just have to index it a little differently. It could also be setup so that after clicking the 'Start' button, the first value would be indexed and written to the instrument.
0 Kudos
Message 2 of 14
(3,587 Views)
Thanks for the help Dennis.

Now, what I have done is combined your vi with the existing vi for 3631 power supply.

Is says the the data type is different. Can you help me with this. I think, once this is converted right, it should be working. I am trying to find where I can change the 1D arry to a double.

Here is the vi.
0 Kudos
Message 3 of 14
(3,579 Views)
okay, I guess I found a way to get rid of the error. But now what happens is that the power supply stays off. (output off).

Here is again with the changes. Can you take a look at it.

Thanks
0 Kudos
Message 4 of 14
(3,579 Views)
The idea was to place your instrument code in the event called 'write'. Where I had the 'value to instrument' is where you should be putting the driver. The way you have it, nothing gets runs until you stop both while loops and the indexing is not correct.
0 Kudos
Message 5 of 14
(3,574 Views)
Here is what I did now.

I placed the device in the while loop.
Now I have the power supply actually go through the table of values when I hit next. Thats the good news.

Bad news is that the as soon as the voltage is set say to 1.20v, it sets itself back to 0.00 again. When I hit the next, it goes down the list to say 1.23v then it sets itself to 0.00 again. it does not seem to stay at the voltage level till I hit next.

I removed the second set of voltages, so I can just troubleshoot one side first. Once that is ready, I will put the second list of voltage table. ( its a dual power supply)

Thanks
0 Kudos
Message 6 of 14
(3,567 Views)
Hi Dennis,

I got to work for one set list of numbers. It goes through the table just fine. Sets the voltage and does not change till I hit the write again.

Now, I have added the second list to control the second output of the power supply.

VTI(value to instrument)

It works the went I write once. The VTI and VTI2 goes according to the list.

When I hit write again, the VTI steps to the next value but VTI2 remains the same. It stop going down the list.

Can you check the structure of the code?

Thanks
0 Kudos
Message 7 of 14
(3,565 Views)
Can't right now. I don't have 8.0 at home and it'll hve to wait until I can use my 8.2 evaluation copy. There were a lot of problems with your first example and I only mentioned the worst. Are you still using a separate while loop and event structure for the other ps output?
0 Kudos
Message 8 of 14
(3,561 Views)
If you want to update both outputs at the same time, you use a single shift register for the array index and wire it to the index array function to get the value. I've modified your last example to show how this would be done. I also cleaned up the wiring some. I also put the initialize and close outside the while loop so each is only done once. It also looks like the initialize function you are using needs to be modified. I suspect that it is a version that uses 'Old VISA Open'. This can cause problems. Open this VI and if the 'Old' is there, right click on it and select Replace and browse to the regular VISA Open on your palette. This will disconnect the string that used to be the gpib address. Delete the string control for address. Right click on the VISA reference and select Show Control. Go to the front panel and wire the VISA reference to the connector pane where the string control was. This should be the upper left most connector. Now you can use a VISA Resource Name on your VI's front panel.
0 Kudos
Message 9 of 14
(3,550 Views)
okay. I did encounter the "old visa' problem. So, I changed it as you said. But now, other error appeared.

Here are the error.
visa write in HPE3631A configure output.vi
>HPE3631A Application.vi>Step voltageV3_mod.vi
0 Kudos
Message 10 of 14
(3,544 Views)