How can I count Rising Edges in Citect?

Energiser

Member
Join Date
Jan 2009
Location
NSW, Australia
Posts
6
Hi,

I'm trying to find a way of counting the number of rising edges occurring on a digital variable in Citect.

The variable is feedback from a relay, and the aim is to count the number of operations during a month or two, and then use that to approximate the number of operations during its lifetime to date.

I have been instructed to attempt to do this in Citect first, resorting to using the PLC only if there is no easy way in Citect. Even Cicode is a second resort, if there are no built in methods of counting.

Regards,
Tim
 
Citect update time is normally in the region of 1-2secs and would be unable to detect a plc input rising edge. Counting the input in the plc is far easier, eg. on the rising edge increment a 32bit register
The plc data can be made retentive as well.
 
I have spent all day talking to everyone I know with Citect experience, and every single one has said that using a one-shot in the PLC is the way to go (as I always thought). However, going through Citect help, I just came across the "Accumulators" which appear to do exactly what I want.

Now I guess the question is, has anyone ever used accumulators? Any advice on things I should be careful of?

Just to stress the point, I'd much rather be doing it in the PLC, but since I'm only a trainee, I get told to do it in Citect... I try to do it in Citect.
 
The problem with doing it in Citect will be the "watch time" the minimum time that Citect is able to "see" typically this will be around the 1 second mark, if your inpuit is likely to change state faster than once or twice a second then do it in the PLC or just use a random number generator because if it's fater than that using Citect will be very inaccurate .If the inputs cycle time is slow enough then yes an accumulator would be OK. Check there example project and read their on-line help they explain the accumulator process reasonably well
 
Thanks for your reply Dua Anjing,

The variable should only have a transition (rising edge or falling edge) every few minutes. So a 1 second watch time wouldn't be a worry.

I'll definitely have a look at the implementation in the example project.
 
Hello,

The standard citect way to achieve this is to use an accumulator. It is designed to keep track of the run hours and the number of starts of a motor.

You have to take into account the resolution of the accumulator. it read the data once every 500ms (the scan time of the Alarm server) and calculates the run hours and the number of starts.

Hope this helps,

Marsupilami
 
Relays have contact bounce and there will be a number of rising edges as the contact closes, make sure the input you use on the PLC is not a high speed type.

Bryan
 
Thanks for the responses.

My watchtime will probably be something like 30 seconds, so contact bounce shouldn't be an issue. However, since these values are only going to be the base for further estimation, high accuracy isn't a high priority.

Having read all the help file information regarding accumulators, there was mention that Accumulators are part of a report server. Personally, while I have heard of report servers, I wouldn't have a clue how to tell if we're even using one, let alone ensure it is set up to work properly. I have already asked our local 'Citect Guru' and he hasn't had anything to do with report servers or accumulators, so you guys are almost my only resource. Any advice?
 
basically the accumulator will "watch" a tag (your transition) and will (depending on how you set up your accumulator) increment the "number of starts" by one and will increase the "totalizer" by the the "totalizer inc". You will need to create tags for the the "number of starts" and the totalizer's
 
I think this is the last thing I'll need to ask (famous last words): Do you have to have a variable tag for each different section of the accumulator? I only need the 'number of starts' functionality, so can I leave the totaliser, and 'running time' sections blank?
 

Similar Topics

What is the raw count of Allen Bradley Flex Analog Output Module 5094-OF8 raw count?
Replies
1
Views
126
I am working on a Markem X40 printer which uses NGPCL Commands and needs to send commands using a .net program. I need help with the following...
Replies
1
Views
143
Hi, I'm programming in RSLogix 500, and I'm wondering how I would program a Jog command that does not increase the encoder count. Basically we'd...
Replies
3
Views
303
Hi all, I am currently working on a software in Automation Studio that is supposed to detect when effort is inputted by a user. This is done via...
Replies
0
Views
598
Hi i have project on micrologix 1400 to display cycle time count on HMI. I am beginner. in project i have six input once all input get high it...
Replies
3
Views
809
Back
Top Bottom