Posted 1 April Hi, data registers are getting full, because of extremely high speed pulsing is there any way , if the data value in register goes above the capacity of 32 bit register, it automatically attaches itself to next set of data registers so lets say if data was written in D10,D11 Upon reaching the limit, it goes to D10, D11, D12, D13 please share if there is an alternate way to do this Share this post Link to post Share on other sites
Posted 1 April We need more information in order to help you. My suggestion is to attach your code so we can analyze it. Share this post Link to post Share on other sites
Posted 1 April Thanks Goran, please find the code attached i have 2 pole motor, which runs approximately at 3000 rpm, and encoder is 2000ppr Frequency is approx 100 khz, Counting is not a problem, its just holding the values 32 bit register can hold 2 billion bits, and at 100khz , my data register will be filled in 2000 sec, i need it to operate for much longer time than that so my quest is if it reaches lets say 1 billion bits, it automatically attaches it to adjacent register Explaining it in simple ways would be, i have created dataflow as a water flow analogy thanks Best Regards, Vib Encodercontrol.pdf Encodercontrol1.pdf Share this post Link to post Share on other sites
Posted 2 April High Speed Counters are processed with special commands, because the speed of input signals is faster than PLC cycles. See commands DHCMOV, DHSCR, DHSCS, DHSCR and OUT_C. Basically, my suggestion would be to use the previous commands to set the counter, compare it and copy it. For example, set the counter preset value to 1,000,000,000. Copy the value of C251 into a 32-bit register (for example D500 and D501), using DHCMOV. Each time the set value of 1,000,000,000 is reached, increment the next register (eg D502) and reset C251 and start counting from the beginning. If you do not use dedicated commands, and maybe even interrupts, the counting will not be accurate. Share this post Link to post Share on other sites
Posted 2 April Thanks goran, i will change the logic using dedicated commands, i have used that incremental concept and resetting in the logic For me to know absolute position of the motor in reference to zero, i have to link the registers in sequence i think there is a logic of first in last out, might help me to link the registers in sequence thanks for your help best regards vib Share this post Link to post Share on other sites