Members

Technology Zones

Articles

Hosted By

MaximumASP

Info

To count encoder pulses

Last post 05-04-2008 7:03 PM by emirlix. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 04-28-2008 8:08 AM

    • pramodk04
    • Not Ranked
    • Joined on 04-28-2008
    • India
    • New Member
    • Points 10

    To count encoder pulses

    Hi Friend

    I m doing wrting a code in vb6 to count encoder pulses.

    As to communicate with  ports I include WIN95IO.dll in my program through with i can communicate with port by using VBINP and VBOUT function.

    Now my problem is that i m confused that, how to write a code to count encode pulses at run time.

    Pls help me for that.

    • Post Points: 10
  • 05-04-2008 7:03 PM In reply to

    • emirlix
    • Not Ranked
    • Joined on 05-03-2008
    • United States
    • New Member
    • Points 35

    Re: To count encoder pulses

    There is an excellent article at

    http://www.aaroncake.net/electronics/vblpt.htm

     Presumably, you would constantly check

     BitStatus%(port_number, number_of_bit_corresponding_to_encoder)

    I would caution, however, that Windows is not a real-time operating system.  You really need to ensure nothing else is running, and avoid doing anything to update the screen, if pulses are less than 50 milliseconds apart.

    This is a job better suited to a PLC or real-time operating system.


     

    • Post Points: 5
Page 1 of 1 (2 items)