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
Old May 4th, 2016, 04:48 AM   #1
ian.smith7
Member
United Kingdom

ian.smith7 is offline
 
Join Date: Aug 2002
Location: UK
Posts: 137
Text from A Parameter file

Hi all
I am hoping to insert text into a text display based on the value of a Place Holder Tag in a parameter file and after trying a few different ways I am having no success.

1. What is the correct way to insert the Place holder tag (#3) into the text object.

2. What is the correct syntax for the Parameter file (ie #3=abcdefg).

I would like to edit the displayed text directly in the parameter file as the new file is created for each new page.
cheers
ian
  Reply With Quote
Old May 4th, 2016, 05:13 AM   #2
ian.smith7
Member
United Kingdom

ian.smith7 is offline
 
Join Date: Aug 2002
Location: UK
Posts: 137
Ok
after looking at this for an hour and getting nowhere I posted this question then found the answer within 5 minutes.
In the text object insert the place holder tag as a literal string using the "Insert variable" button.
In the parameter file I had a space in the #3=abcdefg entry causing a syntax error.
Thanks
ian
  Reply With Quote
Old May 4th, 2016, 05:31 AM   #3
Codeblue
Member
United Kingdom

Codeblue is offline
 
Join Date: Apr 2016
Location: Northern Ireland
Posts: 13
Always the way, ask any you shall figure it out yourself.
  Reply With Quote
Old May 4th, 2016, 06:08 AM   #4
AustralIan
Member
Germany

AustralIan is offline
 
Join Date: Jan 2013
Location: Germany
Posts: 848
What bit of kit are we talking about?
  Reply With Quote
Old May 4th, 2016, 06:44 AM   #5
Diameter157
Member
Belgium

Diameter157 is offline
 
Join Date: Mar 2016
Location: Europe
Posts: 117
Quote:
Originally Posted by Codeblue View Post
Always the way, ask any you shall figure it out yourself.
Rubber duck debugging
Happened to me a few times before as well.
  Reply With Quote
Old May 4th, 2016, 05:54 PM   #6
ASF
Lifetime Supporting Member
Australia

ASF is offline
 
Join Date: Jun 2012
Location: Australia
Posts: 2,891
Quote:
Originally Posted by ian.smith7 View Post
Ok
after looking at this for an hour and getting nowhere I posted this question then found the answer within 5 minutes.
In the text object insert the place holder tag as a literal string using the "Insert variable" button.
In the parameter file I had a space in the #3=abcdefg entry causing a syntax error.
Thanks
ian
I had this same problem not long ago, I got lucky and worked it out just before I hit post

One other gotcha in that though - if you want to put spaces in your string you're going to have a bad time. Quote marks, double quote marks, nothing will save you except using ASCII spaces instead of regular spaces. Google how to create an ASCII space, create one, then copy it and every time you go to hit space, hit Ctrl+V instead. Huge pain, but I made it work
  Reply With Quote
Old February 9th, 2019, 08:18 AM   #7
votecoffee
Member
United States

votecoffee is offline
 
Join Date: Nov 2011
Location: MI
Posts: 16
Alt+32 also inserts an ASCII space
  Reply With Quote
Old March 15th, 2019, 02:02 PM   #8
BAJ
Member
United States

BAJ is offline
 
Join Date: Jan 2006
Location: Maple Grove, MN
Posts: 137
Quote:
Originally Posted by votecoffee View Post
Alt+32 also inserts an ASCII space
Stupid question, how do you enter "Alt+32"? Alt+3+2 does nothing from my keyboard.

Also important to note the OP's solution is for Text objects (which he did state), doesn't work in String display links, took me a bit to realize that as I was trying to do it with a string display link.

Although with the String display links, you can link to Memory (internal) String tags in the HMI Tag database and enter your strings in the "initial value" field, up to 82 char (just like Logix string type).

Last edited by BAJ; March 15th, 2019 at 02:07 PM.
  Reply With Quote
Old March 15th, 2019, 02:11 PM   #9
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,685
Quote:
How do you enter "Alt+32" ?
Really good question ! In my experience, Alt-ASCII codes require a keyboard with a separate 10-key pad; it doesn't work on the top-row number keys.

You press and hold the ALT key, then type the number of the code. The character appears when you release the ALT key.

ALT-3-2 gets you literally a space.

I use this all the time when writing legal citations with the ALT-0167 Section symbol, .
  Reply With Quote
Old March 15th, 2019, 04:33 PM   #10
BAJ
Member
United States

BAJ is offline
 
Join Date: Jan 2006
Location: Maple Grove, MN
Posts: 137
Ah, thanks Ken, very cool.


My laptop has the keypad and it works as you describe.


Unfortunately I can't save my parameter file with the ALT+3+2 space in it, FTVME reports a syntax error. If I put an _ instead, it works. :-\
  Reply With Quote
Old March 15th, 2019, 05:39 PM   #11
Dannyington
Member
United Kingdom

Dannyington is offline
 
Join Date: Dec 2015
Location: UK
Posts: 19
If you need a space in a parameter file, you can also use ALT 0160
  Reply With Quote
Old March 16th, 2019, 09:06 AM   #12
BAJ
Member
United States

BAJ is offline
 
Join Date: Jan 2006
Location: Maple Grove, MN
Posts: 137
Quote:
Originally Posted by Dannyington View Post
If you need a space in a parameter file, you can also use ALT 0160

Cool, thanks! ALT+0+1+6+0 works. Or doesn't cause ME to throw the syntax error.
  Reply With Quote
Old March 17th, 2019, 04:26 PM   #13
ASF
Lifetime Supporting Member
Australia

ASF is offline
 
Join Date: Jun 2012
Location: Australia
Posts: 2,891
I have a "template" FTView project from which I start all my other FTView projects. That project has a parameter file pre-built, with the header comment modified to explain the ASCII space restrictions, including the line
Quote:
The space between these quotation marks is an ASCII space: " "
...so then I can just copy that space to the clipboard and hit Ctrl+V instead of the spacebar when I'm typing. Does it work? Yes. Is it ridiculous that I have to resort to tricks like that in 2019? Yes. Do I curse FTView every time I have to do this, and wish I was developing in Ignition? Absolutely, yes.

FYI, the space in between my quotation marks above is in fact an ASCII space, so for people in the future, if you've come here looking for a way to generate one and none of the other tricks are working for you - copy and paste that one. You're welcome
  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
.cli file vs .mer file BuddyLee303 LIVE PLC Questions And Answers 1 November 29th, 2015 03:48 PM
factory talk : converting MER file to APA aminto89 LIVE PLC Questions And Answers 6 September 19th, 2014 04:25 AM
FactoryTalk View Parameter File Usage pgtownsyou LIVE PLC Questions And Answers 13 August 6th, 2013 03:45 AM
Siemens S7-400, Exporting the online DB values to Excel or text file mailken LIVE PLC Questions And Answers 1 January 11th, 2011 03:54 PM
Reading a Text File From Wonderware nmack LIVE PLC Questions And Answers 3 January 29th, 2009 04:16 PM


All times are GMT -5. The time now is 10:06 PM.


.