Counting down from 10000???

NoName

Member
Join Date
Sep 2003
Location
Domžale
Posts
273
How do I make a counter that will count down from 10000 in step 7.The count down counter can only count down from 999,right??? So how do I do this?The value(10000)is to be entered in an c7 635 OP, and the count value is also to be displayed on the op,so when it reaches 0 the proces will stop.
So any suggestions and help would be apreciated.

Thank you
>Ales<
 
You will, most likely need to put a one shot in front of the subtraction, unless you want it to count every scan.
 
seppoalanen said:
As well DINT :

I've made a similar netowrk in step 7.Only I have integers not double integers.And it only subtracts once.When input EN goes to "1".For example it only, goes from 12 to 11, and no further.Regardles if I put "1" on En input.I have a switch wich count's peices that are comeing from the machine on EN input by the way.

What could be the problem?
 
The problem could be that you load 12 somewhere in the memoryword before the substraction instruction.

NW1

A I 0.0
FP M 2.0
JNB _001
L MW 0
L 1
+I
T MW 0
_001: NOP 0


NW2

A(
L MW 0
L 1000
==I
)
JNB _002
L 0
T MW 0
SET
SAVE
CLR
_002: A BR
= M 2.1


If you try this the "counter" will count up 1 when I0.0 turns from 0 to 1 and M 2.1 will be 1 for one scan when the "counter" reaches 1000 the "counter" will be reset to 0 and start over
 
Last edited:
Thanks for the counter, but it appears to have a few errors,I can't copy it to my ladder.
The errors are here _001: NOP 0 and here _002: A BR.I tryed to correct it but didn't have any succses. So could you please correct it and that i will be able to monitor it in FBD would allso be great.If it's not too much truble. Thank you.
 
There are 2 networks remove the NW1 and copy that into a network and do the same with NW2 then you could show it in ladder. The problem could be that you have other ladder instructions in the same FB, FC or ob if thats the case just change the jump instructions "JNB _002" they are auto genererated by step 7 when converting from lad to stl and cant be the same.
 
Last edited:
Yep I know, that there are 2 networks. I screwed up when I was copying.It helps if I copy the whole network :D. Sory Bratt!
Thanks for the help!!
 
As an STL kind of guy, here's another solution:

//********************
//Part Detect One-Shot
//********************
A #PartPresent
AN #StopMachine
FP #AuxPartDetected
= #PulsePartDetected

//********************
//Count Parts
//********************
AN #PulsePartDetected
JC m100
L #CurrentCount
+ -1
T #CurrentCount
L 0
>I
JC m100
SET
= #StopMachine
L 10000
T #CurrentCount
m100: NOP 0

Note:
"PartPresent" is the bit that indicates that a part was produced.
"AuxPartDetected" and "PulsePartDetected" are bits of your choice.
"StopMachine" is a bit that can be used somewhere else in your program to halt production, and must be reset to resume production.

Also, now that the basic routine is working, you could toss in other stuff, such as a "Lifetime Total Production" count:

//********************
//Part Detect One-Shot
//********************
A #PartPresent
AN #StopMachine
FP #AuxPartDetected
= #PulsePartDetected

//********************
//Count Parts
//********************
AN #PulsePartDetected
JC m100
L #LifetimeCount
+ l#1
T #LifetimeCount
L #CurrentCount
+ -1
T #CurrentCount
L 0
>I
JC m100
SET
= #StopMachine
L 10000
T #CurrentCount
m100: NOP 0
 

Similar Topics

Hello, all! Maybe someone had the same problem? I use the Rockwell Automation software. I need to make 24 hours timer indicator with minutes on...
Replies
6
Views
1,811
Hi, I am wanting to know if this is possible using S7: When a 1 hour timer has been triggered (count up timer), to detect when the 1 hour timer...
Replies
6
Views
2,155
Hi ,I need your help. I have Mitsubishi FX1N and GT-11 Nais screen and I have to show time counting down on the screen . May be someone knows how...
Replies
2
Views
2,090
Hello I am looking for tips on how to count the duration of a given function and then how to display it on the hmi panel in the hh:mm:ss format...
Replies
4
Views
1,703
Guys, I know it will be silly but can't get my head around it. I have 3 conveyors, every one on a separate servo drive, and 2...
Replies
25
Views
3,506
Back
Top Bottom