PLCS.net - Interactive Q & A

PLCS.net - Interactive Q & A (http://www.plctalk.net/qanda/index.php)
-   LIVE PLC Questions And Answers (http://www.plctalk.net/qanda/forumdisplay.php?f=2)
-   -   Adding comments to tags in TIAv13p (http://www.plctalk.net/qanda/showthread.php?t=122312)

DairyBoy October 9th, 2019 01:18 PM

Adding comments to tags in TIAv13p
 
I'm using a global DB as the i/o for some FBs (thank you, JesperMP). As I only need six bits for each FB I started with a byte as the input/output format, but the individual bits within the byte cannot be commented. An array of 8 bits is the same. So when I use the DB entry in the program as the address for an XIC for example, instead of showing something like "Valve 1 Open", all I can get is "Interface"."01V1".%X0 which has no useful meaning. Is this a limitation of the TIA or my brain? :embar:

Thanks.

JesperMP October 9th, 2019 01:40 PM

Is there a reason why you want to setup the data as an array of bits ?


Depending on what you want to achieve, it is possible that it can be solved by setting up AT "views"in the declaration part of the FB or FC. An AT view can be used to have different declarations for the same data.

JOLTRON October 9th, 2019 01:48 PM

It is a limitation of TIA V13, as of V14 they allowed you to comment individual elements of arrays.

DairyBoy October 9th, 2019 01:51 PM

JesperMP, re array of bits; no reason other than exploring which format allows commenting of the bits (as a byte wouldn't) without having to use "bare" bits in the DB and therefore 6x the quantity for the privilege of commenting them individually so that they can be seen in the program with a meaningful comment attached. I must be missing something here :huh:
Edit: Joltron: I have just ordered V15.1 for anoter reason so it's looking good.

JOLTRON October 9th, 2019 01:56 PM

Instead of an array of 8 bits you could use a UDT/PDT for the 6 bits you need then have an array of the UDTs.

Or have your "Interface"."01V1" be of the UDT type. Then you pass the UDT arround as needed and your bit 0 would now have the symbolic name of "Interface"."01V1".Open

Or something along those lines, if that is what you are looking for.

I think a UDT would be more clear than an array and you don't need to worry about having a typo in a comment...

DairyBoy October 9th, 2019 02:20 PM

Right. Got it. Thank you. That works :dance: (I think). I have used the same UDT as the input/output component in the FB. Is that correct?

JesperMP October 10th, 2019 04:02 AM

For hardware inputs and outputs (*), and for single-element data, I use 1 variable per pin.
For anything complex I define the data by UDTs.

*: Not to confuse everyone, but it is possible to define UDTs for hardware inputs and outputs. I have never used it.

JOLTRON October 10th, 2019 07:22 AM

Quote:

Originally Posted by DairyBoy (Post 828809)
Right. Got it. Thank you. That works :dance: (I think). I have used the same UDT as the input/output component in the FB. Is that correct?

Yes if you need read and write access to the data you would add it to the interface as an in/out.

Quote:

For hardware inputs and outputs (*), and for single-element data, I use 1 variable per pin.
For anything complex I define the data by UDTs.
I agree for smaller data sets single pins is cleaner and also makes cross reference easier.

Quote:

*: Not to confuse everyone, but it is possible to define UDTs for hardware inputs and outputs. I have never used it.
I have used this a few times, mainly for items like Keyence cameras that have around 60 bytes of inputs when used as a Profinet device.

mk42 October 15th, 2019 12:38 AM

Quote:

Originally Posted by JesperMP (Post 828865)
For hardware inputs and outputs (*), and for single-element data, I use 1 variable per pin.
For anything complex I define the data by UDTs.

*: Not to confuse everyone, but it is possible to define UDTs for hardware inputs and outputs. I have never used it.


I think there was a one service pack window in which you could do this, but Technology Objects for Motion in the 1500's weren't yet a thing. Made understanding drive telegrams way easier.


Now I just trust the TO.


All times are GMT -5. The time now is 10:56 AM.

.