Author Topic: Understanding Super PLC Serial Communications  (Read 7403 times)


  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3119
    • View Profile
    • Internet Programmable PLCs
Understanding Super PLC Serial Communications
« on: November 06, 2007, 11:10:26 AM »
Here is a breakdown of how the serial communications work on the Super PLC:

Each of the two or three serial ports (RS232 and RS485) has its own serial buffer of 256 characters and information sent from external devices is accepted into the serial buffer automatically. Once inside the serial buffer the information will stay there until it is read into the PLCs memory (programmed by user) or it is written over due to buffer overflow.

If the information coming into the serial buffer is formatted in a protocol that the PLC understands then the PLC will handle it automatically and transparently. The Protocols that the PLC understands are MODBUS RTU/ASCII, OMRON C20H, and the Native PLC Host Link Commands.

If the information comes in a format that the PLC doesn't understand (Bar Code Scanner, Digital Scale) then the data being sent will have to be read into memory using one of two commands. One command (INPUT$) will read the contents of the serial buffer in the form of CR- (Carriage Return or ASCII 13) - terminated string up to a maximum of 70 characters at a time into a string variable. Therefore, the data will be in the form "H12345" + CR and will have to be interpreted by a user programmed function.

The other command (INCOMM( )) will read the contents of the serial buffer one character at a time in binary. The user will have to know what data is being sent by the device in order to write a function to handle it. When the buffers is empty, INCOMM( ) function returns a -1.
« Last Edit: March 22, 2012, 03:01:07 PM by support »
Tel: 1-877-TRI-PLCS