Combining two integers to get a float

krakenfan69

Lifetime Supporting Member
Join Date
Nov 2011
Location
Alberta
Posts
229
I have two integers in Dec. 16169 and -30892. They get moved to a float and displayed. I am wanting to double check the value to expect. I have search but not quite finding the thing I need. How can I figure the Floats value offline with a calculator? Anyone know the formula and can explain it to me so I can understand what's going on?

Thanks for any help,

Kraken Fan #69
 
Last edited:
I have two integers in Dec. 16169 and -30892. They get moved to a float and displayed. I am wanting to double check the value to expect. I have search but not quite finding the thing I need. How can I figure the Floats value offline with a calculator? Anyone know the formula and can explain it to me so I can understand what's going on?

Thanks for any help,

Kraken Fan #69

What do you expect that number to be?
 
11.34554. But more importantly I am interested in learning the math behind it and how to calculate it offline. :)

Kraken Fan #69
 
I just used it and it worked like a charm. (Matched the value I had expected anyway) Thanks for such a great link and all your help. If anyone has anything to add on doing this with just a calc and the math behind it I would still be interested in learning more!!

Kraken Fan #69
 
I just used it and it worked like a charm. (Matched the value I had expected anyway) Thanks for such a great link and all your help. If anyone has anything to add on doing this with just a calc and the math behind it I would still be interested in learning more!!

Kraken Fan #69

Glad it worked for you - I couldn't get it to match your expected value, but as long as you did...
 
Hi

Not sure if you are using an ab plc but I had the same problem coming from a sick vision sensor last year and I used a cop instruction from a dint or int can't remember to a real and it worked for me as the mov instruction would not

Donnchadh
 
AB PLC 5. Just was chasing the Dragon on some values that aren't updating on a daily report and ended up here, got curious and couldn't get an acceptable answer until JHarbin popped by. Just always want to know more...

Kraken Fan #69
 
Last edited:
Hi

Maybe you could try the cop in plc 5 and see does it work as it did for me in 5000. Just if you get a chance but be careful as I have faulted a plc 5 in the past with some items, not as easy to fault a 5000 thank goodness

Donnchadh
 

Similar Topics

Hi, I have a functions which extends codes generation for RFID tags. Basically it takes a char and splits it's hex value over 2 chars. I cannot...
Replies
24
Views
9,446
I'm onsite right now and I'm trying to decide how to proceed. I need to make some major edits to the Micrologix 1400 file, but the guy with the...
Replies
9
Views
1,159
Hello, I am trying to write a logic to control a pump. I have my logic as attached. Is there a way to do Auto and Manual control without having...
Replies
12
Views
2,719
Hi there, Quick Question. I have 2 PLCs and 2 solenoids. I would like to wire these up so that If either one turns on, it will turn on both...
Replies
17
Views
11,413
Hi all. I’m currently trying to combine 3 memory words in to a single display on a weintek hmi as I want to display running time. I have the...
Replies
4
Views
1,830
Back
Top Bottom