Scan Counting

bobby111

Member
Join Date
Aug 2006
Location
mn
Posts
4
I need to try to count PLC scans with an allen bradly SLC processor. If anyone could help me out it would be much appreciated.

Bobby
 
Put an unconditional ADD instruction. Source a your scan tag, Source b 1, and destination you scan tag.

You will have to deal with the rollover. Which SLC you got?
 
what exactly you want to achive by counting scans?
measure scan time of the plc? you can simply read register
since this is already calculated by cpu. default is to show
values in 10ms increments but toggling bit S:33/9 will
change it to 1ms resolution.
 
I just meant point to a data file

How many scans between this output?

If it is less than 32767 then just use an integer and a compare statement.

More than that and you need to setup something to count how many times it hits a certain value and then do the math to compare the value.

Why do you need to turn on a bit every so many scans. Curious about the application. Can't say I have ever seen this
 
bobby111 said:
I need to turn on a bit every X scans

Then use an unconditonal counter and unlatch the /CU bit so that it will count continuously. The CU bit is what the counter uses so it only up counts on a false to true rung transtion. Unlatching the CU bit makes the counter run continuously. This way the CTU instruction will do all of the adding and comparing for you. With a CTU, you also wont have to worry about integer roll over and the minor error bet set by rolloever.


-----------+----+-CTU-------+-(CU)-
| | C5:0 |
| | PRE X +-(DN)-
| | ACC 0 |
| +-----------+
|
| C5:0/CU
+--------------(OTU)---

C5:0/DN BIT
-----] [-------+----------(OTE)---
|
| C5:0
+----------(RES)---


 
Last edited:

Similar Topics

Got into a bit of a debate the other day, and wanted to get some gurus' opinion/expertise on the subject. When duration of an output's ON (or...
Replies
9
Views
10,775
Hi everyone, I'm trying to simulate any program in control expert and see a register in Modscan32 or any software to do that (Like ModbusPoll). I...
Replies
0
Views
108
I am not sure if this is possible but if there is a way, you guys would be the ones to know. I am currently working on a project where we are...
Replies
7
Views
231
I have a Type C to RS485 adapter connect to my Siemens RWF55. I use modscan to scan it to get a value from the Siemens controller. In the...
Replies
4
Views
110
Hi, I'm new to PLCs and learning about PLC Scan times for Schneider PLCs I've derived the PLC scan time using the free running blocks. The PLC...
Replies
7
Views
693
Back
Top Bottom