modbus and ml1100 help.

lbric

Member
Join Date
Jul 2013
Location
Bell Gardens CA
Posts
27
Hello,

i have a micromotion flow transmitter communicating with a ML1100 plc via modbus over channel 0. i am messaging to read data from the transmitter modbus registers with partial success. Here is the issue, i am able to read/write to registers 40039-40046 which are whole number integer values (example register 40039 contains the number 81 and i am able to store that inside a N7 file on PLC) but when i try to read registers 30002-30011 which contain process variables of the transmitter, i only see "-1" stored in the N10 file i have created for these. Register 30008 currently has a value of 671.293 i was expecting to see at the very least the value of 671 stored in the integer file upon the message read but all i get is -1. I hope someone can shed some light on what might be happening and how i can resolve.

thanks
 
If the data in the device is a 32 bit float, you may need to store it in two consecutive integers and then CPW the result into a floating point register in the PLC in order to view it. You might also need to swap the positions of the N file elements or their bytes before copying them to a float depending on the word order of the device. You can't read directly into the floats with a Micrologix, but there's a 50/50 chance you need to manipulate the bits, bytes, or word anyway in order to get the proper values.

I would recommend reading the whole group of input registers 30002 through 30011 in one MSG, then show us what you get.
 
thanks for your reply. i am currently reading 30002-300011 via the msg instruction storing into n7:2-n7:11. according to my transmitters manual, these registers are formated as 16 bit integers(the values stored inside these registers are also represented in 32bit floating format within 20247-20266). within that group only 30006-30007 are not valid registers. i am updating read values every 1 second when i look at n7:2-n7:11 i see (-1, -1, -1, -1, 0, 0, -1, -1, -1, -1) the zeros belong to 006 and 007.

i tried reading only 30002-30005 and 30008-30011 thinking i might be getting an error due to reading invalid registers 6/7 but the result is always -1.

i moved the the n7 values into f8 using the CPW instruction. when i set the instruction length to 1 (i assume this means i am copying only n7:2 into f8:0) i get zero in exponential form. when i set lenght to anything greater than 1 i get -1.q#nan in f8:0-1.
 
Since the MSG is completing, then apparently the flowmeter is replying, just doesn't look like correct data.

One device I worked with did not accept reading of multiple registers but would respond with an error code when I tried. Have you tried just reading two integers or one integer at a time? Just in case requesting those invalid registers as part of the group is causing it to balk.

You might try reading registers 20247-20266 and see what it give you...

Modbus always turns out to be an exercise in trial and error when dealing with a new device for the first time.
 
Maybe you are reading the wrong address.

Modbus is peculiar in that way that 30001, sometimes written as 3 0001, doesn't actually say address 30001. It says 0001 (the first) within input registers (=3). This is historical, related to Modicon PLCs.

In the protocol itself this is sent as function code 3 (read input registers) and address 0000 (not 0001).

I don't know how you set up the communication but there is often room for confusion both on the PLC and transmitter.

Have a look at wikipedia for some quick info related to this:
https://en.wikipedia.org/wiki/Modbus
 
Last edited:
Hello Guys,

thanks for providing the input, i figured out that the transmitter i was hooking up to had a fault status that was placing the -1 value into the registers i was reading. I connected to another unit and i was able to retrieve the integer values as i expected.

I now have a new issue. the communication i was doing previously i had my ML1100 chan 0 set up as a modbus master with no handshaking 485. I was reading/writting via the msg instruction.

I ran through a tutorial i saw to setup my ML1100 as a modbus slave. i set the baud/parity/stop/data bits as instructed by my transmitter, set the node address to 2 and made files n20,n21,n23,n24 for the modbus table file numbers. i set control line to no handshaking 485. once i connect to the PLC i expected to see those integer files populated with the values i was able to read while ML1100 being master but no data is present. Not sure if there is something else i need to do or if that integer file should automatically populate.
 
I now have a new issue. the communication i was doing previously i had my ML1100 chan 0 set up as a modbus master with no handshaking 485. I was reading/writting via the msg instruction.
...
I ran through a tutorial i saw to setup my ML1100 as a modbus slave.

Two slaves will sit there waiting for orders to be given by the master.

Who's the master now?

Most likely, the set up you had already working will need to be implemented with the PLC as the master.
 

Similar Topics

So I have an ABB TotalFlow uFlo G4 unit and have configured it's COMM port as Modbus Slave. I have also mapped internal 32Bit Float Registers to...
Replies
9
Views
5,835
Hello all, I am trying to setup my MicroLogix 1100 as a modbus RTU master for a modbus network containing multiple modbus RTU slaves. I currently...
Replies
7
Views
3,931
Hi all. I have some problems with ML1100 and modbus rtu, I have 2 nodes with solcon HRVs soft starter and MPS3000, ML has 1763-NC01, the ladder...
Replies
13
Views
5,450
I have a AB ML1100 that I am using to collect data from a device sending data over Modbus TCP/IP. From what I understand I will have to use the...
Replies
0
Views
1,767
I am using Micrologix1100 as Modbus slave and Honeywell dcs as Modbus mater. ML1100 communication parameters configured with the Channel0 are as...
Replies
9
Views
9,020
Back
Top Bottom