VB rs232 trouble

P

Thread Starter

Pedro

I am interfacing with a PIC using vb6. My question is is there a method of polling for comm port without having to use a control in other words i am receiving data but only when i request it with a command. I want to be able to be online with the PIC and receive updates without having to poll the PIC with a command. Any help is greatly appreciated!

Pedro
 
Pedro,

The only way I know of to do what your asking is to have the PLC/pic program be coded so that it loops constantly and is always sending the data you want.

On the VB side, you will probably need to use a Timer control and set the interval property to a setting that works best..... you stated that you did not want to use a control, and a Timer is technically a control...but it doesnt require any interaction.... it contiuously fires as long as the program runs and its state is set to enabled.

Dave
 
use timer to send the command after the desired interval and read the response. i have done this way any number of times. the fastest interval i tried was 30 miliseconds. you don't have any pther option in VB 6.
 
Top