LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to read String control with a delay inside the Event structure

Hi friends,

 

I have a problem with reading the string values inside the event structure. Actually I should select the operation using combo box and then the Ok button has to press. If I select the operation and press the Ok button, It will ready the string control instantly and do further process. This results unexpected output and this shouldn't happen. There should be some delay to read the string values. During the delay time, user can enter the input they want. Can anyone solve or comment me some good idea ?????

 

Thanks in Advance Smiley Happy

 

 

Note: I am using LV 8.2. So plz reply accordingly

0 Kudos
Message 1 of 21
(3,372 Views)

Learn about dataflow.  Learn how to correctly use an event structure.  You know, just because you place stuff to the left of your while loop doesn't mean it will execute first.

 

I suggest going here to learn about dataflow.

 

Read the Caveats and Recommendations when Using Events in LabVIEW (this is also in the LabVIEW help).

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 2 of 21
(3,364 Views)

Also try to figure out what the "<button value> OR TRUE" function does that you use all the time. Seems the button value is irrelevant, right?

 

You forgot to attach your subVIs.

0 Kudos
Message 3 of 21
(3,357 Views)

HI Vij@y,

 What is the unexpected output are you getting?

 

Regards,

SrikrishnaNF

Regards,
Srikrishna


0 Kudos
Message 4 of 21
(3,355 Views)

@altenbach wrote:

Also try to figure out what the "<button value> OR TRUE" function does that you use all the time. Seems the button value is irrelevant, right?

 

You forgot to attach your subVIs.



Thanks for your Quick reply sir. Actually I placed Value signal Property node to activative the appropriate event. I jus noted that TRUE constant for all cases were not needed and I removed that. But still I m having the same problem. Herewith I attached the Subvi's. Please find it below.

Download All
0 Kudos
Message 5 of 21
(3,344 Views)

@srikrishnaNF wrote:

HI Vij@y,

 What is the unexpected output are you getting?

 

Regards,

SrikrishnaNF


'Unexpected output' in a sense, Even though if I give the correct input data to the subvi, It's not returning the exact output. It showing error as always...  Hope u can get this !!!!

0 Kudos
Message 6 of 21
(3,339 Views)

Hi Vij@y,

  Have you gone through the post of billko

  ---------------------------------------------------------------------------------------------------------------

Learn about dataflow.  Learn how to correctly use an event structure.  You know, just because you place stuff to the left of your while loop doesn't mean it will execute first.

 

I suggest going here to learn about dataflow.

------------------------------------------------------------------------------------------------------------------.

 

You have place tab control outside of while loop .For suppose i have selected 'Insert' option in combo box and pressed ok,then tab control will show the 1 tab control where insert  string control is placed.So whetever you enter on insert control will not reflect inside the while loop which may lead to unexpected outputs.

 

Also right click on combo box and uncheck "Allow undefined strings" so that the combo box will always give proper values.

 

Regards,

SrikrishnaNF

Regards,
Srikrishna


0 Kudos
Message 7 of 21
(3,317 Views)

@srikrishnaNF wrote:

Hi Vij@y,

  Have you gone through the post of billko

  ---------------------------------------------------------------------------------------------------------------

 

Learn about dataflow.  Learn how to correctly use an event structure.  You know, just because you place stuff to the left of your while loop doesn't mean it will execute first.

 

I suggest going here to learn about dataflow.

------------------------------------------------------------------------------------------------------------------.

 

You have place tab control outside of while loop .For suppose i have selected 'Insert' option in combo box and pressed ok,then tab control will show the 1 tab control where insert  string control is placed.So whetever you enter on insert control will not reflect inside the while loop which may lead to unexpected outputs.

 

Also right click on combo box and uncheck "Allow undefined strings" so that the combo box will always give proper values.

 

Regards,

SrikrishnaNF


HI srikrishnaNF,

 

I made all the changes what u had told and I realize that while loop will not reflect those control values. Then I changed from Event to case structure. Now my concept is working !!!Robot Happy Thanks for your suggestions....

0 Kudos
Message 8 of 21
(3,279 Views)

Vij@y wrote:

@srikrishnaNF wrote:

Hi Vij@y,

  Have you gone through the post of billko

  ---------------------------------------------------------------------------------------------------------------

 

Learn about dataflow.  Learn how to correctly use an event structure.  You know, just because you place stuff to the left of your while loop doesn't mean it will execute first.

 

I suggest going here to learn about dataflow.

------------------------------------------------------------------------------------------------------------------.

 

You have place tab control outside of while loop .For suppose i have selected 'Insert' option in combo box and pressed ok,then tab control will show the 1 tab control where insert  string control is placed.So whetever you enter on insert control will not reflect inside the while loop which may lead to unexpected outputs.

 

Also right click on combo box and uncheck "Allow undefined strings" so that the combo box will always give proper values.

 

Regards,

SrikrishnaNF


HI srikrishnaNF,

 

I made all the changes what u had told and I realize that while loop will not reflect those control values. Then I changed from Event to case structure. Now my concept is working !!!Robot Happy Thanks for your suggestions....


I have no idea what you just said, but it doesn't sound like a reason to change from an event structure to a case structure.  So what are you doing now?  Polling the buttons in a loop?

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 9 of 21
(3,264 Views)

Hi Bill,

 

 

Kindly look up the attached VI below. It might get clear you !

0 Kudos
Message 10 of 21
(3,257 Views)