GTX
Go to the TI-S7 Converting Blocks folder in the STEP7 Standard Library. There you will find FC80 named TONR just as Daniel Chartier mentioned. Use it instead of T13 and T14. It has exactly the functionality you've described.
I don't have the software here in front of me at present, but I think one parameter that is required is named Delta_T. This timer uses the duration of the previous OB1 cycle time as its time base. If you are using the FC80 directly in OB1, you'll get this value as a TEMP variable in OB1 named OB1_PREV_SCAN. If you want to use FC80 in a nested block you will have to put a single line of code in OB1 to copy that OB1_PREV_SCAN variable to some globally accessible address (MWxxx or DBy.DBWzzz) and then use that as the Delta_T.
It's really simple when you get it.
Regards
Ken M.
Go to the TI-S7 Converting Blocks folder in the STEP7 Standard Library. There you will find FC80 named TONR just as Daniel Chartier mentioned. Use it instead of T13 and T14. It has exactly the functionality you've described.
I don't have the software here in front of me at present, but I think one parameter that is required is named Delta_T. This timer uses the duration of the previous OB1 cycle time as its time base. If you are using the FC80 directly in OB1, you'll get this value as a TEMP variable in OB1 named OB1_PREV_SCAN. If you want to use FC80 in a nested block you will have to put a single line of code in OB1 to copy that OB1_PREV_SCAN variable to some globally accessible address (MWxxx or DBy.DBWzzz) and then use that as the Delta_T.
It's really simple when you get it.
Regards
Ken M.