08-01-2009 08:20 AM
1.I want to display an new panel before main panel when clicking an button, then input and operate on the new panel ,and before closing the new panel,the main panel is unreachable,what should I do ? ?would you lieke to give me some examples,I am a beginner. thank you!!
2.Another question is how to use a timer to draw curved line dynamically, for example,every 10ms read the memory,then according to the variable to plot . thank you!!
08-03-2009 03:09 AM
1. you can use the button to call a subvi, at the same time hidden main vi'front panel using vi reference and property node.
2. Using timed structure could ensure that you read from a variable every 10ms or other pre-confgured time.
08-03-2009 07:41 AM
There are two steps for displaying panels to the user. First, they must be loaded into memory using LoadPanel() which gives you access to them, and secondly displayed to the user using DisplayPanel() or InstallPopup(). These do not have to be one after the other. So for number 1, I would load both panels into memory right away, which gives you access to both of them, then display the first one then the main panel later.
I'm not sure what you want for 2, but to do something periodically you should create a timer control on the main panel with a callback that fires every 0.01s, then put the code into the callback to read the data and plot it.
08-04-2009 01:07 AM
08-04-2009 01:58 AM
timer to plot ?
the piriod is not that i want. timer is 0.05s;
case EVENT_TIMER_TICK:
i[0]=i[0]+0.05;//时间步长0.05s即50ms
y=50.0*sin(2.0*3.1415926*0.1*i[0]);//正弦函数的周期是10s
yyy[0]=y;//第一条曲线即正弦;
yyy[1]=0;//第二条曲线暂时设置为零;
PlotStripChart(mainPanel, MAIN_PANEL_INNER_STRIPCHART, yyy, 2, 0, 0, VAL_DOUBLE);
but the actual curve is not a 10s sin curve wave,
08-04-2009 01:59 AM
08-04-2009 08:00 AM
08-04-2009 08:57 AM