06-22-2010 10:05 AM
hello friends,
actually I am new to labview..and I got stuck in a problem
actually I have refnum and I want is that if bolean is TRUE the refnum should go to visa close and if its FALSE then it needed to be pass the refnum through the shift register of the loop..
please help me out..that which function should I use..
thanx in advance
06-22-2010 10:09 AM
Hi vk29,
use a case structure...
Next time please attach a VI or atleast a picture of your code. So we could get the context much easier instead of reading between the lines of boolean, refnum, VISA close and shift register...
06-22-2010 10:12 AM
in the true case write the visa code, in the false one ... write the other code (shift reg).
06-22-2010 10:20 AM - edited 06-22-2010 10:21 AM
You description makes absolutely no sense. Where is the shift register? What loop? Is the VISA close inside the loop?
Please show us a picture or attach some code!
Also please use a descriptive title in your posts, directly related to the problem! When you wrote "Basic Help" I thought you had problem with the pH being too high. 😄
06-22-2010 10:22 AM
Just by your description, I can already forsee a problem.
You should never have a VISA close in a loop.
It will close the first iteration, then throw an error the next time because it is already closed.
06-22-2010 10:26 AM
sorry friends...here I am attaching the VI
I have tried case structure but it is showing error.![]()
06-22-2010 10:32 AM - edited 06-22-2010 10:35 AM
06-22-2010 12:45 PM
hello GerdW,
in the solution you gave the boolean close and the boolean stop are doing the same thing..
and I wanted there should be a boolean close such that if its value is true it should close the visa and if its false it should pass the value of refnum through shift register..![]()
06-22-2010 01:15 PM
06-22-2010 01:19 PM
It makes sense if the purpose is to close the VISA session so an external program can access the port. In that case, the read and write Booleans would have to be set to false first.
Your original program needs to wire the reference from the code outside the loop to the shift register and inside the loop, all of your VISA references should come from the shift register.