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 the tables below.
We will store the database in the following directory:
The visual basic program file will be in the C:AccRL directory.
Now let’s start the basic visual programming:
Please start and save a new project as AccRL in the above directory.
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 the data we wish to display. Fonts, sizes, etc., can change based on how you want them to appear.
Note: Everything shown on the form is labeled for the data. This program will 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 set up during the running of the program. The form will add a variable to tell the IP address of the PLC. We will deal with it after the database information has been set up.
Each of the Adodc controls represents the two tables set up earlier. Adodc1 is for the Production_Log table, and Adodc2 is for the Minute_Log.
Let’s 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 get in touch with me.
If you’re like most of my readers, you’re committed to learning about technology. Numbering systems used in PLCs are not challenging to learn and understand. We will walk through the numbering systems used in PLCs. This includes Bits, Decimals, Hexadecimal, ASCII, and Floating Points.
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.