Uploading values using a VAT table in S7

Borte

Member
Join Date
Feb 2004
Location
Norway
Posts
238
Hello guys!

I have a VAT table which consists of 1024 rows (maximum) of data, this is all data that I have to upload from the plc to my computer (into excel). Is it any other way of doing this than actually using copy/paste... It takes forever transfering the data...
It's all floating point data so the plc can only display 25 values at the time (due to memory constrains). So transfering 1024 values takes a while.

Does anyone have any ideas around this?

Cheers
Borte
 
You could generate the source file for the DB block that you have uploaded.

1st open the DB and select 'generate source'.
2nd find the newly generated source file, highlight it (do not open it), and select 'export source'.
3rd, open Excel, select 'open', specify 'all files', find the exported source file. When prompted specify TAB and SPACE as delimiters.
4th, locate the relevant actual values and copy them in one go into the final excel sheet.

Note: Only if the actual value is different than the initial value will it appear in the declaration area after the symbolic definition.
example:
Motor_current_01 :INT ; //initial = actual
Motor_current_02 :INT :=150 ; //initial <> actual (150)

It may take some experimenting. Please let me know how it goes.
 
Last edited:
Thanks Jesper, I'll give this a try this week.

I'll get back to you with the result.

Cheers
Borte
 
Hello Jesper!

I tried to generate the source as you told me but it does not include the actual values. I know the initial and actual values are different since I can monitor it and see the difference.

Do I have to generate the source in a specific manner?

Cheers
Borte
 
Maybe you are working with the original DB that you created offline.
You have to go online and upload the DB to the offline project.
Simply pick the DB from the online project and drop it into the offline project.
Check it by opening the DB and select View..Data View. You can then see if the actual values have changed.
If that is OK, then start all over again.

Notice that the actual values will appear in the section between STRUCT and END_STRUCT, and then only if they have changed.
The values between BEGIN and END are the initial values.
 
Yes, my memory was not retentive enough.

Here is is exactly:

The initial values will appear between STRUCT and END_STRUCT and then only if they are different from the default initial values
(f.ex. default BOOL = FALSE).

The actual values will appear between BEGIN and END.

Sorry about the confusion.
 
Hello again!

I got the values now... Thanks.

The only question I still have is that I'm usually uncomfortable with pasting anything from online into my project. This normally causes some problems with the comments. Is this true for the db's too?
 
It is fairly troublefree with shared datablocks. Your symbols and comments should stay as they are.
With instance datablocks it is very easy to get a timestamp conflict though.
If you are not 100 % comfortable with it, then save your project to a new version number before doing the upload.
 
I will create a backup before uploading, just in case.

I guess my bad experinces with this comes from some of the maintenance people here. They upload the complete program from the plc. Causing all comments to go "wacky"...
Not a good thing.

Thanks again.

Cheers
Borte
 
Borte, I've had pretty good luck with this method:

Open the data block online in Data View.
Select File>Print
For Printer, choose “Generic/Text Only”

Check “Print To File”

Choose Properties>Layout

Check “Landscape”

Choose “Advanced”

For “Paper Size”, choose A3

Click OK, and go back to print menu, give the file a name, and start printing. A PRN file will be generated.



Once it is done, open it up with WordPad and you will see a nicely formatted list of all values in your datablock. You can write some VB script to rip though this doc if you want and make it into something useful, but an easier way would be to import it into Excel. Just open Excel, import the PRN file (use fixed field width instead of delimiters), and you will have the entire DB with the actual values in the spreadsheet. You can then do anything you want with the data.

 

Similar Topics

Hello, Last Friday I uploaded the program on the Rslogix 5000 and saved it, when I saved it, it asked me to save the tag values and I clicked...
Replies
3
Views
2,500
Hi guys, I have had some issues with uploading a program from a Micro 850 PLC. This is the first time connecting so I don’t have a file on my...
Replies
8
Views
197
Hi everyone, I want to upload the program from my CPU317TF-2 DP to my PC via connecting to CP 343-1 Advanced since it has LAN ports and the CPU...
Replies
1
Views
119
Hi all, Im stuck trying to support a client with Motorola ACE.. I was able to upload all of the other sites to STS but one. Im working remotely...
Replies
0
Views
77
Hey, i'm getting an error when i try to upload a program from a modicon M258 TM258LF42DT using eithernet. i tried using both SoMachine V4.1 and...
Replies
12
Views
1,210
Back
Top Bottom