Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

voltage fluctuation

Hi,
I have a voltage increment vi which is to increase its voltage from -200, to -210, -210, -210, -210, -220, -220, -220, -220, -230 and so on...
I tried running this voltage increment vi many times, so as to see if any problem will occur before starting an experiment. I found out that at first it is alright, but after running a few times, the start value as shown in the graph will be -270, despite me stating -200 as the starting voltage. Then, the plot will go from -270, to -280, to -290, and finally -300, before shooting up again to -200, -210, and so on until -260 for 50 steps. I wonder why there is such a phenomenon? Strangely, the power supply is able to detect -200, then -210, and so on to -300. To add on, I used the probe to chk the valu
es at each point of the wiring and found that the "phenomenon" occurred at the VISA read buffer only, while the rest of the wiring indicate correct data.
Is it a problem with my GPIB instrument or VISA?
Then, another strange phenomenon in the graph plot is that the values will suddenly go from negative to positive at some values, as in it will go from -270, -280, 290, -300, -200, 210,-220, and so on. Hence, there will be some sharp peaks among the steps. I wonder why there will be sudden change of polarity, when i am using a DC supply? Is it because my VISA read is not operating properly?
Could the error be due to not clearing the previous data, that it starts from -270V? is there a way to store each run's data into a file, then future run's in other files, so that the values will not be mixed up? Thanks a lot.

student
0 Kudos
Message 1 of 5
(3,557 Views)
Hello adeline,
Greetings!
What is the hardware that you are using (GPIB card, instrument, etc)? How are you measuring the voltage values?
How did you check the values at each point in the wiring? When you say that "the phenomenon occurred at the VISA read buffer only", do you mean the voltage values are correct before this, and they change to wrong values after this?
Please elaborate on this.
As far as your last question goes, you can certainly store each run's data into different files. Please find a sample program attached for this. This creates a new random name for the file in every run and saves it on your C drive. However, you might get same name after a few runs using this program, and then it may ask you for replacing the file. To aoi
d this, you can generate file names in the sequence (which might involve a little more programming) (say C:\1.txt for your first experiment, C:\2.txt for the second experiment, and so on, which will also help you keep track of them easily).
Thank you for choosing National Instruments!
Swapnil P.
National Instruments Engineer
0 Kudos
Message 2 of 5
(3,557 Views)
Hi Swapnil,
the hardware i am using is power supply PS325, GPIB card is PCI-GPIB. I set the values for the power supply using VISA write, and then read back what is registered by power supply using VISA read. I use the probes at various points to detect the values transmitted since i realised that the number shown the screen of PS325 is different from the graph plot connected to VISA read, but same to VISA write.
The values changes not only in magnitude,but also in polarity at times, so i am puzzled.

adeline
0 Kudos
Message 3 of 5
(3,557 Views)
Hi Swapnil,
i wanted to write to different files, but i couldn't open your file. Could you please send your file in labview 7.0 or less, and not labview 7.1? Thank you
0 Kudos
Message 4 of 5
(3,557 Views)
Hello Adeline,
As mentioned by you in your previous question, this error might be coming from the fact that you are not clearing the readings in earlier experiments (possible). I'd suggest writing to different files for different experiments and see if that helps.
Also, the peaks that you are getting in the graph connected to 'VISA read' might be becuase of the fact that the values read by "VISA read" are not right. Did you try writing one value and then reading it back? Does this work? Does this work repeatatively? Then can you try writing multiple values and then reading these back (as in your current application). This will help you locate where the problem might be ('VISA read', buffer, or somewhere else).
Also,
here's the file for LabVIEW 7.0.
Good luck with your project. And again, thank you for choosing National Instruments!

Swapnil P.
National Instruments Engineer
0 Kudos
Message 5 of 5
(3,557 Views)