Home     Contact     Forum     Projects     Experiments     Circuits     Theory     BLOG     PIC Tutorials     Time for Science     RSS     Terms of services     Privacy policy  
   
 Home     Forum     Projects     Experiments     Circuits     Theory     BLOG     PIC Tutorials     Time for Science   

Author Topic: Visual basic - Communicate with RS232  (Read 4429 times)

0 Members and 1 Guest are viewing this topic.

MinigunTom

  • Guest
Visual basic - Communicate with RS232
« on: August 23, 2008, 13:34:15 PM »
Hello all!!!

Greetingz to the forum members.

I am using the MSComm control to communicate with RS232 port. The code i use is:

Code: [Select]
A$ = "9600,N,8,1"
Form1.MSComm1.Settings = A$
Form1.MSComm1.InputLen = 0
B$ = "A"
Form1.MSComm1.Output = B$

But i get the error that says
"Operation is valid only when the port is open"

No other device uses any comm port
From the system i see that there is no problem
Other programs can normally use RS232

What do i do wrong?

Thank you

MinigunTom

  • Guest
Re: Visual basic - Communicate with RS232
« Reply #1 on: August 23, 2008, 17:54:57 PM »
Help please??? ??? ??? ???

kammenos

  • Guest
Re: Visual basic - Communicate with RS232
« Reply #2 on: August 23, 2008, 19:04:52 PM »
Did you remember to open the port?

kammenos

  • Guest
Re: Visual basic - Communicate with RS232
« Reply #3 on: August 23, 2008, 19:05:34 PM »
MSComm1.CommPort = 1
MSComm1.PortOpen = True

MinigunTom

  • Guest
Re: Visual basic - Communicate with RS232
« Reply #4 on: August 25, 2008, 00:37:53 AM »
How stupid of me. Thanx!!