Saving Data values in Beckhoff Twincat

matt_sd

Member
Join Date
Jan 2007
Location
Australia
Posts
96
Hello all,

just need to understand a bit more about the data backup in Twincat.

With PLCs I have worked on (i.e Allen Bradley SLC/Control logix), when you are online and save the project, you are asked it you would like to backup all the data values as well, so by opening up the project offline, you can see all the setpoints. When you download the project, the data is in exactly the same state as before.

Now with Beckhoff, I am downloading to a CX1020 CE device, offline I only have a copy of the PLC code and not the data values. I have many setpoints that are set in the Scada and as persistent within Twincat, after a power failure they are remembered as I am using the WritePersistentData function block - But what I need to be able to do is create a backup so that I can restore all data to the project, or better still, open up project xxx data file and see what the setpoint were.
Can anyone explain how to do this?

Thanks

Matt
 
Use the 'watch and recipe manager' screen.
Pick the variables you want to save and do a read values when online.
 
Thanks for that hokie but I have tried that and doesn't appear to work, I added a variable, done a 'read recipe' and then change the variable, done a 'write recipe' and the variable didn't change back to the original variable value.

Also I have tried to save watchlist but I open the file with a text editor and the file just contains the variable names and not the variables data value.

Matt
 
Hi Matt,

Late answer but hopefully it will help someone.

When you "declare" your variables you want to save in the watch and recipe manager, one must add the following to get it work as you want to..

.iTest_Var :=

After that you will be able to read values from plc and store them to your offline project.

matt_sd said:
Thanks for that hokie but I have tried that and doesn't appear to work, I added a variable, done a 'read recipe' and then change the variable, done a 'write recipe' and the variable didn't change back to the original variable value.

Also I have tried to save watchlist but I open the file with a text editor and the file just contains the variable names and not the variables data value.

Matt
 
Thanks Weo,

Thanks for that, I tried it with some single variables and works perfect!!

the only problem is most of my vaiables that the Scada changes are grouped in a Data type (Sturct/End struct).

In watch manager, you have to click on a data type to expand it, therefore I cant assign := to these variables. I can add there variables but will have to enter each one seperatley rather than adding the data type.

Thank you
Matt
 
Variables declared in a struct should be no problem.

In watch and recipe manager, hit 'F2', select the globla_var where you used you struct, here you can browse in the tree structure and add all declared variables in your struct.
(But you still have to add ':=' after every single variable in you recipe).

My "problem" is when you declared in an ARRAY, you only get the first variable in the array ([1], then you manually have to add the following ones.
If you have a big array I use to export (save watch list) the recipe file and open it in excel, there use a fill at the column, save and then load the watch list in the recipe manager.
That will save you a few minutes work.

I´m not an expert at twincat either, maybe there are an easy way to get round it.

matt_sd said:
Thanks Weo,

Thanks for that, I tried it with some single variables and works perfect!!

the only problem is most of my vaiables that the Scada changes are grouped in a Data type (Sturct/End struct).

In watch manager, you have to click on a data type to expand it, therefore I cant assign := to these variables. I can add there variables but will have to enter each one seperatley rather than adding the data type.

Thank you
Matt
 

Similar Topics

It has been a while since I used RSLogix 5000. Is there a way for me to save data in excel, notepad, etc?? I want data to be saved when a user...
Replies
4
Views
1,768
Hi, I have a system that creates a text file that is comma delimited and it works great...in the US. I installed it on a computer in Germany and...
Replies
2
Views
1,906
I'm using a 1769-L16ER-BB1B. I'm storing recipe data in an array of user-defined data types. For disaster recovery purposes, I need to make sure...
Replies
12
Views
8,820
Simple question, is there any way of saving Function Block Output values on power down in Alpha2? Or more general question, is there any way of...
Replies
1
Views
1,558
Hello all, I need your help to understand, How can I save values in DB to a Txt file in each cycle. Hardware used: CPU317F-2 PN/DP HMI: MP...
Replies
4
Views
3,039
Back
Top Bottom