String Entry in L5K

Join Date
Apr 2016
Location
Appleton WI
Posts
30
Hola. I've got a panelview screen built out that pulls strings out of a UDT for comments of the 16 points, so I can see I/O status. I use parameter files to pick out which tag to pull this from. Pretty basic.

What I'm running into is this works fine for five cards or something, but when you have about ten times that in a project, it gets pretty tedious clicking each individual ... box and entering in the string comment over and over and over again.

If I go and export to L5K, I can get the comments to show as you see in my attached snip. The problem you see with the test1, test2, test 3 test, etc, is it fails on import, due to not entering the string length and I assume deleting out each set of $00 to correspond.

Can you think of a better way of doing this? I thought this might work ok, but if I have to sit down and count every character to build the L5K, its probably no more efficient than the manual string entry for each card.

Thanks

snip string entry.PNG
 
1) Create a line like this:


Code:
             1         2         3         4         5   ...

    12345678901234567890123456789012345678901234567890123...
That makes it easier to count the characters before the $00s start.




2) Depending on the environment you work in, a simple script (Python, Javascript, gawk, VB, whatever) could convert raw strings (no $00s; stop drooling;)) to the .L5K format that you paste into your .L5K file, but if that kind of bit banging is not your schtick then it will take as long as anything else, or you pay a bit jockey like me to do it but then you're in the same boat with no net gain. That said, I see you grok the advantage of putting the closing "]" and the leading "," on the next line, so maybe this is your schtick.


Do the $00s extend out to some fixed length? I'd be willing to attempt a quick script for you gratis, if you're interested. As long as it's not VB (just kidding). If you don't have the environment, just attach a file with the raw strings, no lengths, no $00s, just the <prefix1 : prefix2 := [> and then one string per line. e.g.


Code:
SG_blah_blahDesc : IOSCreenDescriptions := [
'string one'
'string two'
'string 3'
...
]



The ticks are optional for strings that do not end with a left square bracket ([).



and I'll see what I can do in an hour; that should be enough, but any more and my lovely wife would have me charge you.


I did this for my brother once for a .L5X file, but it took as long for me to code it as it did him to do it by hand.
 
Last edited:
the string data type has 2 elements the ascii string and LEN
why not read the string length from the plc [LEN]
that give you the length of the string and us it to display the string
 

Similar Topics

Hello, So i managed to read the string coming from control logix and put a string display in PanelView 800. Now I am struggling to do the other...
Replies
1
Views
138
FactoryTalk ME- Using a"String Input Enable" for Password Entry.How can I place X's Good Morning , FactoryTalk View ME ...... I'm...
Replies
2
Views
2,671
Can anyone advise me on how to get a lot of strings from excel to my RsLogix5000 project? I have about 200 alarm message strings already in...
Replies
8
Views
5,552
I am creating a global object in FTView SE 13. I want to have a string read from the PLC and display (in this case the tagname). So lets say...
Replies
4
Views
167
So I had an odd request from a customer for the above. I have written the logic and tested it all in one PLC with only using 7 outputs and 7...
Replies
15
Views
427
Back
Top Bottom