E+H Pressure Transmitter to CompactLogix via IOLink

JLand

Member
Join Date
Apr 2019
Location
Madison, Wisconsin
Posts
109
Hi folks,

I am having a hell of a time getting an E+H PMP23 scaled correctly in a CompactLogix PLC. I have tried all sorts of data manipulation to get this dang thing working but nothing has helped. I called IFM (I have an IFM IOLink master) and they couldn't help, and I am waiting of E+H to call me back but I am not holding my breath.

The manual says the the first 30 bits (0-29) is the raw process data spread across 2 16 bit INTs, with bit 0 being the LSB. The last 2 bits of the the second INT is for something else. I have tried:

COP INT1 into a DINT BTD INT2 dest 16 len 14
BTD INT1 dest 0 len 14 BTD INT 2 dest 14 len 16

and I have also tried addressing INTs 2 and 3 as well as reversing which INTs I use (COP INT2 first instead of INT1, for example.)

When I push my finger on the sensor, only INT2 changes. INT1 is always 16383 and INT3 is 0. My guess is INT2 is the least significant process data and INT3 is the most significant process data, but I tried that and I couldnt get it to work.

IFM tells me the transmitter should be sending the actual PSI value of the sensor divided by 1000.

See my screenshots attached for a better picture of what I am working with.

When the sensor is sitting there with nothing on it, INT2 is either -250 or -220.

Here is the manual for the sensor under downloads/IOLink Operating Instructions:

https://www.endress.com/en/field-in...gauge-Cerabar-PMP23?t.tabId=product-downloads


I am at the end of my rope, can someone help? Thanks a bunch in advance.

RawData.png Manual.png Ex1.png Ex3.png Ex4.png
 
The manual says the the first 30 bits (0-29) is the raw process data spread across 2 16 bit INTs, with bit 0 being the LSB. The last 2 bits of the the second INT is for something else.

I am not familiar with E+H or the IFM IO Link, but this did catch my eye. Are you sure the manual says spread across 2 16 bit INTs?

The device's process data are transmitted cyclically in 32-bit chunks.

Bit 0 is your LSB, bit 29 is your MSB, bit 30 is the switch output status, and bit 31 is reserved. This sounds like a single DINT to me, but I could be very mistaken.
 
Mikey, I had a similar thought. However, the array size of the data structure is set by the IO Link master (according to the IFM support guy), and not the device. This means the device is transmitting 32 bit chunks to the master but the master is interpreting it and transmitting it in 16 bit chunks. He verified, for my master (IFM AL1123) that the IO data structure should be 16 bit INTs.
 
Try COP Int1 to DINT length 1.
You should get both INT's in the DINT. Then strip out bits 31 and 32.
You say the value is divided by 1000, but I would think multiplied by 1000 to give 3 implied decimals. So multiply the DINT by .001 and store in a REAL.

If the value is not correct, you may have to swap Int1 and Int2.
 
16383 is 13 1s, and 1 less than 16384, i.e. bit 14 is 1, all others are 0 in a 16-bit INT, that bit 14 could also be bit 30, or the switch status, of the second INT of the pair.

Can you toggle the switch output and see what changes? If not, what is the state of the switch?

-250 is all 1s in the high byte, and -(-256-250) = 6 (0b00000110) in the low byte.

When you see -250 or -220, what is the actual pressure, and in what units, that the sensor is measuring?

When you push your finger on the sensor, do you have any idea what the pressure reading is?

I wonder if the bits are flipped?
 
Last edited:
Update - I think I got it. The solution is to treat INT2 as PSI*1000, but you need to strip out the last bit of INT2. This bit is set when the pressure is above a setpoint in the device itself. When I originally played with INT2 I did not strip this bit out and this caused the readings to jump all over the place and look like garbage.

I think INT1 is just for status bits, and INT3 and 4 are not used for my application (they are always 0 - perhaps they have a use but not for me).

My biggest gripe here is the documentation from E+H. It is not particularly clear in what needs to be done and I would wager it may not be accurate. According to it, it looks like I should be treating INT1 bits 0-15 and INT2 bits 0-13 as my pressure reading, with INT1 bit 0 being LSB. This is not congruent with my results.

Thanks to all for the help. I sincerely appreciate it.
 
There is no way Ex3.png is right.

.Data3 does not exist, so there is no way Ex4.png is right.

Assume dest is a DINT, either

BTD .Data1 0 dest 0 16 BTD .Data2 0 dest 16 16


OR

BTD .Data2 dest 0 16 BTD .Data1 dest 16 16


Then

XIC dest/29 BST OTE dest/30 NXB OTE dest/31 BND


If that does not work, byte-swap each of .Data1 and .Data2 individually and repeat.

One of those four options will work, and you will get -250 or -220 in DINT dest without a finger on the sensor.

No wait ...

BTD .Data1 0 dest 0 16 BTD .Data2 0 dest 16 16
SWPB dest REVERSE destr XIC destr/29 BST OTE destr/30 NXB OTE destr/31 BND
SWPB dest WORD destw XIC destw/29 BST OTE destw/30 NXB OTE destw/31 BND
SWPB dest HIGH/LOW desthl XIC desthl/29 BST OTE desthl/30 NXB OTE desthl/31 BND


dest, destr, destw, and desthl, are all DINTS. The one that yields -250 or -220, without a finger on the sensor, has followed the Right Path™ and should be scaled (or just [MUL dest? 1e-3 destfloat]).
 
Last edited:
Update - I think I got it. The solution is to treat INT2 as PSI*1000, but you need to strip out the last bit of INT2. This bit is set when the pressure is above a setpoint in the device itself. When I originally played with INT2 I did not strip this bit out and this caused the readings to jump all over the place and look like garbage.

JLand,
I new project just came down the pipe that has 23 of these PMP23's spec'd for the plant.

