You are not registered yet. Please click here to register!


 
 
plc storereviewsdownloads
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc.
 
Try our online PLC Simulator- FREE.  Click here now to try it.

---------->>>>>Get FREE PLC Programming Tips

New Here? Please read this important info!!!


Go Back   PLCS.net - Interactive Q & A > PLCS.net - Interactive Q & A > LIVE PLC Questions And Answers

PLC training tools sale

Reply
Thread Tools Display Modes
Unread October 9th, 2019, 01:18 PM   #1
DairyBoy
Member
Wales

DairyBoy is offline
 
Join Date: Jun 2007
Location: UK
Posts: 354
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?

Thanks.
  Reply With Quote
Unread October 9th, 2019, 01:40 PM   #2
JesperMP
Lifetime Supporting Member + Moderator
Denmark

JesperMP is offline
 
JesperMP's Avatar
 
Join Date: Feb 2003
Location: Copenhagen.
Posts: 14,002
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.
__________________
Jesper
See my profile interests for Q&A
  Reply With Quote
Unread October 9th, 2019, 01:48 PM   #3
JOLTRON
Lifetime Supporting Member
United States

JOLTRON is offline
 
JOLTRON's Avatar
 
Join Date: Aug 2006
Location: MI
Posts: 673
It is a limitation of TIA V13, as of V14 they allowed you to comment individual elements of arrays.
  Reply With Quote
Unread October 9th, 2019, 01:51 PM   #4
DairyBoy
Member
Wales

DairyBoy is offline
 
Join Date: Jun 2007
Location: UK
Posts: 354
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
Edit: Joltron: I have just ordered V15.1 for anoter reason so it's looking good.
  Reply With Quote
Unread October 9th, 2019, 01:56 PM   #5
JOLTRON
Lifetime Supporting Member
United States

JOLTRON is offline
 
JOLTRON's Avatar
 
Join Date: Aug 2006
Location: MI
Posts: 673
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...
  Reply With Quote
Unread October 9th, 2019, 02:20 PM   #6
DairyBoy
Member
Wales

DairyBoy is offline
 
Join Date: Jun 2007
Location: UK
Posts: 354
Right. Got it. Thank you. That works (I think). I have used the same UDT as the input/output component in the FB. Is that correct?
  Reply With Quote
Unread October 10th, 2019, 04:02 AM   #7
JesperMP
Lifetime Supporting Member + Moderator
Denmark

JesperMP is offline
 
JesperMP's Avatar
 
Join Date: Feb 2003
Location: Copenhagen.
Posts: 14,002
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.
__________________
Jesper
See my profile interests for Q&A
  Reply With Quote
Unread October 10th, 2019, 07:22 AM   #8
JOLTRON
Lifetime Supporting Member
United States

JOLTRON is offline
 
JOLTRON's Avatar
 
Join Date: Aug 2006
Location: MI
Posts: 673
Quote:
Originally Posted by DairyBoy View Post
Right. Got it. Thank you. That works (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.
  Reply With Quote
Unread October 15th, 2019, 12:38 AM   #9
mk42
Member
United States

mk42 is offline
 
Join Date: Jun 2013
Location: MI
Posts: 2,250
Quote:
Originally Posted by JesperMP View Post
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.
  Reply With Quote
Reply
Jump to Live PLC Question and Answer Forum

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Topics
Thread Thread Starter Forum Replies Last Post
Changing Alias Tags for an Online Controller Dryhops LIVE PLC Questions And Answers 4 June 14th, 2018 01:51 PM
FactoryTalk View SE Mike_RH LIVE PLC Questions And Answers 8 May 6th, 2015 06:39 PM
Adding tags to an array in RSLogix 5000 Voltimus LIVE PLC Questions And Answers 11 April 30th, 2015 06:54 AM
Adding comments to MicroLogix Heald33 LIVE PLC Questions And Answers 1 March 27th, 2012 07:27 AM
Adding INT Tags in WinCC Flex 2007 control_logic LIVE PLC Questions And Answers 9 May 11th, 2008 08:51 PM


All times are GMT -5. The time now is 02:53 AM.


.