SteveMyres Posted January 12, 2017 Share Posted January 12, 2017 I'm setting values in a few D to A and ASCII Test Device channels, to store in channel form data I'm retrieving from the Internet. All of the channels have History and Persist settings of 10 values. The D to A channels are persisting across sessions as expected, but the ASCII ones are not. Is this as expected? Is there something additional I should be doing? Link to comment Share on other sites More sharing options...
AzeoTech Posted January 12, 2017 Share Posted January 12, 2017 Because of the optimizations required to retrieve large amounts of persist data quickly, persist only works on numeric channels. String channels have variable width per data point so can't really be optimized unless you know the maximum length. You'll have to come up with another way to persist the strings, of which there are many. Probably the easiest is to use file.writeDelim() and file.readDelim() to write/read an array of strings to/from a file. Link to comment Share on other sites More sharing options...
SteveMyres Posted January 12, 2017 Author Share Posted January 12, 2017 There's only one ASCII channel that really needs to persist, and only one value (and that one is user-entered), so I'll probably use a registry variable. Link to comment Share on other sites More sharing options...
AzeoTech Posted January 12, 2017 Share Posted January 12, 2017 Yes, a registry variable would work too. In your case optimization doesn't really matter, but we have to design for situations where it would. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.