Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21740

Timer Interfering With Processes

$
0
0
Okay, I need some serious assistance.

I have an app that has a "refresh" timer on the MDI form. This same app has a reference to a Custom ActiveX DLL with all the MSComm controls. The DLL also has user interface forms to set specific properties for each comm device that they want to activate. The DLL has an interface that is implemented in the six separate device types that the main app can communicate with.

The timer is set to activate when the user decides to communicate with the device and all it does is the polling. I was tasked to separate "chained commands" (multiple command lines that could be sent over all at once) into separate "unchained commands". I have modified the "transmit" function in one class thus far to see if I can get it working. I have been able to separate the commands just fine, but if I have multiple commands to send, it sends all the commands one right after the other and does not give my code a chance to grab the response to the first response.

I have put into place to check the response that comes in to ensure that we are receiving the response and it is valid. If I step through the code and process each command, I can receive a response for each command. However, when I just run the code, everything runs too fast, and I think the reason is, is because the timer is taking over. Now, the transmit process in my class and I do not have a way to turn the timer off to transmit multiple commands, then turn it back on.

Any suggestions!?
:confused: :(

Viewing all articles
Browse latest Browse all 21740

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>