7/3/2013 9:22 AM | |
Posts: 5 Rating:
|
Now I'm using cpu315-2pn/dp() and fm3501(6ES7 350).before starting counting work, I preset the load value to 0, the comparison value 1 to 5000. When count work started, a few time later OB40 trigged.In OB40, I read the actual value DBD34(created from UDT2).The DBD34 value is smller than 5000,Maybe 4995 or 4998.The value changed with the encoder's frequency. So read the count value in ob40 is not equal to the comparison value when comparison value reached? |
7/3/2013 9:39 AM | |
Posts: 5 Rating:
|
Anybody can help me and give some explaination? |
7/3/2013 9:57 AM | |
Joined: 11/18/2010 Last visit: 8/5/2022 Posts: 523 Rating:
|
hi, can you give more detail have you made program in OB40 or OB1 ,for comparison? and you mean to say your counter not reset to 0 after comaprison? viral patel |
7/3/2013 10:39 AM | |
Posts: 5 Rating:
|
Yes ,I have programed in OB40 and OB1. The attachment is my project! In OB40, I read the actual count value and found that the actual count value was not equal to the current compapsion value which trigged the OB40 hardware interrupt. In OB40, I also load next comparison value with the sum of current compasion value and 10000. AttachmentFm350-1t.zip (322 Downloads) |
7/3/2013 11:04 AM | |
Joined: 11/18/2010 Last visit: 8/5/2022 Posts: 523 Rating:
|
can you please make use value comparison function in OB 1 instead of OB40 ! VP |
7/4/2013 4:09 AM | |
Joined: 11/17/2011 Last visit: 6/17/2024 Posts: 123 Rating:
|
dear baobo, i tested a FM450, it is similar with FM350. So with counter module in high frequence, they can not count exactly 100%. i asked a expert this problem, and they show me " the actualisation time of the Interface of the FM 450 (0,5ms) has a influence. For OB 32 you configured a scan time of 1000ms, this scan time is not as accurate, like it should be for frequency measurment/calculation, there will be always a little jitter. Then we have the communicatuion from the CPU to the FM, which has also a little jitter, then we have the refresh time of the Interface of 0,5ms,also with a little jitter. Now you supplying a frequence of 1000Increments/s (which may have a little jitter as well) to the FM Module, count the signals, and in OB32 you compare the differnce between to counts. If due the combination of the small jitter and every part now just 1increment is missing, you will recieve as result 999, and since that their is no increment loss, you will another time then 1001.This is typcialy for this kind of frecuency measurment/calculation. The measurement error will in this kind of measurement always be 1 Inkrement! To minimise this measurement error you may increase the frequency supplied to the FM or increase the Scan time of OB 32. If you would increase the Scan time of OB32 to 10000ms, with a frequency of 1kHz, you wirll recieve values 9999, 10000 or 10001. "because in its manual have a sentense that is "Internal update time of the FM 450-1: 0.5 ms" i hope this information can help you. |
7/4/2013 8:46 AM | |
Joined: 1/21/2013 Last visit: 11/20/2024 Posts: 4620 Rating:
|
Hi baobo, did you try to call the function of your counter in a OB3x? In the hardware configuration to reduce the execution time of 5 ms of the respective OB3x and see the result. |
7/4/2013 9:33 AM | |
Posts: 5 Rating:
|
I'm afraid OB3x cyclic time is longer than 2ms! |
7/6/2013 11:03 AM | |
Joined: 5/28/2008 Last visit: 3/24/2025 Posts: 4520 Rating:
|
Hello baobo, If you would like to make part of programming in OB40, please make sure that this part is being executed in the required time. I doubt because OB40 (or generally OB4x) are Hardware Interrupt OBs. That Obs are being called in case of triggering a preselected DIs, AIs or FMs in Hardware configuration. Did you already set the counts that will trigger OB40? And also: Hope this helps.
|
Ayman Elotaify |
|
Follow us on