Rockwell Alias - ProSoft Integer array vs Float

dalporto

Lifetime Supporting Member
Join Date
Jun 2021
Location
Montreal, QC
Posts
258
Hi.

I'm using a Modbus ProSoft where I basically map data to a big INT array.


Example, where GX_I_63HPU is a REAL, MNETC.DATA.WriteData[200] an INT of the ProSoft Data Array and "2" is the length (2 x INT = float):

COP GX_I_63HPU MNETC.DATA.WriteData[200] 2


I'm doing that right now because I'm unable to use an Alias of my REAL tag since it will revert to an INT when I put the Alias in.

Do you know any way around that?

Thanks.
 
I don't understand what an Alias has to do with this.

You seem to want to write a REAL (32-bit single-precision floating point) value to the Modbus (Slave?) device, and you have mapped the Rockwell PLC's ProSoft registers MNETC.DATA.WriteData[200] and MNETC.DATA.WriteData[201] to the (Holding?) registers in the Modbus device where that Modbus device "thinks" that REAL should reside. And you are COPying the 32 bits of the PLC's REAL to those two 16-bit ProSoft registers. Once the bits are written to the ProSoft registers, the ProSoft device should handle the transfer to the Modbus device.

Or am I misunderstanding what you are trying to accomplish?
 
The only thing left to do is to confirm the Word (and possibly Byte-within-Word) order of the Modbus device, to ensure the bits transferred will be placed in the correct locations for the Modbus device to interpret those bits as the same floating-point value that originated in GX_I_63HPU on the PLC.

The best way to do that is to read a floating-point value, mapped to a pair of contiguous elements of the the MNETC.DATA.ReadData array of 16-bit INTS, from the Modbus device, where the floating-point value on the Modbus device are known.
 
I have a REAL / Float value in the PLC.

In order to have InTouch reading it in Modbus (throgh the ProSoft), I need to assign it to [200] and [201], this is why I use a COP instead of a MOV.

This works great, but I need to add a rung for the COP when I use a REAL, while I can just use [200] as an Alias to an INT tag.

What I'm wondering is if there is as way to write an Alias for a REAL that would include [200] and [201].
 
I have a REAL / Float value in the PLC.

In order to have InTouch reading it in Modbus (throgh the ProSoft), I need to assign it to [200] and [201], this is why I use a COP instead of a MOV.

This works great, but I need to add a rung for the COP when I use a REAL, while I can just use [200] as an Alias to an INT tag.

What I'm wondering is if there is as way to write an Alias for a REAL that would include [200] and [201].

Ah.

Probably not. An Alias e.g. WD200 for array element MNETC.DATA.WriteData[200] is an alternate name (reference), generally used as a convenience when monitoring or programming. E.g. the programmer can type "WD200" instead of all of "MNETC...[200]" to use the bits at that memory location.

While an Alias can provide an alternate reference (nick-?)name, an Alias does not change the data type i.e. an a Alias for MNETC.DATA.WriteData[200] will be interpreted as an INT (or whatever is the data type of those .WriteData array elements).
 
That's what I thought.

I was wondering if there was a way to trick the syntax so it'd think otherwise.

Thanks.
 
My personal opinion, Aliases are the worst invention that Rockwell ever came up with on the logix platform. Throw them in the garbage and never use them again.
 
My personal opinion, Aliases are the worst invention that Rockwell ever came up with on the logix platform. Throw them in the garbage and never use them again.
Yeah, I agree, I'd prefer to do otherwise. We have them also with SE and I never use them. The difference here is that with Schneider, I have the Modbus address included with the tag. I'd never use an Alias to give a tag another name and mess up with everybody's mind. Last year I went into something worse than aliases, they were using different tags with the same Modbus address, sometimes even hidden into an array, so when a tag was coming high, 1 or 2 others would come high at the same time causing a big pain when trying to do a simple change. Ended up with us ripping that apart and starting over and it was quicker, and really cleaner. Anyway.

Now, I have about 1k tags in each PLC (x3) that needs to be rerouted to an MNETC.DATA.WriteData[XXX].XX (which is a tag that will basically assign a Modbus address to the tag so InTouch can read it), and a tag list (aka SCADA List). The quickest way was to batch import the tags along with the ProSoft Modbus address / INT array, so no other remap to perform afterwards, the addresses are following the tags now. Note that I won't be using MNETC.DATA.WriteData[XXX].XX tags directly in the code to do logic, only the tags in relation with that "address".

