Jump to content

Recommended Posts

Posted

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

Posted

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

Posted

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.

Posted

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...