| Register | FAQ | Calendar | Search | Today's Posts | Mark Forums Read |
|
#1
| |||
| |||
| I am using a 1 second timer object to update some variables on screen every second in vXh. When I try to use the serial functions to answer an inbound modem call on Com 1, the timer aborts my connection each second. If I make the timer longer, I am able to answer the modem call but I lose the data updating to the screen. Is there a way to suspend the timer in code until my modem comm is completed? If so, what is the syntax ? |
|
#2
| |||
| |||
| Ed, Clicking on your timer and take a look on the Object Manager, you can see that by default the AUTORUN property is turned on. If you don't need your timer to start together with your .exe, then turn AUTORUN to FALSE. I think in case of listening a port is better to start the timer by code, for example in this way: METHOD Form1_OnLoad( Sender ) CLASS Form1 .... ::Timer1:Start() .... RETURN Self and in the OnTimeOut method you can manage to restart the timer as many times you wish - a GLOBAL variable can be used for looping. METHOD Timer1_OnTimeOut( Sender ) CLASS Form1 if ..... ..... Sender:Start() else .... endif RETURN Self With ::myTimer:Stop() the timer can be stopped - usually elsewhere in your code. Ella "Ed J" <foodwatch2003@yahoo.com> wrote in message news:965b8491-9733-4149-91f6-233fd813471b@k13g2000hse.googlegroups.com... >I am using a 1 second timer object to update some variables on screen > every second in vXh. When I try to use the serial functions to answer > an inbound modem call on Com 1, the timer aborts my connection each > second. If I make the timer longer, I am able to answer the modem > call but I lose the data updating to the screen. Is there a way to > suspend the timer in code until my modem comm is completed? If so, > what is the syntax ? |
|
#3
| |||
| |||
| On Aug 9, 4:39*pm, "Ella Stern" <ellail...@gmail.com> wrote: > Ed, > > Clicking on your timer and take a look on the Object Manager, you can see > that by default the AUTORUN property is turned on. If you don't need your > timer to start together with your .exe, then *turn AUTORUN to FALSE. > I think in case of listening a port *is better to start the timer by code, > for example in this way: > > METHOD Form1_OnLoad( Sender ) CLASS Form1 > * *.... > * *::Timer1:Start() > * *.... > RETURN Self > > and in the OnTimeOut method you can manage to restart the timer as many > times you wish - a GLOBAL variable can be used for looping. > > METHOD Timer1_OnTimeOut( Sender ) CLASS Form1 > * *if ..... > * * * ..... > * * * Sender:Start() > * *else > * * * .... > * *endif > RETURN Self > > With ::myTimer:Stop() *the timer can be stopped - usually elsewhere in your > code. > > Ella > > "Ed J" <foodwatch2...@yahoo.com> wrote in message > > news:965b8491-9733-4149-91f6-233fd813471b@k13g2000hse.googlegroups.com... > > > > >I am using a 1 second timer object to update some variables on screen > > every second in vXh. *When I try to use the serial functions to answer > > an inbound modem call on Com 1, the timer aborts my connection each > > second. *If I make the timer longer, I am able to answer the modem > > call but I lose the data updating to the screen. *Is there a way to > > suspend the timer in code until my modem comm is completed? *If so, > > what is the syntax ?- Hide quoted text - > > - Show quoted text - Thanks for the info Ella. As it turns out I am monitoring the port for a ring detect, then answering and capturing a predefined packet length. I found I could change the time on the timer on the fly, so I simply extend the timer beyond the last possible time data would fill the buffer, then reset the timer back to 1 second to return to normal operation. This allows me to always have a timer running to catch any unexpected events. I will try your suggestion tomorrow. Thanks again. |
![]() |
| Thread Tools | |
| Display Modes | |
In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.