Schematic child components referenced to PLC modules.

Schematic child components referenced to PLC modules.

pqphillips
Advocate Advocate
5,811 Views
44 Replies
Message 1 of 45

Schematic child components referenced to PLC modules.

pqphillips
Advocate
Advocate

Buckle up, folks, as I have a head-scratcher for you all...

 

I am creating a drawing standard for ACADE, and one of the issues we had with regular CAD drawings was the constant struggle to keep schematics and network communications drawings synced together. Someone would make a change on the schematic and not update the communications drawing to match, or vice-versa.

 

Most of the issues have been resolved in ACADE using parent/child relationships, but there is one particular sticking point that I cannot seem to resolve. That is properly tying the PLC modules on the network comm drawings to the PLC modules in the schematic, and that's due to the inherent differences in the attribute setups for schematic symbols and the PLC/IO modules.

 

The idea is that I want to insert a schematic symbol on the comm drawing, use the PLC module on the schematics as a parent, and pull that information from the PLC to the comm symbol so that if the PLC module gets edited, the comm symbol will update as well.

 

I've tried everything I can think of, including the creation of new attribute templates, but have had no success other than pulling the tag number and RATING12 over (RATING12 is what I am using across the board for IP address). The things that are not transferring are the LINE1 (rack number), LINE2 (slot number), and DESC attributes.

 

I feel like there's something I'm missing here, but I am also at my wit's end with this.

 

Has anyone else tried this with success or know of a way to pull those attributes over?

0 Likes
5,812 Views
44 Replies
Replies (44)
Message 2 of 45

Anonymous
Not applicable

head scratched.

PLC modules are strange beasts.

Looks like PLCs have some serious coding that drives how they work.

 

I tried just making a block with TAG2 (or TAG_1, or TAG_2) without much luck, same issues you describe.

I could not surf the child from the parent, no "addressable points" on the child... hmmmm....

 

I have a plc module installed in my drawing that has two children (broken continuations of the module).

 

I copied one of those, exploded it, changed the TERM designations and the TAGAs to match and to give them dummy addresses (TERM151 TAGA151 default for both T151).

 

Now the child address shows up as something I can surf from the parent.

But retagging does not populate LINE1, LINE2, LINE3, or DESC.

Might be able to use a single PLC point symbol as well. But it has to have an addressable point on it.

 

Now I can export to spreadsheet "PLC header" and then copy those from the parent to that child... viola.

 

Also....

If you can do AutoLISP, or other coding... (.NET, VBA, whatever) you can use the APIs to get at the PLC parents information from the database...

 

Insert child on comm drawing, issue new command you write that updates that child with the information you want from the parent in the database.

You could also write your own update routine that would find all these "children" on the comm drawings and update them all in one shot.

 

 

 

 

 

 

 

0 Likes
Message 3 of 45

pqphillips
Advocate
Advocate

