I did this project about a year ago and everything was fine until today. My machine working in steps. The operator can look at these steps and turn on outputs for an adjustable amount of time. There is 2 outputs the first must come on before the second. So this is a common type of thing for me so I made an FB to do all this so I could just call the FB when I needed this type of control.
So this morning the customer calls me and tells me that the first output will work for 5-10 cycles then it does not come on. I put status indicators on the HMI that come from the FB directly and these inicators are not coming on either. So I feel that it is a programming problem not electrical. However the code has been working for a year without any problems. The only thing I could think of was the time was being lost going to the timer. So I removed the temp variable from the FB and connected the time direct. I also put the timer number directly into the FB. This fixed the problem but I don't know why. Has anyone had this problem before?
Attached is the call for the FB and Before changes after changes of the FB.
So this morning the customer calls me and tells me that the first output will work for 5-10 cycles then it does not come on. I put status indicators on the HMI that come from the FB directly and these inicators are not coming on either. So I feel that it is a programming problem not electrical. However the code has been working for a year without any problems. The only thing I could think of was the time was being lost going to the timer. So I removed the temp variable from the FB and connected the time direct. I also put the timer number directly into the FB. This fixed the problem but I don't know why. Has anyone had this problem before?
Attached is the call for the FB and Before changes after changes of the FB.