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 - Interactive Q & A > - Interactive Q & A > LIVE PLC Questions And Answers

PLC training tools sale

Thread Tools Display Modes
Old November 15th, 2018, 06:22 PM   #1
Lifetime Supporting Member + Moderator
United States

TheWaterboy is offline
TheWaterboy's Avatar
Join Date: May 2006
Location: State of Denial
Posts: 863
Concat 2 strings into a tagname?

Can I take 2 strings, concatenate them and use that result as a TagName of a Bool or any other element?

I'm creating an AOI for MSG stats and it would be ideal if I could use only the MSG tagname and create the .EN and .DN tagnames within the AOI on the fly.

Seemed possible till I started a few minutes ago but I cant figure our how to assign a bools Tagname to a concatenated string. I might be on the wrong track.

I know the MSG has to be created separately and be controller scoped so I'm only trying to reference an already existing bit.
  Reply With Quote
Old November 15th, 2018, 08:06 PM   #2
Lifetime Supporting Member
United States

OkiePC is offline
OkiePC's Avatar
Join Date: Mar 2005
Location: ENE of Nowhere Oklahoma
Posts: 10,171
I don't know of any way to make a tagname dynamic within the PAC.
It's not all the variables I am most concerned with, it's the undiscovered constants.
  Reply With Quote
Old November 15th, 2018, 08:11 PM   #3
United States

Mispeld is offline
Mispeld's Avatar
Join Date: Feb 2017
Location: VA
Posts: 435
This post was discussed in a recent thread, and could be a method to achieve the desired outcome.
"The greatest enemy of knowledge is not ignorance, it is the illusion of knowledge." -Stephen Hawking
  Reply With Quote
Old November 15th, 2018, 11:12 PM   #4
Ken Roach
Lifetime Supporting Member + Moderator
United States

Ken Roach is offline
Ken Roach's Avatar
Join Date: Apr 2002
Location: Seattle, WA
Posts: 14,614
Please don't.

Please don't.

Please don't.

Don't try to package MSG instructions into an AOI in a system that principally does telemetry.

Don't try to do something obscure and almost-impossible with tag name references instead of arrays.

If you think you need to create a new feature or invent a function that the system doesn't do, step back and look at the problem more carefully. Brute-force logic is very frequently the most easy to write, troubleshoot, and maintain over time.

Last edited by Ken Roach; November 15th, 2018 at 11:14 PM.
  Reply With Quote
Jump to Live PLC Question and Answer Forum


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
Red Lion Crimson 3, Concat 3 strings to make a new one. Edmhydraulics LIVE PLC Questions And Answers 6 April 30th, 2016 02:15 PM
RSLogix 5000 CONCAT instruction question blmccallum LIVE PLC Questions And Answers 3 March 30th, 2012 02:55 AM
Strings WinCC -> S7-400 Jeebs LIVE PLC Questions And Answers 2 June 4th, 2010 09:43 AM
Siemens S7 Strings cjd1965 LIVE PLC Questions And Answers 4 May 11th, 2010 04:23 PM
S7 Strings <CR><LF> pethoek LIVE PLC Questions And Answers 2 April 17th, 2009 02:25 AM

All times are GMT -5. The time now is 04:52 PM.