Storing Variables During Upload
TurnipTruck
Posts: 1,485
Greetings,
Does anyone have a good way of storing variable values while uploading code to a Netlinx system?
In this case I have a residential system in which I have given the client many things that they can preset; lighting levels, TV channels, etc. I would like to find a way to not lose those user values after re-uploading code.
I beleive I once saw a Netlinx system in which there was an AXB-EM working as a data storage device.
Any suggestions?
Thank you.
Does anyone have a good way of storing variable values while uploading code to a Netlinx system?
In this case I have a residential system in which I have given the client many things that they can preset; lighting levels, TV channels, etc. I would like to find a way to not lose those user values after re-uploading code.
I beleive I once saw a Netlinx system in which there was an AXB-EM working as a data storage device.
Any suggestions?
Thank you.
0
Comments
Jeff
Thank you.
Netlinx has a large set of file based I/O operations that allow you to create, open, read, write, append, close, delete, search etc. files that are located on the Master's compact flash file system. Check out the Netlinx help file for more information on FILE_OPEN() which is used to create a new file or open an existing file, FILE_READ() to obtain data from a file, FILE_WRITE() to write data to a file, and FILE_CLOSE() to release the handle for a file. There are versions of the read and write commands designed to operate on lines terminated by CR or CR/LF pairs. Operations to create and search directory hierarchies in the file system are also supported.
You will have to determine the structure of your data that will reside in the file so that your Netlinx program can make sense of it when it is read back in. You can keep separate files for different types of persistent data or you can create a complex structure that organizes all of the persistent data for your program and maintains it all in one file. The structure or organization of the data on the CF is entirely up to you - Netlinx does not impose any restrictions on it (other than limitations on maximum file size which will depend on the specific CF capacity in use of course).