Suggest Me the Best Option To Use

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kvishnubhat
    New Member
    • Mar 2008
    • 4

    Suggest Me the Best Option To Use

    Hi
    I have created a form in version VB6. Basically I want to control a relay using a click button. There are 8 relays connected and i am using 8 different command buttons to switch "ON" and "OFF". My Objective is to one cmd button should control one relay and 8 relays should work indipendtly( should not wait ). I am stuck with code, confused what to use?

    Please help me with prototype code.
    Reply if you have any questions.

    Thanks
    Vishnu
  • novercent
    New Member
    • Mar 2008
    • 6

    #2
    you connect that to the parallel port?

    if that case in every pin
    there is a corresponds value

    pin o = PortOut &H378, 1
    pin1 = PortOut &H378, 2
    pin 2 = PortOut &H378, 4
    pin 3 = PortOut &H378, 8
    pin 4 = PortOut &H378,16
    pin 5= PortOut &H378, 32
    pin 6 = PortOut &H378, 64
    pin 7 = PortOut &H378, 128

    and use the io.dll

    Comment

    • kvishnubhat
      New Member
      • Mar 2008
      • 4

      #3
      Originally posted by novercent
      you connect that to the parallel port?

      if that case in every pin
      there is a corresponds value

      pin o = PortOut &H378, 1
      pin1 = PortOut &H378, 2
      pin 2 = PortOut &H378, 4
      pin 3 = PortOut &H378, 8
      pin 4 = PortOut &H378,16
      pin 5= PortOut &H378, 32
      pin 6 = PortOut &H378, 64
      pin 7 = PortOut &H378, 128

      and use the io.dll
      No I am using a serial port - Relay Board Manuf given me drivers for the serail port. With the help of drivers i am able to send the commands. My problem is How to program (In VB6) the different 8 relays i want all the relays to be running with 8 different duty cycle( which is selected by user) and each relay is configurable (i mean is - user should be able to switch on/off at any point of time - may be 10min, 60 min, 2 days etc...)

      Comment

      Working...