You will be WRITING to RAM Disk (highly volatile)
Yes, I meant Reading [from uSD and writing] to RAMDrive.
Your UDT block in the PLC is NOT JSON block
If we have a large JSON Array of JSON Objects, then doesn't the FILEread need to put that Array into a memory location to JSONparse? Would this not be a huge string, too large for a typical string memory block? Thats why I'm thinking that FILEread is reading one JSON Object at a time (not the whole Array).
This is a data back-up, as opposed to an image backup. Its possible that the UDT this data normally lives in to be processed by the ladder logic may be [re]structured as the program is further developed. However, much of that data will still be "good". Storing a backup of that data in a key-pair format (JSON Object) will allow me to restore that good data to some future restrucuted UDT that uses the same [or] simlar data fields.
These backups should happen soon after the data in the UDT chages. This may or may not happen often, but will likely normally happen in batches... a few or many individual UDT records will be updated by a human over a few minutes or hours, one record at a time, then not touched for possibly months. I've already got a mechanism in place to track when these changes occur, which I'm using for other reasons. Ideally, the changes are written to uSD immediatly as each UDT record is modifed (this is not a requirement though; we could batch write the changes. Batch writting will require a new mechanism to track changes, thats not a big deal and I know how I would do that).
Restoration will happen in a single batch, very rarely. This is a back-up, which ideally we'll never need. I suppose the data could be modifed on PC then restored, though thats not what I had in mind. The Flash Drive copy is a back-up, in the case the UDT structure is modified and therefore the data is lost (or, maybe the battery on the PLC fails and loses retention, or whatever unexpected thing might happen.)
Right now, I don't foresee any memory shortage issues with the PLC necessating the data be stored in the uSD. If anything, I have scantime issues with processing the UDT data, but thats why I'm thinking the UDTs may need to be restructured in the future.
Sorry for the lack of clarity.