Step7 - Is it possible to store Actual Values from a DB in a normal (Text?) file

RMA

Member
Join Date
Sep 2004
Location
North of Hamburg, Germany
Posts
2,052
Now that my program to save the maximum values of my analog inputs is actually working, we come to the next problem - how to access the data for analysis.

Is there any way to easily export the stored values to a normal file on a PC? I tried printing the data to a file, but the printer formatting turned the result into rubbish - I couldn't find any way to get rid of the printer name.

Or has the time come to start learning about OPC? Since there's not a lot about OPC in the help files, I guess I'm probably right in assuming that OPC is an expensive option!
 
Last edited:
OPC , or if you have one left over from another project , another possibility is DDE , with say something like an Intouch DDE server , but then , if you are going to do that , you don't necessarily need your error trapping and logging utilty , you can do it all in excel . I have a few examples if they may be of any use . Again , if you have flex on your PC , you can use it as an OPC server if you wish , by making a dummy application .

Another possibility is to open the db online , select all of the data you are interested in , ^c it , and then paste into excel - I have just tried it and it works if you want a quick solution.
 
If you've got some examples, I'd be interested anyway.

select all of the data you are interested in , ^c it , and then paste into excel
That will actually do for what we require - I tried to this already, but tried marking the whole area instead of just the Actual Values. :( I guess I'm not wide awake yet!
 
I upload the contents of the DB to the offline folder, then generate source code for the DB, export it and then import it into excel. I'll have to try the ^C method as it sounds quicker.
 
I'm not quite as daft as I thought I was!

How do you manage to mark the data? As soon as I click on an Actual Value it switches out of View mode and shows the Initial Values instead! At first I thought it was because I was paging down to mark about a hundred entries, but even trying to mark a few entries on the first screen doesn't work.

Is there some option to prevent it turning View off?
 
I've got Flex on the Laptop and if all else fails, 10BaseT.'s suggestion of making a dummy project would be a possibility. However, for what we actually need it's overkill if we could get Ctrl-C to work!
 
Roy, I opened the DB from the offline folder, started monitoring, then single clicked in the first address cell (top left), the whole line goes black, then press shift+down arrow to select the rows you want, then ^C and you can then paste into notepad etc.
 
Jesper, in this particular instance :))), this was 10BaseT.'s tip, I've just tried it for the first time.

Regards, Simon
 
I am running 5.4 sp1 and it works - I have just checked , actually I'll dig out a super spreadsheet written by a mate of mine (who hates S7 for some reason) where you can created a DB from a spreadsheet (.xls) - you have to follow the instructions well , but apart from that , it is fine .

I managed using the same method as L D[AR2,P#0.0] - highlight the first field , then scroll down to the last field while holding the ctrl key , then click


And here it is - it does a lot more than just xls to db , and all credit to SHJ -
 
Last edited:
L D[AR2 said:
Jesper, in this particular instance :))), this was 10BaseT.'s tip, I've just tried it for the first time.
Oh my mistake. Well I am sure that 10baseT dont mind that you get some praise on his behalf. After all we are nearing christmas.
 
I must be a bit sleepy today after all! In my attempt to highlight the cells I clicked on the first Data cell of the DB - not the address cell! Why on earth I did that I've no idea because I regularly copy complete DBs from one DB to another when I want to update the Initial Values!

That Excel program looks interesting, I'll have a closer look at it when I get a bit of time.

That's all for me for today, I've got to get myself on the road to Dresden. The Rossendorf lot are going to have a bash at setting a new world record magnetic field tomorrow.

If your watch goes haywire again, Simon, you'll know why!

Thanks to one and all,

Cheers

Roy
 
Here you go.....

xmas.JPG
 

Similar Topics

While trying to download an FC to a Siemens plc CPU315-2DP , we are getting the following error . What does it mean ? How to solve this problem ...
Replies
8
Views
3,079
Another one for Simon! This is related to the BLOCK_DB question in as much as it's the same program. I need to pass over the Cell address in the...
Replies
4
Views
3,896
This is the first time I am working with Simatic Manager Step7 as I started my siemens journey with TIA which is pretty easy and do a lot of stuff...
Replies
3
Views
144
When you download a DB, the values get overwritten by what is in the "actual" column in offline DB. Does this happen at the start of the PLC...
Replies
6
Views
142
Hello Inside a FB, I´m trying to transfer a string from a DB to a IN_OUT var that was define as a UDT. The problem is that i can´t determine the...
Replies
4
Views
128
Back
Top Bottom