SQL to Plc data transfer??

eulno

Member
Join Date
Jul 2009
Location
Montmagny
Posts
19
Hi guys,
I need to retrieve data from a SQL database based on a barcode read by a Omron PLC (CJ1M-CPU13-ETN).:unsure:
So, the barcode send a 6 words in string to my plc (Thats the serial number of the product). I need the plc to ask the database to get the product info, and result of test done before (In total: 12 fields with different data type (Double, string, integer, bool).

Right now, I don't have any scada or something else running to communicate between the plc and the database. The PLC is connect to the ethernet network. I'm looking to find a reliable way of doing this. I'm open to any suggestion.

For those who ask why i need to do this, it's for a packaging machine that we are building and I'll need to print those informations on the box.
 
I've been involved with projects similar to what you're describing (RFID into the PLC instead of barcode) but their was always some kind of PC that was communicating with the PLC & performing the SQL statements with the server to get the build data the PLC needed.
 
We do it with recipes but as as jstolaruk said, there is always software running on a PC somewhere. I like FactorySQL, but there are plenty of others. I don't know of any PLCs that support SQL commands out of the box, but could think of two solutions:

1. If the PLC supports a generic ethernet connection, write your own driver to communicate with the SQL database. Could be fun. Could be a lot of work.
2. Install a din-rail mount PC - small embedded unit - and then put some software on it to talk to the PLC through OPC or whatever. I always wanted to try this, but have not had the opportunity.
 
Thanks for your reply,
I like the idea of doing my own driver like robertjonejr said, but i'm far away of the solutions. I don't know a lot about SQL and VB script. I'm not afraid of work but i'll need some help just to know were i should start.
It's probably easier to do the script in sql and get a scada, like factory sql, to start the script by using boolean tag?

I have done something like what i need, with Labview in the past for a simple bench test. But i have never get labview to communicate with a plc. I'm not quite sure if its a good idea to try this way?
 

Similar Topics

Hi everyone, I have a small project where I need to use plc to get sensor data and log them to an sql server locally or remote. I have found...
Replies
7
Views
2,797
Hello, For my general information and knowledge, how is querying and storing data from a AB PLC (Compact or Control Logix) typically...
Replies
15
Views
7,357
Hello Eveyone, I need your advice on one problem.I am using CompactLogix PLC.I am looking for some ways.So, that a PLC program can read data from...
Replies
26
Views
13,224
Hey Guys, Our corporate standard for DB is MS SQL. I am looking for a hardware device that will manage bidirectional data exchanges between...
Replies
4
Views
2,801
I am creating a test application, (wonderware 9.5) for display only purposes that will display data from over 20 PLC's. Rather than configure a...
Replies
0
Views
2,803
Back
Top Bottom