Jump to content
Sign in to follow this  

RS232 Commg problem.

Recommended Posts

I want to use com1 to com2 at the same time in same computer. 
  1.com1 send string abcde to com2 (At this time will receive com2 message)
  2.com2 send string abcde to com1 (At this time will receive com1 message)
I try to use the code.
while 1
    $a = "abcdefhhijklmnopqrstuvwxyz1234567890abcdefhhijklmnopqrstuvwxyz1234567890"
    $test1 = _Commgetstring()
    $test2 = _Commgetstring()
But it seems that there is a delay time. 
_Commgetstring() always not receive the full message.(Only received abcdefg)
What do I do wrong? 
If want to send message with delay time.(Use $a Send message,press a then sleep (100) ) .
How should I do?
Or with only the following methods ..
Please help.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.