Home AMX User Forum NetLinx Studio

Creating a temp .txt file on NetLinx Controller?

Can I create a .txt file from code on the NetLinx Controller? Or at least read & write to one?

I've been given the following commands by Lifesize Room 220 Video Conference Codec:
get directory local -B > localdir.txt
set directory local -o -B < localdir.txt

Now there could be up to 1000 Directory entries, which is a lot of text to store in a variable. But I'm thinking if NetLinx does allow me to write to a text file, I might have to do it from a variable anyway?

Comments

  • PhreaKPhreaK Posts: 966
    All the info you need for file reading and writing is in the NLStudio help file, along with examples. Just be warned though, if the data is mutable the CF may not be the best place to store it, it can only take so many writes before it's borked.

    Unless you're really pushed for memory you shouldn't have any issues just using a 2 dimensional char array. Even with 1000 entries at 32 characters a piece your only looking at just under 32kB.
  • John NagyJohn Nagy Posts: 1,742
    Our product relies on interaction with over 400 files parked on the NetLinx, and about 15 of them are interactive, being written back upon changes in selected behaviors. Some may be written dozens of times a day. We have nearly 200 systems like this in use right now, some running for over 5 years now. We've never yet had a CF card get tired in a NetLinx, although I understand the theory that they could. This is just to say it's pretty clear you can do this a -lot- before there's an issue with the CF.

    We have seen that happen in 8400's many times (not due to us, we don't rewrite there) - losing the ability to store the screen calibration. A new card and they work fine. I wonder if the OS in the panels isn't re-writing it far too often.
Sign In or Register to comment.