Home AMX User Forum AMX Technical Discussion

Saving data from controller to SD card

hi.
I am new programmer with netlinx.
I want to save timers on sd card.
How can i do that please? and how can i read the data after that from the card?
thanks
Lior Peled

Comments

  • JasonSJasonS Posts: 229
    Take a look at the "FILE_OPEN", "FILE_WRITE", and "FILE_READ" keywords. It is actually not to difficult. ANother thing to look at is "VARIABLE_TO_STRING" and "STRING _TO_VARIABLE" which are really useful for quickly saving and restoring the state of a variable to/from disk, these are generally used with STRUCTURE variables. Read over the documentation and see if it makes sense, write some test code. I will be happy to help you get it working.
  • DHawthorneDHawthorne Posts: 4,584
    For what it's worth, I usually save any persistent data to the SD card rather than relying on the PERSISTENT keyword. There are times it just fails for reasons I have never been able to nail down and I got tired of the panicked calls about how the client just lost all his favorite stations, or he can't get a picture on his net cameras ...
  • nickmnickm Posts: 152
    DHawthorne wrote: »
    For what it's worth, I usually save any persistent data to the SD card rather than relying on the PERSISTENT keyword. There are times it just fails for reasons I have never been able to nail down and I got tired of the panicked calls about how the client just lost all his favorite stations, or he can't get a picture on his net cameras ...

    And if the processor goes down for whatever reason, you can transfer your code, and the files to a new processor without losing any data.
  • JasonSJasonS Posts: 229
    And you can't use persistent variables inside a module.
Sign In or Register to comment.