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

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
26
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
8
Views
143
I have a project to automate four generator sets. The system will monitor and store the load demand of the factory. Once there's Power outage, the...
Replies
0
Views
49
i have two plc 1. s7-1212dc/dc/dc ip; 192.168.0.1 2. s7-1500 1513-1pn ip; 192.168.3.2 i need to get data from plc1 to plc2. any idea how to do...
Replies
5
Views
93
Back
Top Bottom