Hi all,
Today I connected an SQL database to WinCC Flexible.
I've made a database with 'SQL Server Management Studio Express' and then configured the ODBC source. After that I made the vb-scripts for communicating with the SQL database.
Writing and reading from tables works fine.
But now it comes...
I want to be able to log recordlines on step transitions.
A recordline = several tags to be logged, on stepchange.
So, when a step increments, several actual values (tags/vars) have to be written (logged) in the database. I'm thinking todo this with tag event in wincc flex = on change of stepnumber => call the write_to_sql script and increase the datarecordnumber (=primary key)...
This for writing to SQL...
But for reading, it's a little problem I have, me as a no-IT minded guy. It must be possible to ask from the database and the specific table to ask data on query...
For example: I want to see all the steps between 14h and 16h, and these times can be found in a column... how can I do this... It may be in VB.NET also... I think I'll need to read some SQL books about query's...
Can anyone help with SQL ?
Examples in WinCC Flex with some query lines... ?
Kind regards,
Gerry
Today I connected an SQL database to WinCC Flexible.
I've made a database with 'SQL Server Management Studio Express' and then configured the ODBC source. After that I made the vb-scripts for communicating with the SQL database.
Writing and reading from tables works fine.
But now it comes...
I want to be able to log recordlines on step transitions.
A recordline = several tags to be logged, on stepchange.
So, when a step increments, several actual values (tags/vars) have to be written (logged) in the database. I'm thinking todo this with tag event in wincc flex = on change of stepnumber => call the write_to_sql script and increase the datarecordnumber (=primary key)...
This for writing to SQL...
But for reading, it's a little problem I have, me as a no-IT minded guy. It must be possible to ask from the database and the specific table to ask data on query...
For example: I want to see all the steps between 14h and 16h, and these times can be found in a column... how can I do this... It may be in VB.NET also... I think I'll need to read some SQL books about query's...
Can anyone help with SQL ?
Examples in WinCC Flex with some query lines... ?
Kind regards,
Gerry