VB, mysql and SLC 505

jerry_smith

Member
Join Date
Feb 2004
Posts
21
Hi
I need a help on this urgently. If anyone has already done such a project please share ur knowledge with me. I want to use VB to read data from a barcode scanner and store the barcode in mysql database (even any other database) and then send a field from the database to the SLC 505 plc. If anyone has any sample code such similar projects that will be very helpful. Can anyone give me a step by step approach on how make sure verything is working?I need this very much to the extent that iam willing to send $100 for anyone who will help me achieve the result(iam not kidding. or am i?)
Thanks anyway
js
 
Hi Js,

The task isn't too difficult. What you'll need is the following.

1) An OPC server that talks AB-Ethernet
www.matrikon.com is a good place to start
OR
An activeX control that talks AB-Ethernet
www.automatedsolutions.com has some neat stuff

2) VB

3) ODBC compliant database.

Here's what you do.

1) Write the VB code to talk to the PLC. If you go the ActiveX route this is easy since the control comes with sample VB code. If you go the OPC route you can contact me (send me a message with your email) and I'll send you some sample source code I've got for VB and OPC.

2) Set up and ODBC reference to your database.

3) Write the VB code to talk to your database

4) Tie it all together.

Good Luck,

(8{)} ( .)
 
Previous post was explaining it all. Scanners usually use ASCII
over RS232 to communicate. Don't go for cheap cr*p that uses
keyboard wedges etc. - you'll thank me later.

In my case most of the application require some type of
redundancy or workaround for situations that would stop
production (even if it's slower, show must go on).

I would recommend to think about how important your process
is and eventually rearrange your setup a bit.

Reason is that PCs are often plagued with problems. Yes they
can work and we use them all the time but we are trying to
move all mission critial tasks to PLC and leave PC just
for logging, storrage etc.

In your case I would connect scanner to PLC, make small buffer
for few records (up to few hundred) and let PC poll the barcode
information and/or whole record from PLC.
 
(8{)} ( .),

What's your VB code in VB6, or VB.NET?

All the examples I have have been in VB6, the .Net stuff seems to be just starting to show up.
 
glaverty,

I'm just finishing a vb.net project using barcode and OPC.

It's alot easier in VB6, of course.

I bought some code for metadynamics to help with the opc in .net. OPC in .net is a little flaky. With the metadynamics software it is almost the same as VB6.

As far as barcode, I haven't tested it yet, but there is no MScomm control in .net for the rs232 port :( . I had to download some free code at

http://www.codeworks.it/net/VBNetRs232.htm

Hopefully it works good. Next version of .net is supposed to have more rs232 support. :)
 
Gerry M,

Thanks for the link, I've been thinking about starting a side project and I need to do Serial Comms in it. That'll help out a bunch.
 

Similar Topics

Respected Members; Good day. I want to perform the following task: 1. successfully fetches the data via RSLINK / DDE to excel. 2. Now i want to...
Replies
17
Views
4,397
Hi all, I'm trying to connect my WAGO PLC to multiple databases. It is currently connected to a single MySQL database using the library...
Replies
0
Views
921
I am using VbScript in Indusoft to insert data into a MySql database. Immediately after inserting a row, I need to know what that row number is...
Replies
24
Views
5,288
I have been searching for a way to insert a line into a MySql database once every five seconds. I was using Advanced HMI and the timer tick...
Replies
23
Views
6,394
Hello Everyone I working in power plant and we using citect 7.20 , how we can connect citect to mysql to show some system info on website or...
Replies
1
Views
1,482
Back
Top Bottom