Omron CX-Programmer Adding Unsigned Integers

Hann

Member
Join Date
Nov 2022
Location
New Zealand
Posts
16
Is there a way in CX-Programmer to ad UINTs together with an instruction without a compiler warning.

Ladder Rung:
UVuQIAs.png


Warning:
OWG8Otg.png


Instructions:
YtV7JO3.png


Potential Solutions: (That are not great as it works around the issue)
-Use Channel
-Disable Warning
-Use and INT

Update 1: Found Existing Topic:
https://forums.mrplc.com/index.php?/topic/37949-unsigned-integer-addition-and-subtraction/
 
Last edited:
just the obvious: MOV to a data type with more (enough?) bits (e.g. float or even BCD), do the add, and hope the result doesn't overflow on the MOV back to UINT.
 
It does not really matter - it is only interpretation of the number. Just because you are using add INT makes no difference to the numbers being added - just read it as a UINT and it will be fine.
 

Similar Topics

Hello ! I am trying to use an omron cj2m-cpu33 with a CP1W-CIF01 plug in serial connector to talk to a zebra ZT610 printer. I am getting the data...
Replies
8
Views
317
I am using a function block that has a in/out parameter that is a structure. The structure has an array as one of the elements. I can index the...
Replies
1
Views
708
Is there a way in CX-Programmer to call Ladder Instructions from a structured text program? I can see several functions in the autocomplete...
Replies
3
Views
1,852
Is there a way in CX-Programmer to call functions from a structured text program? I have found this manual that seems to describe the process...
Replies
1
Views
1,006
Is there a way in CX-Programmer to initialise an array? Set all values to zero or false depending on the data type Solutions in Ladder and...
Replies
2
Views
1,225
Back
Top Bottom