|
-
Jun 18th, 2003, 12:56 PM
#1
Thread Starter
Hyperactive Member
mscomm example?
I have researched mscomm on this website and others and cannot find what I'm looking for. I would like to know how to send data from my computer, through either serial or parallel port, to send 8 bits to a relay.
Does anyone have any example code or good web sites that discuss output instead of input using mscomm?
Thanks for any help.
If you think education is expensive, try ignorance.
-
Jun 18th, 2003, 01:12 PM
#2
Hyperactive Member
Set Sthreshold to 1 and
mscomm.Output = "yourdata"
If you want to be loved, first love who God gave to you.
"Se você quer ser amado, primeiro ame quem Deus te deu"
(Acts 20:35)
-
Jun 18th, 2003, 01:13 PM
#3
Hyperactive Member
if all you want to do is send data then you do so like this
VB Code:
MsComm1.Output = Data here
You do need to make sure the comm port is set up for all the correct charicteristics that the device you are talking to can understand. By that I mean, baud rate, start/stop bits, etc.
Hope this helps, if you have any other questions, just ask
Jerel
-
Jun 18th, 2003, 01:24 PM
#4
Thread Starter
Hyperactive Member
Thank you
Thank you for your help. I will try to get that to work and let you know if/when I have problems.
Art
If you think education is expensive, try ignorance.
-
Jun 19th, 2003, 12:11 PM
#5
Thread Starter
Hyperactive Member
Ok, now I need some more help. Let me just tell everyone what the project is and then I'll explain what I have happening.
I am trying to setup my computer to control my sprinkler system. My goal is only to have 1 zone active due to commands from my computer (explained below). I have a relay connected to my solenoid which activates the zone. I need to sent 5 volts from the parallel port to the relay for 5 seconds.
Explanation - I live on a tee box of a golf course. I would like to be able to remotely activate my sprinkler system to spray the golfers while I am at work for a split second. I will be watching through a web cam of course.
Thanks for any help.
If you think education is expensive, try ignorance.
-
Jun 19th, 2003, 01:05 PM
#6
Addicted Member
Uh.. just a question, but doesn't the solenoid require a little bit of amperage to operate? I ask this since I wonder if you should be directly driving the solenoid. Preferably, if you can, I'd set up a transistor and a seperate power supply for the solenoid.
Transistor = given a little bit of voltage from signal line "opens" or "closes" (by lack of signal voltage) the main power line. (Think like a light switch, but the switch is powered by sending it TTL voltage. 
Just a thought. 
Destined
-
Jun 19th, 2003, 01:15 PM
#7
Hyperactive Member
If you are using VB, it would be easier to do it by microprocessor and then send it a command through the comm port.
Like Destined said, The parallel port probably doesnt have the current capacity to drive the solenoid.
Jerel
-
Jun 19th, 2003, 01:57 PM
#8
Thread Starter
Hyperactive Member
I have a relay which is powered by the existing sprinkler system's transistor. It is pushing 5 volts from the computer to bridge the connection between the transistor and the solenoid. The relay is pushing 24 volts to the solenoid which is exactly what it requires to begin the system.
Please provide more information about the microprocessor and the steps to making that work.
If you think education is expensive, try ignorance.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|