Do you have another idea how to do it? Is there any problem I could encounter using the aliases that way?

I'd really prefer not to use them, but I'm sure I don't want to remap each individual tag to an address manually. Maybe a ST section with a remap list, I don't know.
 
I don't understand.

The PLC already has the tag **GX_I_63HPU** with the REAL value you are interested in; it is COPying the bits of that value to the .WriteData array elements 200 and 201, which are only temporary storage enabling the write of that REAL value to the remote Modbus device.

Why do you care what the REAL value is in those .WriteData elements?
 
Why do you care what the REAL value is in those .WriteData elements?

I'm not sure what you're asking me here. I'll start over.

I have, among others, REAL values in the code, that I use for logic to drive sequences and low/high alarms and else. I also need to pass these REAL values to the HMI (InTouch using MBTCP) back and forth, which are floats/REAL/32 bits values.

To do that, I use a MVI56E-MNETC Prosoft Module that only have an adjustable length "system" INT only array, ergo 16 bits, basically Words.

So if I have an INT value to pass to the ProSoft, it's either I do a MOV from that INT tag to let say MNETC.DATA.WriteData[1]. or I can put MNETC.DATA.WriteData[1] as an alias for that tag, both are working. Or even a COP with a length of 1.

With a REAL, I need to use a COP with a length of 2 when writing to that INT array because I want the value to be 32 bits, which will use WriteData[2] and [3], which means that I cannot use MNETC.DATA.WriteData[2] or whichever as an alias to that REAL tag since they would be different types, and if I'd use is as an INT the value wouldn't be right when reaching the HMI.

So, what I was wondering is if there was a way of writing the Prosoft INT-only address scheme to trick LogixDesigner into accepting a range of INT (ex: [2] and [3]) as an alias for a REAL tag.

I'm still not sure if I'm clear.
 
Or maybe there was I mix with what I was asking Robert.

At first I was talking about REAL, and when I answered after Robert I was talking about binaries, this is why I care about the bits there.

MNETC.DATA.WriteData[XXX].0 to [XXX].15 is where I also pass binary data, on the same INT array structure as everything else.
 
Just curious, why are you using modbus to communicate to the InTouch HMI? ABCIP, DASABCIP, or even RSLinx would be much easier over ethernet.
 
I'm not completely clear on the issue or even which side of the Modbus connection needs this, but perhaps you could create a UDT consisting of 2 integers and Alias that instead?
 
Just curious, why are you using modbus to communicate to the InTouch HMI? ABCIP, DASABCIP, or even RSLinx would be much easier over ethernet.

That happen when the customer want to pick the PLC, and he picks a Rockwell PLC because "it's the best" but his whole setup runs in Modbus. Worst setup ever.

They have a remote control center / SCADA (really remote, hundreds of km / miles away) that comes in the Station over Modbus and we're stuck with it. So, even if we can program InTouch using ABCIP, I still need to accommodate for the Control center (commands and setpoints are the main issues if we wanted to use both ABCIP and Modbus). So, instead of doubling the logic in the PLC to accommodate for both ABCIP and Modbus , we ditched ABCIP.

And this is why I have so much question about Rockwell.
 

Similar Topics

I have a PH meter that I am trying to bring its data into 1756-L81. I have downloaded the Rockwell MODBUS AOI kit, but I am not sure if I need to...
Replies
5
Views
164
Hi all. Customer wants analog faceplates really bad, even if we explained that it doesn't make much sense in his process. What he wants to see...
Replies
5
Views
129
Hello, recently I saw a graphic from any Rockwell App, I cant identify which one is. Attached a SS. Its used to see dashboard from datapoints and...
Replies
2
Views
127
I'm working with a project that contains some routines in ST but mostly in ladder. Am I correct in assuming this 'rung': DB1001DO._01AV55_OPEN :=...
Replies
4
Views
114
I noticed in Rockwell AOIs, they add a BOOL Output parameter at the end of the "Parameters" list of each AOI that carries the same name as the...
Replies
1
Views
80
Back
Top Bottom