06-15-2010 04:24 AM
hello friends,
in the vi below if I am putting more than one commands ie strings in command control all the commands start executing one by one and after all commands are finished again they start executing as they are in loop..
for example if in the command control : S
Z
SI
these are the commands then the order of execution is like this S then Z then SI then again S then Z then SI again S....and so on till I stop the loop..
but what I want that it should work like S then Z then SI and SI(ie the last command) should continue execution till I stop the loop..
can anyone help me out as I got stuck with this problem..
thanx in advance
Solved! Go to Solution.
06-15-2010 05:34 AM
06-15-2010 05:48 AM
thank you..but I have to make this as sub vi with command as input and mass as output..
but still my problem is unsolved as I think I need to first queue the command string and then dequeue it so that every dequeue operation will pop out one command and it will be send for execution..but I was facing dequeing the command string ..sorry this might be easy quetion but I am new to labview..pls help me out..
06-15-2010 06:06 AM
Are you familiar with the Producer/Consumer design pattern? Do you know how Queues work?
What is this "this" that you speak of making into a sub-VI? What commands will you need to send it?
06-15-2010 06:26 AM
No I have no idea about the Producer/Consumer design pattern..About queues I had an idea through labview help and I haven't work with queues before..
and I want to make my VI as subvi with one input(command control) and one output(MASS indicator)..such that if I put 3 commands in the command control all the three should execute once..
can you send me an easy example of the use of queues with strings.
thnx
06-15-2010 07:02 AM
Hi Vikki,
You have to do some work do a forum search of design patterns.Nobody here will do that for you.
Regards
06-15-2010 08:08 AM
Hi Vikki,
It took me some time to do that and i am sure that is not the best way to do it but finally it works.
Hopefully that's good for your application. Have a look at the modified version.
06-15-2010 08:11 AM
06-16-2010 05:56 AM
Hi Dimitrios,
thanks for your effort but when I tried with your solution with carriage return error-1073807339 is occuring at the visa read which says timeout expired before operation completed.
Can you rectify that..?
06-16-2010 07:10 AM