PLC mathematical instruction

Aaron Hao

Member
Join Date
Aug 2013
Location
Penang
Posts
4
I am having a problem fully understanding the mathematical instructions in PLC. why must there is a Clear Carry(CLC) when performing mathematical instruction o_Oo_Oo_O
thanks
 
Since you don't specify the PLC I will have to answer generically.

The Carry flag is used to hold the one bit over-flow of a mathematical instruction. Some instructions can be grouped so that the Carry status of a previous instruction ins used as one of the inputs to a following instruction.

For example, a multi-digit add may add the lowest two digits of each number, possibly affecting the Carry flag, then adding the second digit of each, including the possible carry flag from the previous instruction. But the addition of the very first digits would not expect a valid Carry flag so it would be cleared before that first addition.

Similarly a shift register, as you mentioned in a previous post, may shift the highest bit into the carry flag. A following shift instruction may shift that carry flag into its lowest bit. But the very first shift may only want a zero to be shifted into the lowest bit so a Clear of the Carry may be needed before executing the first shift. On the other hand the process may need a 'one' to be shifted in so it may 'Set' the Carry flag before performing the shift.
 

Similar Topics

Hello all, I have a one problem. I would like to upgrade Mitsubishi PLC Q02 to Q03UDVCPU. I have Q02 program and I change to PLC type and try to...
Replies
0
Views
9
The past week we received a new piece of equipment from Germany which utilizes siemens controls. Typically in our company we use A.B. controls for...
Replies
9
Views
225
the conveyor can stop because of a safety sensor or safety switch. And also it can stop because of an object jam detector sensor. If the conveyor...
Replies
5
Views
193
Good Day to all of you, this is my first post, i will try to explain as best as possible, english is not my natural language. I am performing an...
Replies
0
Views
44
Hi All, Someone at work has put a PLC system on my desk, that's just been taken off an idle production line. He said "It's an S7 PLC. We don't...
Replies
10
Views
255
Back
Top Bottom