4/25/2023 2:56 PM | |
Joined: 4/25/2023 Last visit: 6/16/2023 Posts: 1 Rating: (0) |
Hello, I'm trying to reset the ''CountValue" output parameter of an High_Speed_Counter bloc, to the value "1", when a sensor is trigged. I read the documentation on Static Parameters and Input parametersof HSC, and according to what for reseting the CountValue parameter, I have to detect a rising edge on the "SetCountValue'' input parameter. This edge should load the ''NewCountValue" static variable value into the "CountValue". Therefore, here is my logic (see picture). In my function bloc, I load the value "1" in the static parameter "NewCountValue" when "SetCountValue" is low. And when the sensor is trigged, this value "1" should be load in the "CountValue". But it doesn't. It keeps its current value.. Do you have an idea on how to deal with this? In fact the issue I'm trying to solve is as follow : An incremental encoder is connected to an HSC input of the PLC. The encoder is coupled to a DC motor actuatable in the two senses of rotation over multiple cycles. The problem is that after some number of cycles, the CountValue parameter takes different values of number of pulses for the same position of the motor axis. (Repeatability issue). I'm not abble to make a hardware recalibration so I'm try a kind of software calibration consisting in resetting the sensor after each cycle, by touching a fixed point (the rising edge). Thank you very much in advance for your support. |
Follow us on