キャンセル
次の結果を表示 
次の代わりに検索 
もしかして: 

problem in queue operation

解決済み
解決策を見る

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

0 件の賞賛
メッセージ1/12
4,422件の閲覧回数
My first guess is that you should change the mechanical action of your Write boolean control from "Switch When Pressed" to "Latch When Pressed" (I prefer "Latch When Released" because it causes LabVIEW to wait until you've released the mouse button before setting the value of the button.)  Your first Case Structure execute when you press the button, then LabVIEW will reset the button to off.  Right-click on the control, select "Mechanical Action" then "Latch When Pressed".
Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

0 件の賞賛
メッセージ2/12
4,402件の閲覧回数

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..    スマイリー びっくりした

0 件の賞賛
メッセージ3/12
4,392件の閲覧回数

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?

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

0 件の賞賛
メッセージ4/12
4,381件の閲覧回数

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

0 件の賞賛
メッセージ5/12
4,372件の閲覧回数

Hi Vikki,

You have to do some work do a forum search of design patterns.Nobody here will do that for you.

Regards

 

Certified LabVIEW Architect.
Ohiofudu Israel

0 件の賞賛
メッセージ6/12
4,358件の閲覧回数

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.

 

0 件の賞賛
メッセージ7/12
4,342件の閲覧回数
You need to have use carriage return after each command (even after the last to work)
0 件の賞賛
メッセージ8/12
4,338件の閲覧回数

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..?

0 件の賞賛
メッセージ9/12
4,306件の閲覧回数
It runs perfect on mine no errors at all. Just open my VI not change anything. I have put the (S Z SI) instrunctions as default, no need to type anything extra on the Command control string.
0 件の賞賛
メッセージ10/12
4,293件の閲覧回数