Add soft tag for text in 800xa
We're looking to add a tag that we can historize for our reporting purposes. As far as I can see the string data type will max out at 140 characters. Is there another way to do this that I am just not seeing?
String variables in an AC800M default to 140 characters. You can make them different sizes by declaring the variable as type "string[size]" ( eg string is a 6 character string ) I'm not sure how large strings can be - I guess probably 1024. You should try to keep string sizes as short as possible to save memory.
Note that string support in the AC800M controller is very limited. You should try to avoid using strings in your code completely if possible. It requires a lot of CPU to do any string handling and the OPC server is quite slow to update strings.
if you have a certain amount of possible text strings content, then you can store a text index number in the controller, and store the text strings in the 800xA Aspect System, for presentation, ie kind of text[index]. Normally aspect Property Translations Extended is used.
If you have an IM, Information Manager, you can store the texts in History, Message Logs. To choose if you don't know in advance the text content, eg. an operator note.
Some use General Property aspect, but then more code is needed in the graphic display.
On The AC800M Application Level, you can also use StringToASCIIStruct and ASCIIStructToString function where you can up 4 characters coded as a dint like "AAAA" = 4x 65 = hex 41414141 = dec 1094795585. Is get Recipe texts in my project like this. On of the advantages is that the update rate is 1s. To convert it back to a viewable String in PG2 i use the "AcsiArrayToString" function.