Sign in to follow this  
Followers 0
dugmick

S7 data block initial value

2 posts in this topic

I have been searching for information and I have not been able to find a solid answer yet. I have a S7-400 CPU with a many FCs, OBs, DBs, etc. I would like to be able to send the initial values to the actual values in a particular datablock. My searching has led me to understand that the initial values can be transferred to the actual values through some keystrokes in Step 7, then downloading the block back to the CPU. I am looking for an instruction (or instructions) that exist within the S7 instruction set that I can use to automate this process from within my user program, eliminating the need to connect to the CPU with my computer. So, when the CPU is stopped and then restarted some lines of code will run one time and the initial values are transferred to the actual values. Does such an instruction, or collection of instructions exist? Thanks

Share this post


Link to post
Share on other sites
There is no such instruction to do exactly that by code in the S7 CPU. Alternatively you can copy the values from one DB to another with SFC20 BLKMOV. So you can have a DB with default values. It costs an extra DB though. Or alternatively you can do it with STEP7. Open the DB in question, then you can find an "initialise datablock" in the menu. Then save the block, and download it to the CPU.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0