Results 1 to 5 of 5

Thread: VB6 - Faster than Timer control?

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2012
    Posts
    290

    VB6 - Faster than Timer control?

    I'm coding a program where I need really fast time control. I'm trying to send digital data throught the serial port to a radio that produces some electrical pulses. Those pulses are used to send data.

    I need a way much more faster than timer control to produce the pulses of around 0.000001 seconds.
    I don't know if this is possible. If not, I want to know what is the fastest time that vb can produce.

  2. #2
    PowerPoster
    Join Date
    Feb 2012
    Location
    West Virginia
    Posts
    14,206

    Re: VB6 - Faster than Timer control?

    Well if you just put the code in a tight loop it would be very fast, how fast would depend on your system.
    The timer control is not even close to accurate below 100 milliseconds. It will fire faster than 100 milliseconds but you can not depend on it to do so consistantly as it yeilds to others processes.

    Of course the serial port has a max setting of a bit over 100kbps so you are going to have a bottle neck there.

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2012
    Posts
    290

    Re: VB6 - Faster than Timer control?

    I was using the timer at 15msec and I felt that each time the length was different. You confirmed that.
    But if you say that the serial port has a max setting over 100 kbps is enought for me. I was looking a speed of around 20 kbps.

  4. #4
    PowerPoster
    Join Date
    Feb 2012
    Location
    West Virginia
    Posts
    14,206

    Re: VB6 - Faster than Timer control?

    You sample in the Op is faster than that e.g. .000001 would be 1000kbs

  5. #5

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2012
    Posts
    290

    Re: VB6 - Faster than Timer control?

    Quote Originally Posted by DataMiser View Post
    You sample in the Op is faster than that e.g. .000001 would be 1000kbs
    I made some different calculations, but my calculations were using a wrong algorithm. 100 kbps is more than enough for me.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width