ML 1100 floatvalues to two integer values

srv

Member
Join Date
Aug 2010
Location
QATAR
Posts
109
Hi,

I am working on a micrologix 1100 series A Plc.I was trying to transfer a float value to two integer values so i can get decimal points to a seperate integer file.I need to transfer some floating point values to a modbus master device.I think ML 1100 is supporting only integer values for mobbus communication.I went through some of the threads in this forum,but i could't get a clear view about how to do it.I read we can use CPW instruction to copy floating points to integer files with field length "2".I tried to move F8:0 to N7:0 with length 2.There was a floating point value of 10.55 in F8:0.When I used CPW instruction I got 16680 on N7:1 and -13107 on N7:0.Instead of this can I get 10 on N7:0 and decimal value 55 on N7:1.I am not aware of modbus communication with ML1100.How we can transfer float values to a master through modbus communication.Anybody please advice me..
 
Here's a basic procedure to accomplish what you want:

1. SUBtract 0.5 from F8:0 and put the result in N7:0. When you transfer a floating point value to an integer register, the PLC rounds it first. By subtracting 0.5, you ensure that it is rounded down.
2. SUBtract N7:0 from F8:0 and MULtiply the result by 100 before storing in N7:1. You could multiply by other factors to get more decimal places, but be careful not to overflow the register.

EDIT: I didn't test this but I think it will work. You get the idea.
 
In my program F8:0 is analog value linked to flow transmitter reading.Is subtracting 0.5 from F8:0 is only applicable with a constant integer of 10.55.
 
The subtraction should work regardless of the value in F8:0.

Examples:
10.55 - 0.5 = 10.05 -> rounds to 10
6.26 - 0.5 = 5.76 -> rounds to 6
21.00 - 0.5 = 20.5 -> rounds to 21
 

Similar Topics

Hi, I cannot find the DLCA1764.EXE utilty software for data retrieving. Can someone share the link to download this software. Thanks!
Replies
4
Views
93
I am currently backing a Micro Logix 1100 and no-one seems to have the file for me to upload from. Is there a way for me to upload the project off...
Replies
15
Views
496
I'm retrofitting equipment, but I didn't want to change the electrical characteristics of the panel. In this equipment I have a dedicated...
Replies
0
Views
68
I am trying to set up a read message in a MicroLogix1100 to read the value of a DINT in a ControlLogix5561. I have successfully set up a message...
Replies
2
Views
182
Hello, I have an existing application that has a Powerflex 700 with a 20-COMM-E adapter controlled by a Micrologix 1100 via Ethernet. The setup...
Replies
6
Views
1,187
Back
Top Bottom