Omron CLC question

It's a dedicated bit. In the HX, that's bit 255.04, or P_CY if you use the default symbol name. EDIT: @gtsuport beat me to it.

As AustralIan alluded to, the ADD function adds the two numbers (augend and addend) and the carry.

I was always taught that for multiword numbers, use an 'add without carry' on the first set (lowest significant word), and 'add with carry' on the rest. In your case, the CLC placement follows that, because these processors don't have a separate add function for with/without carry.

What's throwing me is the actual carry. What is carrying and where? How is it affecting the actual register?
 
Think of the CY bit as an overflow.
If you add 9999 + 1 you get 10000.
There is only one register 4 digits for the answer.
If the CY bit is set, it means the answer exceeded the capacity of the result register.
 
Think of the CY bit as an overflow.
If you add 9999 + 1 you get 10000.
There is only one register 4 digits for the answer.
If the CY bit is set, it means the answer exceeded the capacity of the result register.

Okay, then I THINK I was imagining it correctly. So, that CY bit is just a flag that there IS overflow when it's true. After a math operation is performed that could likely contain an overflow and that value has been written, one uses the CLC instruction to sort of reset that bit in preparation for the next math operation (or whatever) that might contain more bit boxes than anticipated....to prevent missing any data?
 
This is from the C200H* programming manual.

I didn't want to start an entirely new thread for this question, since you have already been replying here: how can I determine what the M-codes in the block program are doing? I looked in the MC421 manual and it didn't have any info. It had a couple of examples of M020 and they appeared to reset something? Mine has the following M-codes: 13, 14, 20, 21,22, 23, 24, 28, and 29. My GUESS is that these codes are probably customized by the machine builder? It is for a robot that places pallets with tombstones on them, at various CNC machining centers.
 
Never mind the M-code question. I just had to pick-apart the block programming and watch the machine run, to figure out what those outputs did. Thanks
 

Similar Topics

Has anyone done SMS messaging from an Omron CJ2J-CPU31 PLC? If so could you help please. Omron here in Oz have not had any experience doing this...
Replies
2
Views
35
I have an old plc in the system I have, moxa nport was used to communicate with scada, I want to replace the plc with cj2m cpu33 and eliminate...
Replies
1
Views
48
Hi all, i have 8 CJ2m plc units that show different numbers on the plc display and i am stuck on reading the info. my unit has an ip address of...
Replies
3
Views
81
Hi all, Currently having trouble getting a speed reference to write over modbus to an Omron M1... I can successfully write a run command and...
Replies
6
Views
249
Hi There, I have couple of Omron PLCs connected on my kepserverex and my intouch reads data from kepserverex. I have been observing that roughly...
Replies
4
Views
130
Back
Top Bottom