Hi,
when using the IEC timers in S7, I cannot put an intial value to the .PT (preset time), when generating the DBs for the IEC timers, the initial values will allways be set to 0 because thats how it is defined in the SFB.
I have three alternatives to set the initial values to something meaningful (a preset time of 0 doesnt make much sense, does it):
1. Manually go thru all the IEC timer DBs to set the initial values. Disadvantage: It is very laborious to do.
2. Assign another DB STAT val to load the .PT, then this STAT val can get a meaningful initial value. Disadvantage: It uses more data memory for each timer.
3. Load the .PT with a constant value when an "initialisation" command is issued. Disadvantage: It uses more code memory for each timer.
Are there others out there that has given a thought to this "problem" ? Is there a more elegant way of doing it ?
when using the IEC timers in S7, I cannot put an intial value to the .PT (preset time), when generating the DBs for the IEC timers, the initial values will allways be set to 0 because thats how it is defined in the SFB.
I have three alternatives to set the initial values to something meaningful (a preset time of 0 doesnt make much sense, does it):
1. Manually go thru all the IEC timer DBs to set the initial values. Disadvantage: It is very laborious to do.
2. Assign another DB STAT val to load the .PT, then this STAT val can get a meaningful initial value. Disadvantage: It uses more data memory for each timer.
3. Load the .PT with a constant value when an "initialisation" command is issued. Disadvantage: It uses more code memory for each timer.
Are there others out there that has given a thought to this "problem" ? Is there a more elegant way of doing it ?