converting signed to unsigned

mehrdad

Member
Join Date
Nov 2013
Location
canada
Posts
18
Hi all,

I was wondering if there is anyway to convert a signed integer to unsigned integer in Rslogix 5000?
I know that I can use DINT for integers greater than 32767 but how can i convert a singed to unsigned number?

other PLCs simply have a INT to UINT converter function\block.

absence of int to uint converter is really causing serious issues for me.

thanks
 
I think you will want to use the ABS command.The ABS instruction takes the absolute value of the Source and places the result in the Destination.Place the absolute value of value_1 into value_1_absolute. In this example, the absolute value of negative four is positive four.
 
Did you see the reply in the other thread you started on this same subject? This problem is super easy to solve. Don't make it harder than it needs to be.

tc01271401.jpg
 
Last edited:
Thanks "TConnolly". Your posted solution was exactly what I needed to add to my Function Block Diagram.
 
Did you see the reply in the other thread you started on this same subject? This problem is super easy to solve. Don't make it harder than it needs to be.


Cool Nice solution. Now I need to go the other way I have a dint and need to goto two ints where the two ints are swapped

So int2 is the first part of the word and int1 is the second part
So when the value of int2 goes over 32767 It goes negative and int1 picks up the remainder. Does that make sense
 
I just went through it yesterday, The datatype is there but when I try to use it I get the unsupported message. V32.11 as I recall.

I have a 5380 L306 v32.011 and Logix designer 32.00.00 (CPR 9 SR 11). I'm able to configure, download and use a UINT without any errors or notices.
Just an FYI.
 

Similar Topics

Hello everyone, can anyone help me with covert the STL code to ladder. Iam using plc s71200. A %DB1.DBX33.7 // angel of vaccum...
Replies
2
Views
160
Hello PLCs Forum, I am in a bit of a pickle and was hoping someone could offer me some help. I have a .rss file and just need to see the ladder...
Replies
2
Views
92
Hello nice to meet you, im new in here, I'm currently trying to convert code written in STL for a S7-400 to SCL for an S7-1500, because when i run...
Replies
5
Views
253
Hello, did anybody know, if there exist an converting cable like the1492-CM1746-M01 (for an 1746-IB16 to an 5069-IB16), for an 1746-HSCE to an...
Replies
3
Views
343
Hello, This will be my first time converting powerflex 40's and 400's from devicenet to ethernet. I did some research, and it seems I will need...
Replies
4
Views
690
Back
Top Bottom