Results 1 to 9 of 9

Thread: i want to control a motor from my computer using vb, anybody know how?

  1. #1

    Thread Starter
    New Member Elite Wraith's Avatar
    Join Date
    Sep 2002
    Location
    Australia
    Posts
    10

    Question i want to control a motor from my computer using vb, anybody know how?

    i want to control a motor from my computer using vb, anybody know how? i would also like to recive inputs i.e limit switches so i know when too turn the motor off. so inputs as well as outputs

    i'm stuck here guys any got any ideas

    also anybody know how to control a joystick port in vb

  2. #2
    Addicted Member
    Join Date
    Mar 2002
    Location
    Lithuania
    Posts
    165
    I was doing some project with stepermotors. I used LPT and direct acces.

    INP(portid) ' returns a byte read from the I/O port portid

    OUT portid, value ' writes the byte value to the I/O port portid

    portid can be any unsigned integer in the range 0-65535. value is in the range 0-255.
    pdata = &H378
    status = &H379
    control = &H37A

    OUT pdata, bits ' output data
    bits = INP(status) ' input data
    P.S. Sorry for my poor English...

  3. #3
    Frenzied Member agmorgan's Avatar
    Join Date
    Dec 2000
    Location
    Lurking
    Posts
    1,383
    What sort of link have you got between your PC and the motor?

  4. #4

    Thread Starter
    New Member Elite Wraith's Avatar
    Join Date
    Sep 2002
    Location
    Australia
    Posts
    10
    i don't have the link yet i want to know the best way too do it

  5. #5
    Fanatic Member
    Join Date
    Jun 2001
    Posts
    521
    I can help, but first tell me the operating system you are using.

  6. #6
    Frenzied Member RudyL's Avatar
    Join Date
    Mar 2001
    Location
    Chicago
    Posts
    1,519
    The best thing would be to get a "data I/O" card from someone like "Advantec". That will give you your inputs and outputs for controlling you motor..


    Rudy
    10 different ways to skin a cat and amazingly enough each and every one has the same result, the cat gets skinned! The same can be applied to code, so be nice and accept each others "preferences".

  7. #7

    Thread Starter
    New Member Elite Wraith's Avatar
    Join Date
    Sep 2002
    Location
    Australia
    Posts
    10
    I'm using win 2k, the thing 'bout the I/O card could you access that through VB

  8. #8
    Fanatic Member
    Join Date
    Jun 2001
    Posts
    521
    You do not need an I/O card unless the parallel port is not powerful enough for you. You would have to build some external circuitry to protect your parallel port and have an external power supply, but that's a lot cheaper than any digital I/O card available, and I'm not even sure those cards can source much current. Check out this thread for more details: http://www.vbforums.com/showthread.p...light=parallel

  9. #9

    Thread Starter
    New Member Elite Wraith's Avatar
    Join Date
    Sep 2002
    Location
    Australia
    Posts
    10
    I GOT IT!!!

    VictorB212, i just built a relay rack for it and i'm it's working fine!!!.

    thanks for everybodys help, if you have any ideas or more thoughts please just post here or email me on [email protected] thanx again.

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