Well I've got an application started right now. I am using VB to log data from a PLC through DDE. My application is five force load cells, and when the PLC triggers an event or bit I setup as a hot link DDE to VB to some txt box controls, my VB application will log the data from the PLC to an MS Access Database. Then I wanted to export from MS Access to Excel to generate reports. Sure RS View 32 can do all this out of the box, but this is personal thing, I want to say I know how to do it.
I am NOT DONE WITH THIS APPLICATION! And I am a VB newbie, plus this is really my first 100% stand alone VB app. So as long as you don't laugh at what I've got, I'll share what I've gotten done. Positive feedback is good, I'll take any suggestions
Coding or otherwise.
Pre-configure requirements:
Set up a DDE link from your computer using RS Linx, with a topic called "DDE". Make sure RS Linx is running, and the topic is started.
Run this application. There is NO PASSWORD, just click "OK". I have a manual trigger setup, when a onchange event happens in the text boxes txtStat1Trigger, txtStat2Trigger etc...Or you can press the button "READ" and it will go out and get all the data from all five stations.
Make sure you have N7:1 thru N7:5 allocated in your PLC so DDE can find the registers. And B3:0 thru B3:1 words allocated in memory. To trigger using PLC, toggle B3:0/1 for Station 1, B3:0/2 for Station 2 etc.
What is NOT DONE with this code as of TODAY:
The data you read does not get put into the MS Access yet but displays in the VB application in the text box controls, but I do have it reading the database called qsi.mdb. Click on "DATA" then "Station 1" top menus when the application is running.
I do not have any of the EXCEL exports working yet.
Maybe in two weeks or so or whenever I get more time...., I'll have this finished, then I post my finished code at
http://www.mrplc.com in the Download a Code section.
Good Luck with VB / PLC venture.