KealanOCarroll
Member
Hi all,
I'm doing my Final Year Project on a liquid level / temp control system, Using an S7-300 and Simatic HMI, as well as a PC (MPI connection to the PLC)
The rig is going to be used for future students' lab experiments for Control Engineering, so I want to get a basic data logging setup.
A previous student has used MATLAB to open a java robot that moves the mouse over to the DB, hits control C, then moves to an excel file and hits Ctrl + V. Seeing as the rig is for use for future students, I don't want to have to have the DB open and Excel open on specific parts of the PC screen while the jig is running.
I'm wondering is it possible to get Matlab to read the PC's clock, write the current time to an excel cell, then go into the source code for a DB and read the variable value, and write that to the cell beside the time, then shift down a row and repeat for each second of the PC's clock?
Can I just point matlab to the source code for the DB and get it to open, read, close, and repeat, or is it more complicated than this?
I have the variables plotted on a live plot on the HMI, and to date I've been photographing the HMI with my phone and using the pictures to read the process plots but I don't think it's a very accurate way to tune the controller and It's no good for future students doing lab reports / analysing experimental data.
I'm doing my Final Year Project on a liquid level / temp control system, Using an S7-300 and Simatic HMI, as well as a PC (MPI connection to the PLC)
The rig is going to be used for future students' lab experiments for Control Engineering, so I want to get a basic data logging setup.
A previous student has used MATLAB to open a java robot that moves the mouse over to the DB, hits control C, then moves to an excel file and hits Ctrl + V. Seeing as the rig is for use for future students, I don't want to have to have the DB open and Excel open on specific parts of the PC screen while the jig is running.
I'm wondering is it possible to get Matlab to read the PC's clock, write the current time to an excel cell, then go into the source code for a DB and read the variable value, and write that to the cell beside the time, then shift down a row and repeat for each second of the PC's clock?
Can I just point matlab to the source code for the DB and get it to open, read, close, and repeat, or is it more complicated than this?
I have the variables plotted on a live plot on the HMI, and to date I've been photographing the HMI with my phone and using the pictures to read the process plots but I don't think it's a very accurate way to tune the controller and It's no good for future students doing lab reports / analysing experimental data.