davidc10 Posted April 14, 2011 Report Share Posted April 14, 2011 Using VisiLogic 9.0.1 a V570 with O/S 3.3(03) and the V570_SD_card_demo.vlp demo. Each CSV line is 512 bytes, even though the Create Excel Delimited Line block says a NULL terminator is included. I thought the NULL was supposed to limit the length of the write. David Link to comment Share on other sites More sharing options...
Emil Posted April 20, 2011 Report Share Posted April 20, 2011 Hi David, SD card is divided to "chunks" of 512 bytes and each write is to such chunk. If you want to make your log more "memory effective", you can define a vector of 256 MI and then add each new record to this vector. When the vector is filled as close as possible to 509 bytes (the system needs 2-3 bytes for its purposes!) you will copy it as one delimited line to Excel. As each real line has its own <CR><LF>, when opening the file in Excel you will not feel in any way the result of "compressing". If you need more help with performing this idea, let me know. Link to comment Share on other sites More sharing options...
davidc10 Posted April 22, 2011 Author Report Share Posted April 22, 2011 Emil, Thank you for the information - I will try to implement your suggestion. If I need further help I will let you know. Regards, David Link to comment Share on other sites More sharing options...
HexMan Posted June 5, 2018 Report Share Posted June 5, 2018 Hi... I have same problem (V700). This is my NET Actual vector 3000 to 3035 (includes NULL) But I have only 66 bytes... More than 190 bytes per row for nothing! Link to comment Share on other sites More sharing options...
MVP 2023 Joe Tauser Posted June 6, 2018 MVP 2023 Report Share Posted June 6, 2018 15 hours ago, HexMan said: More than 190 bytes per row for nothing! Actually, more like 446 bytes wasted. If you want to be more efficient you can pack more data into your block before you write it. But the 512 bytes per write number is hard coded in the operating system. If you have a 4 GB card, that's something like 7.8 million writes. Does it really matter? How often are you writing the data? Joe T. Link to comment Share on other sites More sharing options...
HexMan Posted June 6, 2018 Report Share Posted June 6, 2018 The problem is, rather, download the file (by RS232) or the treatment in Excel. Effectively it is not a storage issue. One of the solutions can be to generate monthly CSV files, although I have not yet found the way to concatenate a string with a numeric value, export201806, for example. If you have any ideas, I appreciate it. Greetings and thanks again. Link to comment Share on other sites More sharing options...
MVP 2023 Joe Tauser Posted June 6, 2018 MVP 2023 Report Share Posted June 6, 2018 Check out the string tools - Remember that Unitronics stores both numbers and strings in MI registers. If you have the string "export" stored in hex form in MI 3000.. 3002, you can use the Num To ASCII function to covert your numbers to string blocks. If you point the output of the block at MI 3003 you will inherently concatenate it. You can check your work with a little-known feature of Visilogic - the the bottom there is the Memory tab. It can be set up to view strings in real time, although each line is limited to 32 registers. You can concatenate other strings by using the Vector copy block to move them into different locations in a continuous register block. This is low-level compared to other programming languages, but PLCs never were designed to be string manipulators. Just know it can be done. If you post your code with specific questions we can help. Joe T. Link to comment Share on other sites More sharing options...
HexMan Posted June 6, 2018 Report Share Posted June 6, 2018 Concept OK, but... I don´t have "export" stored in MIs, I use "export" in a block, as you can see: I don´t know how I can put "export" in MIs, and them how use these MIs in the "File Name" field. Thinking in the 8 character restriction may be a good idea generare a "20180606" for CSV name. If I put SI33, SI38 and SI38 in consecutive MIs, I can use It? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now