Funny, I was laying in bed last night and had a EUREKA moment (isn't it always the way that the best ideas come at a time when you can do absolutely nothing about it?).

 

"Fields," I thought. "I wonder if I could do it with fields..."

 

So I came into work today, opened up a PLC component block (Hp2w--l.dwg in this case) and added the attributes TAG1, DESC1, DESC2, and DESC3 to the file.

 

I then went into the attribute definition for TAG1 and added a field tied to TAG, using this as a setup:

 

Field Genius Solution.PNG

 

I then repeated the process for DESC1 (tied to LINE1), DESC2 (tied to LINE2) and DESC3 (tied to DESC).

 

After verifying with a PLC insertion of a 1756-EN2T (because it uses the aforementioned Hp2w--l.dwg in its build) that the new attributes are in place and working as intended, I was then able to tie the child component to the PLC module because the PLC module now has a TAG1 attribute that keeps up to date with the PLC.

 

Presto change-o and we are not off to the races!

 

PROBLEM SOLVED!!!!!!!!!!!!

 

*dances a booty-shaking happy dance*

Message 4 of 45

pqphillips
Advocate
Advocate

Okay, I have discovered a new problem with this methodology.

 

While adding the attributes with fields to the PLC module blocks works as intended on insertion, any subsequent move of the PLC module will change the TAG attribute, but the TAG1 attribute with the field set in place will not update to match the new tag number.

 

Furthermore, if you do an Update/Retag without moving the module, the TAG will update to the next number in the sequence (adding an A at the end, in my case).

 

I made sure that FIELDVAL was set to 31. I've done BATTMAN>SYNC, REGEN, and REGENALL, to no avail.

 

Out of curiosity, I did a REFEDIT and selected the PLC module, and I think I found the problem.

 

Even though the displayed value of the TAG attribute is different (PLC04069 in this case), double-clicking on the TAG attribute while in REFEDIT still shows the value as being the original TAG number (PLC04029).

 

Anyone know why this is and, more importantly, how to fix it?

0 Likes
Message 5 of 45

Anonymous
Not applicable

If I remember right you have a parent on dwg1 and a child on dwg2...

the child has "fields" in attributes... those fields can only be populated by things from dwg2...

so changes to dwg1 (or the parent) will not cause an update of any fields on dwg2.

 

I think spreadsheet, or coding, is the only way your gonna get this to do what you want.

PLC child symbols typically do not get line1, line2, or line3, or desc. So ACADE is not setup to populate them, even if they are there.

 

 

 

 

 

 

 

 

 

0 Likes
Message 6 of 45

pqphillips
Advocate
Advocate

@Anonymous wrote:

If I remember right you have a parent on dwg1 and a child on dwg2...

the child has "fields" in attributes... those fields can only be populated by things from dwg2...

so changes to dwg1 (or the parent) will not cause an update of any fields on dwg2.

 

I think spreadsheet, or coding, is the only way your gonna get this to do what you want.

PLC child symbols typically do not get line1, line2, or line3, or desc. So ACADE is not setup to populate them, even if they are there.

 

 

 

 

 

 

 

 

 



No, the fields are strictly within the PLC module, not the schematic child. What I did was to add four attributes to the PLC IO blocks that have the TAG attribute (basically, any block with the letter "L" in the file name... Hp1---l.dwg in the case shown below). These attributes are TAG1, DESC1, DESC2, and DESC3.

 

TAG1 has a field in the value section that ties to the value of TAG. (shown in red below)

DESC1 has a field in the value section that ties to the value of LINE1. (shown in yellow below)

DESC2 has a field in the value section that ties to the value of LINE2. (shown in green below)

DESC3 has a field in the value section that ties to the value of DESC. (shown in blue below)

PLCparent.png

 

 

These field values are solely dependent on the value they are tied to, and when the block is placed and the values filled, the information transfers directly to the TAG1, DESC1, DESC2, and DESC3 attributes, which allows the PLC module to now also serve as a schematic parent to a schematic child without compromising the integrity of how the PLC modules are made.

 

The schematic children are created no differently than any other, and pull that data from the TAG1, DESC1, DESC2, and DESC3 attributes in the PLC module to create the electrical link between them in the same fashion as they would from a schematic parent symbol.

 

When I initially drop a PLC module into a drawing, the system works as intended. TAG, LINE1, LINE2, and DESC are populated properly, and the values properly transfer to TAG1, DESC1, DESC2, and DESC3. Dropping a child component in will properly link the two components together and transfer all the data to TAG2, DESC1, DESC2, and DESC3 on the child.

 

The problem arises when I move the PLC module to another line reference, which forces a change in the TAG attribute. The TAG attribute will update properly, but the TAG1 attribute will not update with the new value automatically, or via any other methodology like REGEN, REGENALL, ATTSYNC, or BATTMAN>SYNC. A manual edit is possible, but that would get rid of the field and defeat the entire purpose.

 

As I discovered, a REFEDIT on the PLC module shows that even though the TAG attribute updated, there is a "default" value that is still the same as the original, pre-move value, and that is where I think the field is drawing its information from, which is why the TAG1 attribute is not updating. Basically, the field is not seeing an update, so it remains the same. I haven't tested it yet, but presumably the DESC1, DESC2, and DESC3 attributes have the same issue.

 

With this particular issue, the initial setup is fine, but changing the information after insertion will not update the children as intended. I could go in and just reinsert the PLC module, but that ALSO defeats the purpose.

 

I'm pounding my head on the desk trying to figure out how to fix this, but I got nothing.

0 Likes
Message 7 of 45

Anonymous
Not applicable

"Update fields" after some change of the PLC, does that work?

 

 

0 Likes
Message 8 of 45

Anonymous
Not applicable

also assure all your attributes do not have default values.

0 Likes
Message 9 of 45

pqphillips
Advocate
Advocate

Okay, UPDATEFIELD doesn't fix it. I already tried that.

 

That's not the problem, because UPDATEFIELD is working exactly as intended. Let me show you.

 

First thing I did was to insert the PLC module at line reference 15518 and input my other information, including the rack number, slot number, and description. This resulted in TAG having a value of "PLC15518", LINE1 having a value of "RACK 1", LINE2 having a value of "SLOT 2", and DESC having a value of "INTERFACE MODULE".

1.png

 

Next I used the Move Component tool to move the module from line 15518 to 15556, changed the rack and slot number to 2 and 6, and changed the DESC to ETHERNET BRIDGE MODULE. As you can see, the attributes updated correctly.

2.png

 

However, when you look at the properties for the device, you can see that even though TAG, LINE1, LINE2, and DESC updated correctly, TAG1, DESC1, DESC2, and DESC3 did not update.

3.png

 

Doing a REFEDIT on the PLC module shows that even though the shown value for TAG is PLC15556, editing the TAG attribute shows that the value is still PLC15518. Because the TAG1 attribute is pulling the value for TAG and the TAG value is actually PLC15518, the TAG1 attribute is pulling the "correct" information and things are getting out of sync.

5.PNG

 

My question is this: How do I get the value of this TAG to update properly when I move the device or edit it?

0 Likes
Message 10 of 45

Anonymous
Not applicable

why is there a default value in the attribute definition?

0 Likes
Message 11 of 45

pqphillips
Advocate
Advocate

@Anonymous wrote:

why is there a default value in the attribute definition?


The default value is automatically added when the block is inserted due to how ACADE does the component tagging. The default value is actually "PLC%S%N" which defines the TAG as "PLC" followed by the sheet number and then the line number. Removing the default value of "PLC%S%N" from the PLC Database Editor still drops a value of "PLC" into the default value when the module is inserted. It HAS to have it for ACADE to process the component properly.

 

0 Likes
Message 12 of 45

Anonymous
Not applicable

Can you post the plc parent block you have created so I can fiddle a little bit?

 

0 Likes
Message 13 of 45

pqphillips
Advocate
Advocate

@Anonymous wrote:

Can you post the plc parent block you have created so I can fiddle a little bit?

 



Sure thing!

 

Keep in mind that this is not a newly-created block, but a modified version of an existing one from the NFPA library.

0 Likes
Message 14 of 45

Anonymous
Not applicable

Ok, you linked them as I thought.

 

I made one for one of our dynamic block inserts in the same manner.

After initial insert NONE of the added/linked attributes update.

 

The TAG1 attribute field points to a specific "object" in the drawing it is created in... once that object is absorbed into a block... the link is broken, I suspect.

 

The fields are setup correctly, they initially update, but not after the block is created.

Probably would have to add the fields AFTER the PLC is created and blocked... but then that just puts us back to editing all inserts every time.

 

export to spreadsheet tool and populate the child that way.

 

do you code?

 

0 Likes
Message 15 of 45

pqphillips
Advocate
Advocate

@Anonymous wrote:

Ok, you linked them as I thought.

 

I made one for one of our dynamic block inserts in the same manner.

After initial insert NONE of the added/linked attributes update.

 

The TAG1 attribute field points to a specific "object" in the drawing it is created in... once that object is absorbed into a block... the link is broken, I suspect.

 

The fields are setup correctly, they initially update, but not after the block is created.

Probably would have to add the fields AFTER the PLC is created and blocked... but then that just puts us back to editing all inserts every time.

 

export to spreadsheet tool and populate the child that way.

 

do you code?

 


Unfortunately no, I do not code. Never learned how.

 

That said, a child linked to it does propogate the information properly, but not if you move the PLC module, so I guess the only non-coding, non-spreadsheet option at this point for moving a PLC module would be to delete the PLC module and insert a new one.

0 Likes
Message 16 of 45

Anonymous
Not applicable

Ok, growth area there.

Get this book and start learning autolisp at least:

https://www.amazon.com/Autolisp-Programming-Principles-Rod-Rawls/dp/1566374170

 

It's an "old" language but ACADE is full of it.

 

post the child block drawing.

I have some spare time it looks like.

I may be able to help you here with some code.

 

 

 

Message 17 of 45

Anonymous
Not applicable
Message 18 of 45

pqphillips
Advocate
Advocate

Thanks for the book suggestions.

 

I don't know how the child component will help, as it was created just like any other child component, but here it is...

0 Likes
Message 19 of 45

Anonymous
Not applicable

Um....that looks a lot like a "panel" footprint to me... with schematic attributes on it....

The block you show of your parent (earlier in thread) is a "true" schematic symbol (symbolic, not a true physical representation).

Schematic PLC units should have "PLCIO" as the first characters of the blockname.

TAG1 is for parents, not children.

It should be "TAG2" on the child.

Footprint symbols can be named anyway you like, but must have P_TAG1 as the TAGNAME attribute.

Children don't normally get the MFG and CAT that is only on the parent.

 

If I rename the block, to have PLCIO as the first part of the name, change TAG1 to TAG2, remove MFG and CAT, and then add an addressable point... it works like a normal PLC child.

 

 

 

 

0 Likes
Message 20 of 45

pqphillips
Advocate
Advocate

@Anonymous wrote:

Um....that looks a lot like a "panel" footprint to me... with schematic attributes on it....

The block you show of your parent (earlier in thread) is a "true" schematic symbol (symbolic, not a true physical representation).

Schematic PLC units should have "PLCIO" as the first characters of the blockname.

TAG1 is for parents, not children.

It should be "TAG2" on the child.

Footprint symbols can be named anyway you like, but must have P_TAG1 as the TAGNAME attribute.

Children don't normally get the MFG and CAT that is only on the parent.

 

If I rename the block, to have PLCIO as the first part of the name, change TAG1 to TAG2, remove MFG and CAT, and then add an addressable point... it works like a normal PLC child.

 

 

 

 


Okay, massive brain flatulence on my part. That was not what I intended to attach. I've attached the proper one to this post.

 

The previous one is a special-case scenario parent used for one specific client.

 

Sorry for the confusion.

0 Likes