wsy_nte
Dec 13 2005, 09:46 AM
Hi..
I used 1769-HSC with compactlogix 1769-L32E. I want to reset current count of counter0 to zero for specific logic or manual reset from panelview. How to perform the reset function?
Thank you for suggestion.
James
TechJunki
Dec 13 2005, 10:24 AM
Use a MOV instruction and move a "0" into counter0.pre
TWControls
Dec 13 2005, 12:31 PM
Can someone tell me how to put images in replies
Copy and paste the following into a rung. This is for reseting counter 0 in slot 1. Use something to unlatch the EncoderZeroed bit. You will notice that the counter is disabled before the counter is reset. There is a note about why you must do this in the 1769-HSC user manual. Pretty much the reset is not immediate so the values can become erratic if you don't disable the counter. You may not have this problem but we would have it happen about once every two days.
XIO EncoderZeroed MOV 0 Local:1:O.Range12To15[0].HiLimOrDirWr OTU Local:1:O.Ctr0En OTE Local:1:O.Range12To15[0].LoadDirectWrite EQU Local:1:I.Ctr0CurrentCount 0 OTL EncoderZeroed OTL Local:1:O.Ctr0En
TechJunki
Dec 13 2005, 12:59 PM
Use the Browe button at the bottom of the page to attach an Image..
TWControls
Dec 13 2005, 01:17 PM
Thanks but what is a good format to use. Your picture is a lot clearer than mine
wsy_nte
Dec 14 2005, 10:34 AM
Thank you for reply.
I want to reset the current count value (Local:1:I.Ctr0CurrentCount) to zero? Any idea? or sample RSLogix 5K?
Thank you for help.
James
TechJunki
Dec 14 2005, 11:04 AM
| QUOTE (TWControls @ Dec 13 2005, 12:31 PM) |
Can someone tell me how to put images in replies
Copy and paste the following into a rung. This is for reseting counter 0 in slot 1. Use something to unlatch the EncoderZeroed bit. You will notice that the counter is disabled before the counter is reset. There is a note about why you must do this in the 1769-HSC user manual. Pretty much the reset is not immediate so the values can become erratic if you don't disable the counter. You may not have this problem but we would have it happen about once every two days.
XIO EncoderZeroed MOV 0 Local:1:O.Range12To15[0].HiLimOrDirWr OTU Local:1:O.Ctr0En OTE Local:1:O.Range12To15[0].LoadDirectWrite EQU Local:1:I.Ctr0CurrentCount 0 OTL EncoderZeroed OTL Local:1:O.Ctr0En |
Did you try TWControls Exxample??
wsy_nte
Dec 26 2005, 08:54 AM
Thank you, the logix works good.
I have the problem with counter enable, the encoder not turn but if Local:1:O.Ctr0En set to 1, the Local:1:I.Ctr0CurrentCount start to count. Should in this condition, current count not count until encoder start to turn. I used encoder to measure material length.
How to solve this problem?
Thank you.
James
TWControls
Dec 26 2005, 09:04 AM
If I understand you correctly you are saying you have the Counter enabled and you are not turning the encoder but the Current Count increments. Is this what you are saying?
If this is true I would first say you have a problem in you wiring. Check your grounds. What voltage are you using and whats your encoder part number, specs, any wiring info you might have. How do you have it wired?
wsy_nte
Dec 26 2005, 09:46 AM
Thank you for reply.
Yes correct. The problem is current count increments.
I used Control Tech Encoder with 2048 PPR, voltage supply 5 VDC, A+ A-, B+ B-, Z+ Z-, and +5VDC, DC Com. I connect A+ A- to A0+ A0-, B+ B- to B0+ B0-, +5VDC, and com to encoder supply. Encoder supply with 3 ft cable and distance to 1769-HSC about 50ft. I used db9 connector to connect both encoder and 1769-HSC, run the conduit to panel and shield cable to both db9 chassis. The A,B indicator of HSC is off and OK indicator is steady-green.
Local:1:O.Ctr0En set to 1 then current counts increments even encoder is not turning. Any idea?
Thank you.
James
TWControls
Dec 26 2005, 10:49 AM
What is you counter configuration under the HSC module properties
Should be a ring counter, Operation Mode Encoder X1
The Input filters should be none.
Let me know the other details you have for your counter configuration
wsy_nte
Dec 26 2005, 11:21 AM
Thank you.
The details oh HSC properties under RSLogix 5k
slot1, 2 counter, no filter, ring counter, Pulse Internal direction.
ANy idea?
James
TWControls
Dec 26 2005, 12:01 PM
Needs to be Encoder X1
wsy_nte
Dec 27 2005, 10:40 AM
Thank you TW, it works with good accuracy.
Regards,
James
TWControls
Dec 27 2005, 11:07 AM
No problem. Did you use the code the disable the counter before reseting it?
There is a short explaination of why on page 4-30 of the 1769-HSC user manual
wsy_nte
Dec 27 2005, 11:28 AM
Yes, if motor stop then counter stop to counts and after 200ms then counter will reset (reset current count, as you suggested) and sequence will start again.
TWControls
Dec 27 2005, 11:39 AM
The 1769-HSC does not give you the Feedback fault like a 1756-M02AE if the encoder goes bad or a cable gets cut so heres some simple code to help you find out if your encoder circuits bad. Take a look at it, it saves us a lot of time but we have a very harsh environment.
BST NXB XIC Local:1:I.InputStateA0 CTU FaultFeedback.ACounter ? ? NXB XIC Local:1:I.InputStateB0 ONS FaultFeedback.AOns RES FaultFeedback.ACounter NXB XIC Local:1:I.InputStateB0 CTU FaultFeedback.BCounter ? ? NXB XIC Local:1:I.InputStateA0 ONS FaultFeedback.BOns RES FaultFeedback.BCounter BND BST XIC FaultFeedback.ACounter.DN NXB XIC FaultFeedback.BCounter.DN BND OTE EncoderFault
One of these days I'm going to figure out how to post the clear images everyone else does
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.