09-18-2013 02:09 AM
I am having list of instruments e.g. powersupply, multimeter, etc which i need to automate.
I am using two types of looping system,
a) For Loop- to run a list of instruments continuoulsy the no. of times i will put in for loop e.g. For(3) will run the instruments within For Loop 3 times.
b) Loop- to program list of instruments to different values programatically e.g. Loop(3,5,7) wil program the instrument within the loop first to 3 value then 5 and then 7.
and at the end i am using End(For) or End(Loop) to terminate For or Loop.
with the help from NI Forum members i am able to run the first For Loop but i want to implement Loop also i tried several logics but not getting how to make a vi so that i am able to run both the looping system simultaneously.
below i am attaching the VI.
09-18-2013 02:41 AM
Hi Ritu,
as first step you should remove "default if unwired" tunnels by wiring them.
Then you should remove the Rube-Goldberg of the 2nd FOR loop...
It seems you want to create some kind of simple batch interpreter. To do so you have to keep certain command settings in a shift register, like start index of loop, loop counts etc. Try that - after drawing a sketch on paper (!) to visualize the needed programming steps...
09-18-2013 05:45 AM
Thanks GerdW for reply,
I tried modifying the code but output is not coming as expected.
below attached is the modified vi.
09-20-2013 02:58 AM
Hello ,
Now i am doing the program to implement only one single loop to program the instrument to several values through automation, in this program i am not getting how to replace the previous value with new one loop values.
attached below is the vi which shows the expected output.
09-20-2013 03:19 AM
09-20-2013 03:24 AM
Hello GerdW,
Thanks for the reply,
Below i am attaching the vi in LabVIEW 9 version
09-20-2013 03:32 AM
Hi Ritu,
your batch language is badly designed...
It would be much easier to replace values in commands when there is some kind of marker (or format code) to replace to.
Right now you have to make sure your know all commands in advance and you have to know which value to replace in those commands...
So instead of having "GPIB0::8::INSTR,NORESET,6,1,0,0,ON" you should write "GPIB0::8::INSTR,NORESET,%d,1,0,0,ON".
Then you just use FormatIntoString to replace %d with the loop value!
09-20-2013 04:06 AM
because of some project requirement i need to use it like this only, and the problem that i am facing here is i need to replace those loop values with power supply only e.g. E3646 in this case then how to differentiate with E3646 and K2001 like this i am nto able to identify how to work on this. how to make this loop to work properly.
09-20-2013 08:44 AM