Author Topic: ASCII message framing  (Read 9428 times)

hubieg

  • Guest
ASCII message framing
« on: March 21, 2005, 07:28:11 AM »
Greetings,

I am currently developing an application which uses a barcode scanner to verify a barcoded sticker on a can. What I in essence need to do is talk to the scanner on the rs232 port while communicating with a "master" controller via modbus on the rs485 port with some logic in between to control the machine.
I am using a Sick clv-410 barcode scanner on the rs232 port. This scanner communicates using framed messages in the form of <STX> message <ETX>. Is it possible to setup the framing used on the rs232 port to communicate with the scanner using this framing technique? It is possible to change the scanner but for the sake of "plug and play" capability I would prefer to use the default method of the scanner.
Any help would be appreciated!!

Todd

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3174
    • View Profile
    • Internet Programmable PLCs
Re:ASCII message framing
« Reply #1 on: March 21, 2005, 09:44:19 PM »
The TBASIC language can easily send out a series of ASCII characters formatted with the STX and ETX delimiters characters. It can also receive characters from the bar code scanner and extract data out of the returned data. The powerful TBASIC language handle such string handling much more easily and effectively compared to traditional pure ladder logic PLC programs.

A T100MD+ PLC can use the INCOMM and OUTCOMM command to send and receive ASCII or binary characters via the RS232 port connected to the bar code scanner. Its RS485 port can continue to talk MODBUS to another device since both serial ports are completely independent and are completely under the CPU control.
Email: support@triplc.com
Tel: 1-877-TRI-PLCS