PLC5 Float Error How to do DINT

Looks Like Float strikes again

kamenges said:
This should be very similar to Alaric's solution but it doesn't count on the unsinged integer result capability of the SLC series. And, yes, it's not pretty.

My other thought was to do this like a micro-p does it in hardware. That would be even messier yet but it would most likely be faster.

Keith

According to Windows Calculator
17FFF + 17FFF = 2FFFE

Plugging these numbers into your example gives the following results

N17:1 = 7FFF
N17:2 = 1
N17:3 = 7FFF
N17:4 = FFFE
N17:5 = 3
B13:0 = 1
 
I think that just means my loigic isn't right. I wrote that on the fly with nothing to test it on. I'll take another look and see if I can see where I went awry.


Keith

That was quick. Rung 2 has a typo. I was looking at bit 9 to determine if the value was negative, not bit 15 like I should have been. Try this one. It should work better.
 
Last edited:

Similar Topics

Hey guys, I have run into a bit of a hiccup. I am trying to store a large number (45123456) to a PLC5/30. This is actually a Product Order number...
Replies
3
Views
1,808
Hi,all. I have a PLC5 question about float format. We used Remote IO to communicate with a Mettler Toledo scale which has a float output. The...
Replies
4
Views
3,640
A recent challange I worked out tonight was getting a float, which represents the number of counts for an indexing drive to move, split into a low...
Replies
3
Views
4,400
I'm getting values from a Crompton Switchboard Integra in the HEX form in a PLC5/40 and I need to convert it to IEEE 754(floating so operators can...
Replies
1
Views
4,030
I'm getting values from a Crompton Switchboard Integra in the HEX form and I need to convert it to IEEE 754. I've been succesful in a way to do so...
Replies
1
Views
3,768
Back
Top Bottom