5/26/2019 12:06 PM | |
Posts: 2 Rating:
|
Hi everyone, I'm working on a solution to store and retrieve some data from a USB stick on a TP700 Comfort Panel. I am working in TIA V15. I save all the data I need to a .csv file, that works fine. I also know how to parse the data to retrieve it. I have, however a question regarding a list of available files that I would like to display. Here's the deal: on the USB stick, there may be, let's say 100 csv files. Before the user loads data from any of them, I would like to give them a nice menu to choose from these 100 files. I know how to scan the USB drive using VBScripts in order to get the names of those files into HMI Tags, so that is fine. However, let's say the user saves one more file onto the drive, and now there are 101 csv files on there, but I only have 100 WString Tags to save their names to (and display to the user). Let's say I wanna display it in a dynamic text list. When a particular screen loads, I run a script, which searches the USB directory for csv files, saves their names into my WString Tags, and those tags are part of my dynamic text list. I have, however, only as many items in the list as I have created tags, and if the number of files on the USB stick exceeds the number of HMI Tags, some will not be displayed. Now, I realise I could brute-force by having some ridiculously large number of HMI Tags available, but I'm looking for a more elegant solution, where I would have, let's say, 15 items in the dynamic text list and those items would change (consider it a sort of rolling window on a long list, where you see only 15 items, but there are some more below and/or above). Is anything like this possible? Let me also mention that I have looked at HMI Toolbox Library, which is awesome and I am currently using a solution similar to their scrolling menu, and it works nicely, but it kind of takes up the whole screen, and I would like to see if it can be done in a dynamic text list. Regards |
Last edited by: Jen_Moderator at: 05/27/2019 12:38:23Optimized link. |
|
Follow us on