LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

problem with drawing chart in event driven programming and XControl

Dear my friends

I have a xcontrol, that has two buttom and a chart. i want to do this:

1- when i press the "start" button chart starts to add random numbers

2- when I press the "stop" button the start should stop drawing random numbers.

 I mean after pressing the start the chart should add points until I press the stop button.

 

also I add "start button value change"  event case and i put the code inside that event.

but when i press the start the chart adds one point.

using while loop inside a event case is not good for adding extra points.

 

can someone help me how to do this?

 

I oppologize due to my weak english.....Smiley Embarassed

0 Kudos
Message 1 of 4
(2,181 Views)

This is not something where an xcontrol seems a reasonable solution. Why don't you just make a plain VI?

Message 2 of 4
(2,177 Views)

thanks for reply

you know, I want to make something like user define control in .net and then I want to use this control in various applications

also I want to add 2 or 3 number of this control in my main VI. due to that I want to learn XControl.

the situation above is an example. my goal in to learn xcontrol design and usage in labview.

 

so if xcontrol is not a good solution, what do you suggest for my problem?

0 Kudos
Message 3 of 4
(2,172 Views)

An Xcontrol immediately returns after each Read or write. It should not stall the calling VI. It is not something that should run for extended periods. You can use a plain reentrant subVI, for example.

 

If you want to learn about Xcontrols, have a look at the dual mode thermometer (or similar) that is included with the example finder.

Message 4 of 4
(2,166 Views)