Text from A Parameter file

ian.smith7

Member
Join Date
Aug 2002
Location
UK
Posts
145
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
 
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
 
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 ;)
 
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:
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, §.
 
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. :-\
 
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
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 🍻
 
Alt 0160 is handy for tricking FTView and letting the parameter file save. I use it a lot for literal strings for text display. But if you're using it to create a null parameter, ie just the space, you can get funny behavior. It will show as "{}" instead of " ". AB definitely didn't account for it in their programming, so user beware.
 

Similar Topics

I'm having issues inserting a 'variable' into a global object item. In the "GLobal Object Parameter Definitions" window, I have #2 | Label One...
Replies
4
Views
9,120
I tried the click plus PLC to send emails today but could not get it to work over my network. I need a mass alert when a temperature reaches a...
Replies
2
Views
49
can the slc500 5/05 send a email and text over Ethernet ?
Replies
3
Views
147
Good morning. I'm doing a rehab and I need to recycle some part of the old code that won't change and that I need. This is a calculation that...
Replies
22
Views
1,163
I'm writing some structured text that's handling a data structure that comes from a PC. The PC structure is in the "new" LREAL 64-bit floating...
Replies
3
Views
437
Back
Top Bottom