07-06-2012 03:07 AM
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.....
07-06-2012 03:17 AM
This is not something where an xcontrol seems a reasonable solution. Why don't you just make a plain VI?
07-06-2012 04:35 AM
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?
07-06-2012 09:43 AM
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.