Individual Register Mapped to an Array Element

marquese

Member
Join Date
Mar 2018
Location
Tennessee
Posts
9
I have 23 Micrologix 1400s and I want to take the same register, N100:99, out of each one and put in a single array in a CompactLogix L18ER. From what I have tried, it only seems like I can only map a range of integers, N100:77-N100:100, to the array and not an individual register to a particular element. (For example, mapping N100:99 from machine 16 to Selected_Model[15]) Can you map to individual elements in an array? If so, are there any instructions on how to do so? Thank you in advance for reading my post!
 
Surely the simplest answer is just to use a move? (MOV #16.N100.99 Selected[15] ( substituting #16 with the data source tag..)


I thought the MOV instruction only worked when the information was in the same PLC. Is there a way to use the MOV instruction without mapping the Micrologix 1400 in the CompactLogix?
 
You are correct that the PLC/SLC Data Table Map feature only maps a Tag to a Data Table number. The tag offset will always be equal to the data table offset, like MySLCData mapped to Data Table 7 makes MySLCData[10] = N7:10.

Are the MSG instructions that transfer that data in the MicroLogix controllers, or in the CompactLogix ?

Either way, the simple solution is the correct one: each MSG instruction will have the desired offset as the destination address.

I could be mis-understanding how the data is getting around (is there a gateway or 3rd party device ?), so please add context if you can.

(And welcome to the PLCTalk forum community !)
 
I should have inserted as the second paragraph:

The "Map PLC/SLC Data Tables" feature in the ControlLogix/CompactLogix is only necessary if the MSG instructions that transfer the data are in the MicroLogix.

The MicroLogix operating system doesn't know about ControlLogix Tag Names. If you use a MSG instruction in the MicroLogix to transmit one or more Data Table registers to a ControlLogix, the destination controller needs to use that Data Table/Tag map feature to emulate an SLC-500/MicroLogix data table.

If the MicroLogix are sending data to the CompactLogix, you can send it to the desired offset in the emulated data table, or create a separate data table / tag map for each of the MicroLogix to send their data to.
 
You are correct that the PLC/SLC Data Table Map feature only maps a Tag to a Data Table number. The tag offset will always be equal to the data table offset, like MySLCData mapped to Data Table 7 makes MySLCData[10] = N7:10.

Are the MSG instructions that transfer that data in the MicroLogix controllers, or in the CompactLogix ?

Either way, the simple solution is the correct one: each MSG instruction will have the desired offset as the destination address.

I could be mis-understanding how the data is getting around (is there a gateway or 3rd party device ?), so please add context if you can.

(And welcome to the PLCTalk forum community !)

Everything, at the moment, originates from the Micrologix 1400s. So all of them have message commands sending information to the CompactLogix. No gateways, just the two devices and an unmanaged NTron ethernet switch. The devices will be moving to a more congested network at the beginning of the year. So I am only trying to send data when the model changes. I do not know how congested the network will be but I am leary of having the CompactLogix constantly polling for information.

When I try to map to a particular element in the array, I get an error. I also get it when I choose the element from the drop down menu.

Thank you for the welcome! Hopefully I can contribute to the topics I am knowledgeable about.
 
Last edited:
I wonder if each MicroLogix "knows" its number (0 to 22), and could send two INTs, i.e. its number along with the value, and all MicroLogix deliver those values to the same two-element INT array, and on every scan the code in the CompactLogix copies (COP/CPS, I think) the value to the destination array at the indirect address of the number that came with the value. Or maybe there is the equivalent of a callback in the CompactLogix that could be triggered at the end of each transfer.

The problem I see there is that there could be two MicroLogix that write those values during the same scan, so the first would be overwritten.

Caveat: I am not sure I understand the actual problem, and I certainly don't know much about the actual transfer (socket, produce/consume, etc.).
 
Maybe I don't see the problem here. There's no reason to do anything exotic or unusual.

In the CompactLogix, assign an array of at least 26 INT elements to a data table number, like Data Table 10 = MLX_Data, where MLX_Data is an integer array tag of type INT[26] (or larger).

Each MicroLogix sends two Integers: the value from N100:99, and a "transaction ID" that increments by 1 every time (and rolls over at 32767). It will have to store them in a two-word buffer somewhere in one of its data table files, which will be the source address (length 2) for the MSG.

The destination address used by each MicroLogix MSG instruction will be different:

MicroLogix #1 sends to N10:0-1
MicroLogix #2 sends to N10:2-3
MicroLogix #3 sends to N10:4-5

and so on.

That gives the CompactLogix a way to tell that new data is coming from each MicroLogix, and a way to tell which MicroLogix it came from.
 
Last edited:
I will be in front of Studio 5000 in about an hour and half.I will send a screen capture of the error I receive when I try to map directly to an element in the array.
 

Similar Topics

Hello, Its my first time working a project that involves PLCs. I need to develop a way to track parts with serial numbers that are passing through...
Replies
13
Views
5,286
Hi I am being given several fault words (as a DINT) from a Drive that I am receiving into a Compactlogix L33ER controller. I have a small...
Replies
12
Views
1,146
I am passing DINTs between a Micro800 and CompactLogix - each bit in the DINT has its own unique meaning. On the Studio5000 side I can just write...
Replies
3
Views
1,109
Hello, is there any way to address individual bits in ReadTag/WriteTag? I am using PV800 with L33 processor so I have almost reached the 400 tag...
Replies
0
Views
668
In my current place of work, some of our lines have a lot of E-Stops and safety devices scattered around and if one of them acts up or we have a...
Replies
7
Views
2,331
Back
Top Bottom