Matlab - Step 7 DB / VAR Logger Code

Join Date
Oct 2013
Location
Limerick
Posts
5
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.
 

Similar Topics

Hi all I have a problem with my thesis. I need to transfer data from Matlab to step 7, does anyone have solution for my case ? I use Step 7 with...
Replies
4
Views
5,688
I am trying to establish communication between Siemens PLC 1500 and Matlab. I followed a tutorial on youtube at this link: But when I got to the...
Replies
0
Views
377
Hello PLC expert i need your help. i want to use OPC communication and Matlab to read and write data from/to a Logix5561. A Topic is...
Replies
0
Views
1,666
Hello Experts, I am building an application in Matlab (on my PC) which has a TCP/IP toolbox to allow me to connect to Ethernet enabled devices...
Replies
2
Views
2,765
I know this is a PLC forum so I am posting over on eng-tips.com. However, if you want to learn more about tuning a PID you can visit...
Replies
1
Views
1,483
Back
Top Bottom