Now You Can Have Robust Data Logging for Free – Part 1
Now You Can Have Robust Data Logging for Free – Part 2
Now You Can Have Robust Data Logging for Free – Part 3
Now You Can Have Robust Data Logging for Free – Part 4
Now You Can Have Robust Data Logging for Free – Part 5
Now You Can Have Robust Data Logging for Free – Part 6
Computer Program Visual Basic (VB6)
See tables below.
We will store the database in the following directory:
C:AccRLDataAccRL.accdb
The visual basic program file will be in the C:AccRL directory.
Now lets start the visual basic programming:
Start a new project save it as AccRL in the directory mentioned above.
Add the Microsoft Winsock Control 6.0 component to the project. This will be needed to communicate through Ethernet to our PLC on the network.
Add the Microsoft ADO Data Control 6.0 (OLEDB) component to the project. This is required to communicate to the AccRL.accdb file created above.
This is what our program form looks like now.
We can now draw labels on our form for all of the data that we wish to display. Fonts sizes etc can all change based upon how you would like it to appear.
Note: Everything shown on the form are labels for the data. This program will just display the information that is being retrieved from the PLC.
Along the bottom of the form you will notice that the Winsock control, two Adodc controls and a timer have been added.
The Winsock control will be setup during the running of the program. On the form will will add a variable to tell the IP address of the PLC. We will deal with it after the database information has been setup.
Each of the Adodc controls represent the two tables set up earlier. Adodc1 is for the Production_Log table and Adodc2 is for the Minute_Log.
Lets now set up Adodc1.
Right click the control and select properties.
We will now enter where the data source is located. C:AccRLDataAccRL.accdb
Click ‘Test Connection’
The last step is to set the table in the database.
In part 7 we will continue with writing the VB6 program.
If you have any questions or need further information please contact me.
Thank you,
Garry
If you’re like most of my readers, you’re committed to learning about technology. Numbering systems used in PLC’s are not difficult to learn and understand. We will walk through the numbering systems used in PLCs. This includes Bits, Decimal, Hexadecimal, ASCII and Floating Point.
To get this free article, subscribe to my free email newsletter.
Use the information to inform other people how numbering systems work. Sign up now.
The ‘Robust Data Logging for Free’ eBook is also available as a free download. The link is included when you subscribe to ACC Automation.