Setting up a MSG in an AOI

pierrer

Member
Join Date
Nov 2018
Location
Quebec
Posts
10
Hi,

I'm currently trying to create an AOI (Add-On Instruction) to process possible faults on some of my equipment. To do so, I need to read the fault codes from my drives using a MSG (MESSAGE instruction) and this is where my problem start.

What I've done so far:

I created an INOUT parameter with a MESSAGE data type.
I created a tag with a MESSAGE data type in my controller scope to be pass as a parameter in my AOI block
I can set up the MSG in my AOI block but not in the AOI (but I do belive it's normal)

Where I block:

I can't figure out how to set up the destination element of the MSG so i can access it in the AOI. Or maybe it is something else i don't know.

I tried to pass the destination element of my MSG as a parameter of my AOI but it didn't seem to work at all.

The way i found to get around this problem is to create a MSG instruction outside of the AOI, send the information in another tag in my controller scope (destination element of the MSG) and then pass this tag as a reference for one of my parameter in my AOI block. Then i would have to do this for each of my drives which i would prefer not to.

Anyone can help me through this or have any useful idea?
 
Last edited:
I've tried this before and I was never able to get it to work. I gave up when I realized that because of the variables that need to be configured in whatever processor it will be setup in and because several of the tags need to be global (I think) it didn't make any sense to create one. You basically will be redoing most of the logic in the process you use it in. What I wound up doing was creating a ladder routine (including tags) and exporting it. I would then import it into the needed processor. You still have to configure the variables but you don't have to re-write the logic or create the tags
 
What I wound up doing was creating a ladder routine (including tags) and exporting it. I would then import it into the needed processor. You still have to configure the variables but you don't have to re-write the logic or create the tags - Firejo

My goal is to put in the same place all the informations needed for each equipment in the plant. This is the reason why i would have like a MSG in my AOI to access the fault code while taking a rung out of the programmation.


Using a message instruction in an AOI was discussed in this recent thread, with a link to an AB Technote on the topic in post #5. - Mispeld

Thanks for the link but i had already read through the topic and there wasn't much information regarding my situation or even helping to set up the MSG instruction within an AOI.

The second link leading to the rockwell page doesn't help me neither because it uses a messages to reset an equipment. This type of message doesn't need any destination element to work so i can understand how it works.

However, with a read message you need a destination element for your MSG and this is the part where i have a problem to understand how the destination element gets pass to the AOI.
 
only way to do it in AOI is with an In/Out parameter. - BruceJW

I did put the MESSAGE parameter as an IN/OUT. My problem is mainly the usage of the destination element of the MSG. If i'm right, when you use a MSG instruction to read a parameter you put the value you read with the message in another tag (destination element) and then use this tag to execute whatever action you want.

With the AOI, when you set up the MSG in the AOI block, you have to choose a destination element that you need to put in the controller scope and not the AOI scope. So to have access to it in the AOI you need to pass the tag (destination element) as a parameter of the AOI.

What I want is to use the information read by the MSG in the AOI without having to create an MSG instruction outside of the AOI. So I suppose that my problem is to set up correctly the MSG instruction in the AOI block in a way that the tag can be use by the AOI.
 
Hi,
I can't figure out how to set up the destination element of the MSG so i can access it in the AOI. Or maybe it is something else i don't know.

Don't bother trying to set up the destination in the DEFINITION of the AOI, but only in each individual INSTANCE of the AOIs.

You will need to have a unique MESSAGE type tag for each drive you want to connect to, as the source and destination information are stored in the MESSAGE tag, not in the AOI.

Once you've created an instance of each AOI, RIGHT-click on the AOI block, and select "Open Instruction Logic". If you notice, all the AOI code will be grayed out. That's because you are in the instance, not the definition, of the code.

Go to you MSG instruction now, click on the "[...]" bar, and you'll be configuring the source / destination for that instance.

Once inside the instance, you can change instances by using the pull-down "Data Context" menu to select a different instance.

In theory, opening up the logic of the AOI and selecting the proper "Data Context" should work, but I've seen it too often where Logix doesn't include that pull-down when just editing the base AOI. Not consistent, and maybe Rockwell has fixed the bug in your version.

HTH
 
Don't bother trying to set up the destination in the DEFINITION of the AOI, but only in each individual INSTANCE of the AOIs.

You will need to have a unique MESSAGE type tag for each drive you want to connect to, as the source and destination information are stored in the MESSAGE tag, not in the AOI.

Once you've created an instance of each AOI, RIGHT-click on the AOI block, and select "Open Instruction Logic". If you notice, all the AOI code will be grayed out. That's because you are in the instance, not the definition, of the code.

Go to you MSG instruction now, click on the "[...]" bar, and you'll be configuring the source / destination for that instance.

Once inside the instance, you can change instances by using the pull-down "Data Context" menu to select a different instance.

In theory, opening up the logic of the AOI and selecting the proper "Data Context" should work, but I've seen it too often where Logix doesn't include that pull-down when just editing the base AOI. Not consistent, and maybe Rockwell has fixed the bug in your version.
- Aardwizz

Thanks a lot this is exactly what I was looking for. Your description of the procedure is spot on and well explained. I don't know if all the other post I read explained the same thing and that my english is bad as it gets but i really belive you are the man.

Thanks again
 

Similar Topics

hi , I need to sorry for my bad English first. I'm newbie at plc programming ,I had been asked about E/IP protocol information for some system...
Replies
3
Views
372
I recently had to change the way my MSG instructions were connecting via ethernet radios; I originally had the remote PLCs in the I/O of the...
Replies
2
Views
1,997
Good morning fellow sea captains and wizards, I am being asked to do the above and obtain 4 values from each slave, I know about the MRX and MWX...
Replies
20
Views
188
SELECTED NEW FILE SELECTED PROCESSOR TYPE SELECTED I/O CONFIGURATIONS IM UNABLE TO CONFIGURE MY I/O’S. I HAVE A PAPER COPY OF A PROGRAM AND I...
Replies
0
Views
71
Does Rockwell still offer reset codes for old school Master Disk floppy's? In a bind and need to reset the activation disk soon and to be pointed...
Replies
9
Views
228
Back
Top Bottom