LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Voltage increment

How do i vary the voltage increment with the for loop? As in during the first i, there will be an increment of 10V, the next 4i, no increment, then the next i another increment of 10V, followed by next 4i of no increment? I tried keying into an array, but is too troublesome. Is there a better way to let this increment to go on by itself, without me keying in 10V,0V,0V,0V,0V,10V,0V,0V,0V,0V, and so on?

Thanks for your help in advance.
student
0 Kudos
Message 1 of 11
(4,118 Views)
Hi Adeline
There are various choices for that.
See attached doc for one of them

Hope it helps you
regards
Alipio
---------------------------------------------------------
"Qod natura non dat, Salmantica non praestat"
---------------------------------------------------------
0 Kudos
Message 2 of 11
(4,118 Views)
adeline wrote:

> How do i vary the voltage increment with the for loop? As in during
> the first i, there will be an increment of 10V, the next 4i, no
> increment, then the next i another increment of 10V, followed by next
> 4i of no increment? I tried keying into an array, but is too
> troublesome. Is there a better way to let this increment to go on by
> itself, without me keying in 10V,0V,0V,0V,0V,10V,0V,0V,0V,0V, and so
> on?
>
> Thanks for your help in advance.
> student

Hello

Make an Array of 5 Values, use the "Quotient &
Reminder" Function on the [i] (with a divisor of 5) and wire the
reminder to an "index array".
The same (Quotient & Reminder) would work when wired to a
case-statement, where you only have 0 and default. In the 0-case you
inc
rement by 10V, in the default-case 0V.

I hope this helps a bit.

Marco
0 Kudos
Message 3 of 11
(4,118 Views)
Hi alipio,
thanks for your answer. To check my understanding, From the diagram, does it mean that if the remainder is zero, as when I divide i by 5, where i may be multiples of 5, I will have an increment of 10V, but when i are values like 1,2,3,4 , I will have an increment of 0V?
However, when i connect as shown in the diagram,except omit the array(dbl), by connecting with start value using a + icon in a for loop, both the while and for loop can only run once. Is there any error that i have made?
please enlighten me, thanks.

student
0 Kudos
Message 4 of 11
(4,118 Views)
Hello Marco,
do you mean making the array of 5 values as a control or indicator? Do you mean firstly, wire similarly as suggested by alipio, except that instead of the =0 icon, and rest, replace it with an index array, as in the array of 5 values like 10V, 0V, 0V, 0V, 0V?
Then if so, can i say that later if i want 10V, 0V, 0V,0V, i only need to form 4 values and with a change of divisor from 5 to 4?

Please enlighten me.
student
0 Kudos
Message 5 of 11
(3,943 Views)
Hello again
Ok, you understood ok.the array choice can be more flexible to cahnge values.
Since you application seems to be a Standford PS325 power supply control, please, post it here and somebody will take a look and try to make it run and comment changes.

cheers
Alipio
---------------------------------------------------------
"Qod natura non dat, Salmantica non praestat"
---------------------------------------------------------
0 Kudos
Message 6 of 11
(4,118 Views)
Hi Alipio,
attached is my application. Could you help me see if anything is done wrongly? Thanks.
The number of steps i use is 100, and the start value and increment are set to -200 and -10 respectively as my PS325 can only handle with -ve numbers.
Cheers,
student
0 Kudos
Message 7 of 11
(4,118 Views)
Hello Adeline
I made some minor changes to your vi (Lv 7.0) and hope it runs.
Well, you are trying to develop a driver for a GPIB instrument, and that work is done. In this web, there are more than 600 drivers ready to use.
Check this link and download visa driver for your power supply. Study it a use the vis adding your code. It will be very useful and instructive.

http://search.ni.com/query.html?lk=1&col=alldocs&nh=500&rf=3&ql=&pw=595&qp=%2BContentType%3AInstrumentDriver+%2BIDNetInstrumentType%3A%22Power+Supplies%22+%2BIDNetManufacturer%3A%22Stanford+Research%22&qt=&layout=IDNet

Hope it helps
Alipio
---------------------------------------------------------
"Qod natura non dat, Salmantica non praestat"
---------------------------------------------------------
0 Kudos
Message 8 of 11
(4,118 Views)
Ok, the modified vi
Alipio
---------------------------------------------------------
"Qod natura non dat, Salmantica non praestat"
---------------------------------------------------------
0 Kudos
Message 9 of 11
(4,118 Views)
Just another choice
Alipio
---------------------------------------------------------
"Qod natura non dat, Salmantica non praestat"
---------------------------------------------------------
0 Kudos
Message 10 of 11
(4,118 Views)