V
I am writing PC server code (in C/C++) and need to communicate with Omron PLCs. I have written PC code to communicate with PLCs before using the CX-Server Lite ActiveX component in VB6, however that solution will not work in this project because the software is a console/service application. I am working with our vendor and Omron in trying to obtain an API/SDK to communicate with the PLCs however we seem to be having a communication breakdown. Either I just don't understand what they are saying or they don't understand what I need. They keep referring me back to the CX-Server Lite ActiveX component and that just won't work for this project.
We need the ability to communicate to one or more PLCs to send commands to; query states of; and received notices from Omron PLCs (CJ1M CPU12). We are using C/C++ on the PC. What is the recommended communication method and where do I obtain (or what do I ask for) in a PC API/SDK to permit the PC to communicate with a PLC and vice versa? If there isn't an API/SDK then is there a document or white paper I should review? Third party API/SDK are acceptable if they work well.
The PLCs have serial and Ethernet connectivity. We would prefer network connectivity for greater flexibility.
The application is a material handling system. We move platforms containing a payload. Right now, it appears we will only have a single PLC using remote I/O. The PC server application maintains the location of the platforms and the information about their payload (if any). The PC server application instructs the PLC to GET a platform from or PUT a platform into a location. The command from the server to the PLC is simple: SOURCE and DESTINATION. The PC server wants basic updates as to the current state of the system such as: arrived at source level; getting platform; got platform; arrived at destination level; placing platform; platform placed; etc. The frequency is considered quite long - over a period of seconds up to a minute. So, there is no millisecond updates required. The PLC program knows what to do in order to get or put a platform.
We would prefer to stay OUT of the polling mode business and have the PLC actually send updates to the PC server as the PLC state/task changes. If an error occurs, the PLC needs to notify the PC server with an error code (part of the PLC code).
It has been suggested on the forums at MrPLC.com to use simple 'protocol free' ASCII messages via either serial or Ethernet. We could make up our own structured ASCII messages for each direction. The Ethernet solution where we would use the Omron send / receive data function blocks in the CX-Programmer function block library, as well as the socket open, close function blocks etc looks enticing.
Do the experts here concur? Does anyone recommend an alternative method or an API/SDK?
We need the ability to communicate to one or more PLCs to send commands to; query states of; and received notices from Omron PLCs (CJ1M CPU12). We are using C/C++ on the PC. What is the recommended communication method and where do I obtain (or what do I ask for) in a PC API/SDK to permit the PC to communicate with a PLC and vice versa? If there isn't an API/SDK then is there a document or white paper I should review? Third party API/SDK are acceptable if they work well.
The PLCs have serial and Ethernet connectivity. We would prefer network connectivity for greater flexibility.
The application is a material handling system. We move platforms containing a payload. Right now, it appears we will only have a single PLC using remote I/O. The PC server application maintains the location of the platforms and the information about their payload (if any). The PC server application instructs the PLC to GET a platform from or PUT a platform into a location. The command from the server to the PLC is simple: SOURCE and DESTINATION. The PC server wants basic updates as to the current state of the system such as: arrived at source level; getting platform; got platform; arrived at destination level; placing platform; platform placed; etc. The frequency is considered quite long - over a period of seconds up to a minute. So, there is no millisecond updates required. The PLC program knows what to do in order to get or put a platform.
We would prefer to stay OUT of the polling mode business and have the PLC actually send updates to the PC server as the PLC state/task changes. If an error occurs, the PLC needs to notify the PC server with an error code (part of the PLC code).
It has been suggested on the forums at MrPLC.com to use simple 'protocol free' ASCII messages via either serial or Ethernet. We could make up our own structured ASCII messages for each direction. The Ethernet solution where we would use the Omron send / receive data function blocks in the CX-Programmer function block library, as well as the socket open, close function blocks etc looks enticing.
Do the experts here concur? Does anyone recommend an alternative method or an API/SDK?