Can you please post a screen shot of your solution? it will save me a lot of grief. Thanks!!
 
Hi Greg, attached is an example of what should work.

It isn't exactly what I have running because I am not absolutely in love with my original method of doing this. In my application it works perfectly well and I have no issues with it but I wouldn't call it best practice nor would I call it extensible. In the screenshot, please ignore that the run isn't evaluating. It is just a config issue in the module and nothing with the rung itself.

A quick explanation:

Before you begin, if you are using IFM IOL masters be sure to set IOLink_Master:C.Swap_Port_x to 0 if you are using an AB PLC. Keep it 1 if you are using a Siemens.

Generic_8PORT_IOL is a generic AOI that conveniently addresses any 8 port IFM IOLink Master (this is using IFM AL1123 - which master you are using does change this, and this guide is written with only AL1123 in mind). This AOI isn't necessary but it makes addressing the input and output data structure much easier. If you have IFM masters, please go on their website and download their startup package, and read the guides. They are helpful but don't give you everything.

The IOLink operating instruction for PMP23 can be found on the E+H PMP23 webpage. Go to page 21 for info on how to integrate the device to your PLC. DO NOT LOOK ELSEWHERE FOR THIS PDF. Certain 3rd party manual compilation websites have old versions of this PDF and this information has changed recently. On this page, you can see the first 30 bits transmitted from the PMP23 is your pressure value. Do not think of this as a mA signal, this really is just the binary representation of your actual pressure, more akin to an EIP device.

First we move the first input INT from the generic AOI into a temporary holding DINT. We then concatenate the first INT with the second INT using BTD. Lastly, we strip out the last 2 bits (these are used as a pressure switch and some reserved bit) using a masked move and feed the this tag into a scaling AOI.

As for scaling, I would keep the unit unchanged in the device. This way a maintenance guy can swap out parts without having to configure the units in the device itself using LRDevice. I can't remember what the default units are though, if I had to guess I would say bar. On page 21 of the manual you can see that to get your bar reading you multiply your raw input by 0.0001 (or divide by 10000). From there, in your PLC, convert to whatever unit you wish.

(Just as a note of philosophy, avoid changing any configurations in your IOLink master beyond IP settings. Keep the IOLink master in dependent mode and configure from the PLC's :C data array. This keeps the hardware hot-swappable.)

I can't say with absolute certainty that this method is perfect but it should get you 95% of the way there.

PMP23 IOL EX.png
 
Before you begin, if you are using IFM IOL masters be sure to set IOLink_Master:C.Swap_Port_x to 0 if you are using an AB PLC. Keep it 1 if you are using a Siemens.

JLand,
Thank you for this detailed explanation.

Some questions:
1) I have scoured IFM's Startup Package docs and find no reference to Swap_Port_x configuration parameter. How did you determine to set this to 0 when connected to an AB PLC?
I've been using IFM master modules for 3 years with various IO-Link devices (using both the IFM specific device AOIs and also the Generic AOI) and have not changed the value of the Swap_Port_x (which is set to 1 by default).

2) Specific to your code for the PMP23 I see your using both In_Data1 and In_Data2. It also appears that you’re stripping more than just the last two bits of PT_TEMP in your MVM instruction (or am I reading this wrong?).

Also, how would you handle negative pressure values (or is the default Bar unit in absolute pressure then just scale accordingly for gauge pressure?)?

Yes, I agree with your philosophy of doing all configuration changes in the PLC. Besides ... IMO the LRDevice app is a bit kludgy.

Anyway ... thanks a million for your time.
 
JLand,
Thank you for this detailed explanation.

Some questions:
1) I have scoured IFM's Startup Package docs and find no reference to Swap_Port_x configuration parameter. How did you determine to set this to 0 when connected to an AB PLC?
I've been using IFM master modules for 3 years with various IO-Link devices (using both the IFM specific device AOIs and also the Generic AOI) and have not changed the value of the Swap_Port_x (which is set to 1 by default).

2) Specific to your code for the PMP23 I see your using both In_Data1 and In_Data2. It also appears that you’re stripping more than just the last two bits of PT_TEMP in your MVM instruction (or am I reading this wrong?).

Also, how would you handle negative pressure values (or is the default Bar unit in absolute pressure then just scale accordingly for gauge pressure?)?

Yes, I agree with your philosophy of doing all configuration changes in the PLC. Besides ... IMO the LRDevice app is a bit kludgy.

Anyway ... thanks a million for your time.

Both fair questions

1) IFM infuriatingly doesn't reference the Swap_Port_x anywhere in their manuals. I have no idea why. This took a call to their tech support team to figure out.

2) Good catch. This is a mistake that I fixed but forgot to update the screenshot. All but the last 2 bits should be 1s.

As for negative gauge pressure, I am not sure. Perhaps bit 29 is a sign? All my applications of IOLink pressure has been positive gauge pressure.
 

Similar Topics

I need to protect some pressure transmitters from hot (120°C) oil. Does anyone have a favorite transmitter cooling element/standoff they use...
Replies
4
Views
149
Hi All, Just wondering what the best/most accepted way to measure tank level off pressure transmitter. Pressure transmitter is located in line...
Replies
6
Views
1,881
I'm trying to wire a Endress+Hauser PMP71 Pressure Transmitter to a Schneider Electric TM3AI2H Analog Input Module. The Pressure Transmitter is...
Replies
7
Views
1,269
Hello Everyone , Hope you all are well and safe sound! I'm looking solution for the pressure transmitter which are installed in Blender or Lpg/...
Replies
8
Views
2,853
Hello, I am fairly new in the field and I am having trouble creating a set point for a pressure transmitter in Studio5000. My question is, how...
Replies
4
Views
2,091
Back
Top Bottom