subtracting counters

jeepman

Member
Join Date
Oct 2015
Location
kansas
Posts
9
in a slc 5, Is there a way to subtract one counter acc from another one and then say if the subtraction is over 5 that it would trigger and output with greater or equal to 5. Thanks for all your help in advance
 
Please be more specific about the SLC model number. In some cases it may be relevant. The accumulators are just numbers. For a standard counter, let's say C5:0 the accumulator value is at C5:0.ACC. Use an ordinary subtract instruction to get the difference then a compare instruction to determine if that difference is greater than (GRT)or a 'Greater Than Or Equal To' (GEQ) instruction to test.
 
This is in s slc 5/02, I have a feeling im addressing it incorrectly, Do i need to have n7 in the dest to be able to compare greater or equal to. Thank you

source A C5:4.acc
?
Source B C5:5.acc
?
Dest n7:10
?


GEO
source A N7:0
?
Source B 5
?

AQAAAABJRU5ErkJggg==


vAsX3g2D5wbB84tg8c2weO7QPH9oFj+8CxfeDYPnBsn3+kOW9KYR9S2AAAAABJRU5ErkJggg==
 
Last edited:
If N7:10 is the destination of the "SUB" instruction then source A of the compare instruction "GEQ" would be N7:10.
 

Similar Topics

Hello, In CLX5000 I have a DINT being used to store the shift's break time as a whole number ie 1:00 would be 100. The issue is if I want to...
Replies
32
Views
8,703
Hi I am trying to find the simplist way to add/subtract/multiply/divide from all the dint's in a 42dint array. The timing on our main oven loads...
Replies
3
Views
2,998
Hello: I'm working in the Connected Component Workbench environment with a Micro820 PLC. Is there a way to add-subtract date & time values. Thanks
Replies
7
Views
3,528
Basically I have a digital value I need to scale down using this equation: 'end_value = (D1-1000)/100' but I'm having trouble writing it down to...
Replies
3
Views
2,166
Rslogix 500 Im trying to subtract 10 from the level of a tank we have and then use a less than or equal compare to start a pump. How can I...
Replies
11
Views
2,047
Back
Top Bottom