From: Steve on

"Bob Butler" <noway(a)nospam.ever> wrote in message
news:o2LSn.8252$1Q5.1793(a)newsfe08.iad...
>
> "Steve" <sredmyer(a)sndirect.com> wrote in message
> news:hvfthk$2if$1(a)news.eternal-september.org...
>>
>> <tadamsmar(a)yahoo.com> wrote in message
>> news:56fc3fe5-6f45-4bd8-8e0d-18c92bcece7e(a)z8g2000yqz.googlegroups.com...
>>> On Jun 17, 4:36 pm, ralph <nt_consultin...(a)yahoo.net> wrote:
>>>> On Thu, 17 Jun 2010 12:57:00 -0700 (PDT), "tadams...(a)yahoo.com"
>>>>
>>>> <tadams...(a)yahoo.com> wrote:
>>>> >The subroutine aquired more data and tries to update the chart, but I
>>>> >did not get a redisplay of the chart till the subroutine ended.
>>>>
>>>> How is this routine acquiring "more" data?
>>>>
>>>> >I can get visible updates using a timer.
>>>>
>>>> Then do the same. Break up the subroutine so that is a series of
>>>> "Events".
>>>
>>> How do you kick off an event from a subroutine? What is the call for
>>> that? Thanks!
>>>
>>> I have a subroutine Command1_Click. I can kick it off with a command
>>> button or via a timer, but how do I put it on the event queue using
>>> calls in a subroutine?
>>
>> All one must do to "fire" an event handler is to call the event handlers
>> routine.
>> ie.
>> Call Command1_Click()
>>
>> Simple as that
>
> A better option, IMO, would be to use
> Command1.Value = True
>
>

Agreed.

From: tadamsmar on
On Jun 18, 11:03 am, "Steve" <sredm...(a)sndirect.com> wrote:
> "Bob Butler" <no...(a)nospam.ever> wrote in message
>
> news:o2LSn.8252$1Q5.1793(a)newsfe08.iad...
>
>
>
>
>
>
>
> > "Steve" <sredm...(a)sndirect.com> wrote in message
> >news:hvfthk$2if$1(a)news.eternal-september.org...
>
> >> <tadams...(a)yahoo.com> wrote in message
> >>news:56fc3fe5-6f45-4bd8-8e0d-18c92bcece7e(a)z8g2000yqz.googlegroups.com....
> >>> On Jun 17, 4:36 pm, ralph <nt_consultin...(a)yahoo.net> wrote:
> >>>> On Thu, 17 Jun 2010 12:57:00 -0700 (PDT), "tadams...(a)yahoo.com"
>
> >>>> <tadams...(a)yahoo.com> wrote:
> >>>> >The subroutine aquired more data and tries to update the chart, but I
> >>>> >did not get a redisplay of the chart till the subroutine ended.
>
> >>>> How is this routine acquiring "more" data?
>
> >>>> >I can get visible updates using a timer.
>
> >>>> Then do the same. Break up the subroutine so that is a series of
> >>>> "Events".
>
> >>> How do you kick off an event from a subroutine?  What is the call for
> >>> that?  Thanks!
>
> >>> I have a subroutine Command1_Click.  I can kick it off with a command
> >>> button or via a timer, but how do I put it on the event queue using
> >>> calls in a subroutine?
>
> >> All one must do to "fire" an event handler is to call the event handlers
> >> routine.
> >> ie.
> >>    Call Command1_Click()
>
> >> Simple as that
>
> > A better option, IMO, would be to use
> >   Command1.Value = True
>
> Agreed.- Hide quoted text -
>
> - Show quoted text -

Thanks, that makes it easy to play around with my existing
code. I have a prototype that updates a chart when
I hit one of 3 command buttons (an array of 3 buttons)

The handler acquires 1 second of data from a A/D converter and
displays it on a plot.

Now I think I have a different problem.

I don't think an MSChart updates if there are more events on the
queue.

If I put this in Form_Load:

Command1(0).Value = True
DoEvents
Command1(1).Value = True

I don't get one plot followed by another as I would expect.
Instead, I just get the last plot from Command1(1).

Also, if I just hit two of the buttons one after the others quickly so
that the plot does not get a chance to update, then I only get a
display of the last plot.

I can't find a way to get MSChart to update on the display before
going to the next event.
From: tadamsmar on
On Jun 18, 11:59 am, "tadams...(a)yahoo.com" <tadams...(a)yahoo.com>
wrote:
> On Jun 18, 11:03 am, "Steve" <sredm...(a)sndirect.com> wrote:
>
>
>
>
>
> > "Bob Butler" <no...(a)nospam.ever> wrote in message
>
> >news:o2LSn.8252$1Q5.1793(a)newsfe08.iad...
>
> > > "Steve" <sredm...(a)sndirect.com> wrote in message
> > >news:hvfthk$2if$1(a)news.eternal-september.org...
>
> > >> <tadams...(a)yahoo.com> wrote in message
> > >>news:56fc3fe5-6f45-4bd8-8e0d-18c92bcece7e(a)z8g2000yqz.googlegroups.com....
> > >>> On Jun 17, 4:36 pm, ralph <nt_consultin...(a)yahoo.net> wrote:
> > >>>> On Thu, 17 Jun 2010 12:57:00 -0700 (PDT), "tadams...(a)yahoo.com"
>
> > >>>> <tadams...(a)yahoo.com> wrote:
> > >>>> >The subroutine aquired more data and tries to update the chart, but I
> > >>>> >did not get a redisplay of the chart till the subroutine ended.
>
> > >>>> How is this routine acquiring "more" data?
>
> > >>>> >I can get visible updates using a timer.
>
> > >>>> Then do the same. Break up the subroutine so that is a series of
> > >>>> "Events".
>
> > >>> How do you kick off an event from a subroutine?  What is the call for
> > >>> that?  Thanks!
>
> > >>> I have a subroutine Command1_Click.  I can kick it off with a command
> > >>> button or via a timer, but how do I put it on the event queue using
> > >>> calls in a subroutine?
>
> > >> All one must do to "fire" an event handler is to call the event handlers
> > >> routine.
> > >> ie.
> > >>    Call Command1_Click()
>
> > >> Simple as that
>
> > > A better option, IMO, would be to use
> > >   Command1.Value = True
>
> > Agreed.- Hide quoted text -
>
> > - Show quoted text -
>
> Thanks, that makes it easy to play around with my existing
> code.  I have a prototype that updates a chart when
> I hit one of 3 command buttons (an array of 3 buttons)
>
> The handler acquires 1 second of data from a A/D converter and
> displays it on a plot.
>
> Now I think I have a different problem.
>
> I don't think an MSChart updates if there are more events on the
> queue.
>
> If I put this in Form_Load:
>
> Command1(0).Value = True
> DoEvents
> Command1(1).Value = True
>
> I don't get one plot followed by another as I would expect.
> Instead, I just get the last plot from Command1(1).
>
> Also, if I just hit two of the buttons one after the others quickly so
> that the plot does not get a chance to update, then I only get a
> display of the last plot.
>
> I can't find a way to get MSChart to update on the display before
> going to the next event.- Hide quoted text -
>
> - Show quoted text -

If I update with a timer, the update always works.

The subroutine acquires data from 1 second from an A/D and then plots
it with MSChart

If I run the subroutine from command button handlers, then the I only
get one update of the plot if I hit the buttons repeatedly at a high
rate exceeding 1 per second. But I can turn on a timer for one
iteration (set interation to a non-zero value and then set it to zero
when the timer runs) and call the subroutine from the timer and I
alway get a new plot.