Have figured it out by now.
OK, for your information: I have figured out how to solve my problem by means of manipulating the Source with Excel.
Here's how (if any are interested):
Problem:
All the alarms texts in a project with STEP7 and Protool has to be entered 3 places, in the Protool alarm messages, and in the two S7 DBs that holds the raw alarms and the memorized alarms.
This is a hazzle and a source of errors.
How to edit only one place and then copy the texts to the two other places ?
Solution:
1. Create the alarm texts in Protool. You can use cut and paste, also with several alarm texts at a time.
Pitfall: If you copy-and-paste entire alarms by highlighting them with the cursor in the left side of the window, then you will also highlight and copy the info text that is defined for the alarms in question. Be sure to constantly update the info texts together with the alarm texts.
Tip: If you assign a number to each alarm in the text body, then let the number contain the word and bit address that triggers the message. You can see the address in the lower right corner of the window. Notice how the bit adress has the odd S7 order, so the text should be like this:
Alarm 1: "AL01_00" (adress Byte 1 bit 0)
..
Alarm 8: "AL01_07" (adress Byte 1 bit 7)
Alarm 9: "AL00_00" (adress Byte 0 bit 0)
..
Alarm 16:"AL00_07" (adress Byte 0 bit 7)
Alarm 17:"AL03_00" (adress Byte 3 bit 0) etc..
This will help you greatly to identify the adress later.
Now use the Languages .. export function in protool to export the alarm texts to a CSV file. Set the function up to only export the alarm messages.
2. Create the alarm DBs in STEP7.
I find it most handy to set up the DBs with a STRUCTs of 16 BOOLs each. That makes it easy to refer to a word at a time and to a bit at a time. Like this (example with 2 alarmwords only):
STRUCT
W00 : STRUCT //Alarmword 00
b00 : BOOL ; //comment w00 b00
..
b07 : BOOL ; //comment w00 b07
b10 : BOOL ; //comment w00 b10
..
b17 : BOOL ; //comment w00 b17
END_STRUCT ;
W02 : STRUCT //Alarmword 02
b00 : BOOL ; //comment w02 b00
..
b10 : BOOL ; //comment w02 b10
b11 : BOOL ; //comment w02 b11
..
b17 : BOOL ; //comment w02 b17
END_STRUCT ;
END_STRUCT ;
Then generate the source for the DBs.
3. Open two sessions of Excel.
Open the CSV file with the 1st session.
Open the DB Source file with the 2nd session.
Specify TAB and "/" as delimiters for the 2nd session.
Tip: You will probably find the Source file with an .AWL extension in the directory "s7asrcom" in the STEP7 project directory.
Now you can copy-and-paste the alarm texts from the 1st session to the 2nd session. Keep a close eye to the adresses so that they are syncronised.
Insert "//" in the column before each text comment in the 2nd session.
Save the 2nd session and exit it, choose "No" when asked to save in Excel97 format.
4. Open the DB Source file again in STEP7. Use the "compile" function.
Open the DB block file in STEP7. Check that everything is correct.
Copy the DB block file to one more DB block file.
Viola - You have now all your alarms texts in all the right places.
The above description looks more complicated than it actually is.
Needless to say, it only pays off if you have lots of alarms. I normally have around 500 in a project.