Author Topic: Communication RS 232  (Read 12883 times)

acxysty

  • Newbie
  • Posts: 35
  • I'm a llama!
    • View Profile
Communication RS 232
« on: April 22, 2013, 03:19:17 AM »
Hello,
I would like to communicate via the RS 232 between FMD88-10 and a masflow that communicates RS-232.
I try to send a string of such "070304716271620E" then Carriage Return and Line Feed.
I configured the same way the two products are: 1 start bit, 8 data bits, no parity and 1 stop bit.

My program:

in FirstScan
SETPROTOCOL 1.10
SETBAUD 1, & H06

then:

PRINT # 1 "070304716271620E" &H0D; &H0A;
FOR I = 1 to 10000
A $ = INPUT $ (1)
NEXT

By sending the same through the hyperterminal with my PC running Windows XP it worked! Can you help me this is quite urgent.
thank you

garysdickinson

  • Hero Member
  • Posts: 502
  • Old PLC Coder
    • View Profile
Re:Communication RS 232
« Reply #1 on: April 22, 2013, 11:59:45 AM »
If your goal is to send a message terminated by a carriage return and a linefeed you might want to change the print statement from:

    PRINT # 1 "070304716271620E" &H0D; &H0A;

to:

     PRINT #1 "070304716271620E\0D\0A";

Your program, as presented, can not be compiled.  It is missing a ";" .  If your program was corrected so that it would compile:

   PRINT #1 "070304716271620E"; &H0D; &H0A;

The output would be:

    "070304716271620E 13 10"

There would be no carriage return and no line feed.

Best regards,

Gary D