2/10/2017 11:57 AM | |
Joined: 2/11/2016 Last visit: 5/5/2022 Posts: 8 Rating:
|
Hello community, I'm playing with idea of trying WinCC VBscripts and I'm trying to write, read and find lines in text file. By searching on these forums, I found manuals how to create txt/csv file and write data from HMI tags to those file. I also found how to read last line and tried implement it. I succesfully test it out. Now I have problem with search whole text file and write found strings into HMI tags. I found some VBscript's properties needed for this to happen, wrote it down into the script and test it but alarm log is saying those does not exist. I'm starting with VBscript, so please, yell at me for any mistakes, errors. I really have no idea how to move from this. I'm using: -Tia portal v13/WinCC comfort/advanced -TP900 Comfort(13.0.1.0) Here is whole test script:
Thank you for any help and please excuse my bad english. Jilikan Update:Can I somehow read line by line by loop and checking lines with expresion i=i+1? I know for reading last line is loop while fo. EOF(or BOF for first) and parameter=fo.LineInputString but I tested it and can't make it work with function if.... Anyway now I'm trying to built that from Read and write scripts from here:How do you write data to a file or read data from a file by means of a script on a panel with SIMATIC WinCC (TIA Portal)? Update2:Added info about Tia portal and hmi I wish you nice weekend, I will try to build it from those... |
Last edited by: Jilikan at: 2/10/2017 3:26:09 PMLast edited by: Jilikan at: 2/13/2017 2:45:39 PM |
|
2/16/2018 9:41 AM | |
Joined: 6/19/2017 Last visit: 9/6/2024 Posts: 8175 Rating:
|
New question published by Vinu100389 is split to a separate thread with the subject read the txt file content as per enter value in HMI internal tag. Best regards |
Follow us on