Dynamic Set MSG Path

harmonj

Member
Join Date
Mar 2012
Location
Cedarville, OH
Posts
1
I am trying to use a MSG instruction inside a re-usable AOI. Any suggestions on how to set-up dynamic addressing for the MSG communication path. Slot of ENBT, IP Address, etc..?
 
I'm not sure which of the following you are asking:

You hae an AOI with a MSG inside. The MSG parameters will be set up when the specific instance is created in the logic.

or

You have already created an instance of the AOI and you wish to change MSG parameters in this single instance from one call of this instance to the next. This I have no idea about.
 
You cannot create, in an AOI, a local tag of data-type MESSAGE.

When you want to use a message instruction in an AOI, the Message Control tag must be declared as an In/Out parameter, and therefore its elements cannot be addressed inside the AOI. So dynamically changing the message inside the AOI is a no-go.

A way round this is to have a bunch of message tags pre-configured, (and you can't create an array of MESSAGE tags).

As you call each AOI, you will have to specify which Messaqe tag the AOI will use as a parameter in the AOI instruction.
 
There is a sample code (MMS_046847.zip) on the AB site (search SM2) of an AOI which uses messaging to configure a SM2 module & send / receive PowerFlex drive parameters in multi_drive mode. This AOI does change the addresses of the message instruction to access the drives, so you might want to check the techniques used. This AOI does use 3 messages though.
Paul
 
Well found, pal.

I was mistaken, I'd seen the elements greyed out in the tag monitor window, and assumed wrongly that they were read-only.

Now I realise that I was looking at the parameter and local tag definitions, not actual tags.

So I'll correct what I said...
When you want to use a message instruction in an AOI, the Message Control tag must be declared as an In/Out parameter. However, each instance of the Message control tag can be modified by the AOI code

harmonj, that should do what you want - check out the sample code MMS_046847.zip that pal pointed to.
 

Similar Topics

I have been bashing my head up against this one for a while, so take some pity on me if I wind up coming off as very confused. I have 4 tags...
Replies
8
Views
2,260
Rockwell Tech Support seemed to have hit a wall with this question. Already updated the version to 5.00.13 per their suggestio but am still...
Replies
1
Views
62
Maybe this is just not possible, or maybe I am doing something wrong. Background; I have a data array of over 1500 products. For sorting I...
Replies
6
Views
727
HEllo, still satruggling with the curse WinCC Unified. See attached picture. I just want to change the fill colour from turqoise to grey and then...
Replies
5
Views
408
I need assistance with writing a logic for sending data from a Station PLC using 1 MSG instruction to an AGC PLC in every cycle using a CIP Data...
Replies
2
Views
549
Back
Top Bottom