5/31/2016 9:56 AM | |
Joined: 3/14/2008 Last visit: 9/4/2024 Posts: 2094 Rating:
|
Hi AgrS, I can't remember if you were using custom made timer blocks, or that it was someone else. However, to be sure, does your timer block has an input with attribute: "S7_sampletime"? which is used for incrementing the timer value? It could be that the timer block has been moved to another interrupt OB like from OB32 to OB35. If the parameter used for incrementing the timer has not the "S7_sampletime" attribute, it could be the value is incremented too fast or too slow. Normally, the attribute will make sure that the parameter is using the interrupt OB cycle value. |
If I could help you, you can use the RATE button. Thank you. |
|
This contribution was helpful to
1 thankful Users |
5/31/2016 11:13 AM | |
Posts: 112 Rating:
|
These are my OB's, it seems that OB32 gets its cycle time of Ob33? |
5/31/2016 11:40 AM | |
Joined: 3/14/2008 Last visit: 9/4/2024 Posts: 2094 Rating:
|
Hmm, OK, I don't think the problem lies there than. Did you set the PIP objects correctly? You can set your inputs and outputs to a certain PIP, corresponding with the interrupt OB's. So, a PIP can be assigned as PIP2 which can be configured to be OB32. Please check the module settings: Open hardware configuration->Go to the input/output module (like AI8x13Bit)->Double click->Go to tab: "Addresses" and select the corresponding PIP. Please check the CPU settings as well-> Hardware config->Double click your current AS->Go to tab: "Cyclic interrupts" and check if the correct PIP is assigned to the interrupt OB. I don't know if this could be the problem, but you can check.... |
If I could help you, you can use the RATE button. Thank you. |
|
This contribution was helpful to
1 thankful Users |
5/31/2016 12:39 PM | |
Joined: 3/14/2008 Last visit: 9/4/2024 Posts: 2094 Rating:
|
Hi AGrS, Well, you have definitely an error in your project. For PCS7 (except CEMAT add-on) is destined to use interrupt OB's, NOT OB1. The thing with interrupt OB's, is that you always have a cycle time of 100ms, 1sec, etc, which depends on the chosen OB. When you configure your in and outputs, you configure them in a PIP (Process Image Partition) which means the following: 1. Consistent data. An input signal is active during one PLC cycle according to the interrupt OB. 2. Data access is faster through the image partition. An OB1 will increase it's cycle time because of the lower priority. It could be that a value is only updated once every 4seconds (cycle time 4000ms). So, that's why you have to be careful with OB1. |
If I could help you, you can use the RATE button. Thank you. |
|
This contribution was helpful to
1 thankful Users |
5/31/2016 1:03 PM | |
Joined: 3/14/2008 Last visit: 9/4/2024 Posts: 2094 Rating:
|
But, I don't see a direct relation to your problem with the timers and with the hardware. The timer, like timer_P is normally incremented in the CFC block. Then a parameter is available called: "SampleTime" or "Sample_T" in old versions. That parameter has an attribute called: "S7_sampletime" which allows the timer be incremented by the correct value in the OB it's called in. If the timer value is made static like 1sec with not the attribute enabled, then when the block is called in a slower OB, then the time is incremented twice as fast. So, that's why I asked if the block was custom made, where the attribute may not be used and if the block is put in another OB. BTW: You can check this by getting the FB number of the timer block, open the corresponding block in the "Blocks" folder and check the parameter that increments the time->Right click->Object Properties->Go to tab: "Attributes and check if attribute: "S7_sampletime = true", or missing. |
If I could help you, you can use the RATE button. Thank you. |
|
Follow us on