Jump to content

Recommended Posts

Posted
Hi to all. I need to determine the amount of input-pulses in a certain time limit. For achieving this I used the SPD instruction. The problem is that the pulses are rare, a pulse on every 3 seconds and the SPD instruction can measure the speed on the interval of time of maximum 32.767 seconds (maximum 10 pulses). So the precision is less then satisfactory: 1/10 from total speed. I’m wondering if there is another way to measure the speed or the time between two pulses using interrupts or another technique. I'm using IL programing language in GX IEC Developer v 6.00 enviroment. Thanks in advance!
Posted
you could try something like this: ld x0 plc m0 ; create one shot of the pulse ld m0 mov t0 d0 ; when one shot is on, copy accumulated time to register ani m0 out t0 k9999 ; when one shot is off, measure time to next pulse x0 - pulse input m0 - rising edge of the x0 input (one shot) t0 - timer (you could also use high speed timer) d0 - time between pulses all you need to do now is scale d0 to get speed. note that bigger value in d0 means lower speed.
Posted
An alternative method to measure time between pulses is to use the following. There is a function TTMR (Teaching Timer). It was in the FX2N and in the System Q. TTMR D0 K1

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...