Implementing the Omron Host Link Protocol (VB.Net)

Previously we used VB6 (Visual Basic 6) to implement the Omron Host Link Protocol to communicate to our programmable logic controller. (PLC) In part 2 we used Visual Basic for Applications (VBA) to accomplish our host link serial communication. We will now look at using VB.Net to establish and retrieve information in and out of the PLC using host link. (C mode commands)

Hostlink communication protocol is a method developed by Omron for communication to PLC’s and other equipment. This ASCII based protocol is used over RS232 or RS422/RS485. It is a many to one implementation which means that you can communicate with up to 32 devices back to a master. (1:N) This communication on the industrial floor can control PLC’s, Temperature Controllers, Panel Meters, etc.

The Omron CP1H plc will be used with a CP1W-CIF11 (RS485) communication serial link adapter. We will also use a USB-485M Universal Serial Bus to RS485 adapter from automation direct. The video at the end of this post will demonstrate the communications by reading 10 registers form the DM area of the PLC. Continue Reading!

Omron CP1H Data Conversion Instructions

Programmable logic controller programming is all about manipulating the bits within the memory of the controller. Sometimes we need to convert from one form to another. This is where we will use data conversion instructions. BCD to Binary, Line to Column, Grey Scale and Multiplexing are just some of the data conversion instructions. We will be looking at some of these instructions in the Omron CP1H PLC. Examples of some of the instructions will be presented. Continue Reading!

Omron CP1H Math Instructions

Programmable logic controllers are not typically known for their math ability. Modern PLC controllers now come with several math instructions to expand the ability to perform math routines. Every controller has different methods to handle math with different numbering systems. Binary, BCD (Binary Coded Decimal) and floating point single and double are examples of some numbering systems. The following is a post on what everybody ought to know about PLC numbering systems. If you subscribe to our website you will get a free copy of the article on numbering systems which includes understanding floating point. You must refer to the programming manual of the controller that you are programming for specific math instruction information.
We will be looking at some of the math instructions in the Omron CP1H PLC. Examples of some of the instructions will be presented. Continue Reading!

Omron CP1H Data Shifting Instructions

PLC programming is all about how we can manipulate the information stored in the PLC. We have already looked at timers, counters, moves and comparison instructions. Data shifting is a different concept that will move bits and words around in memory. This is necessary usually for tracking purposes. The word or bit will represent product or information. As this information is triggered to shift to a new location we can use this to activate items latter in the process. A typical example of this would be parts on a conveyor belt. As the part is detected on one end it will turn on a bit in a register. The conveyor movement is usually picked put by an encoder and shifts this bit in the register in sync with the conveyor movement. At the other end of the conveyor belt we can see the bit position and do something with this information. We can use this information to count, reject etc. Looking at the entire register full of bits, we can determine everything on the conveyor and its position.
We will be looking at the data shifting instructions in the Omron CP1H PLC. Examples of some of the instructions will be presented. The instructions are used to shift data within or between words, but in different amounts and directions. Continue Reading!