WinCC Unified V16: read text file with JavaScript to a string value or add it to a text box

preview_player
Показать описание
In this Video I show you how you can read a text file with JavaScript. In this video I read it to a WString Value or in the object "text box".

#DerHecht #WinCC #Unified #TIAPortal #JavaScript
Рекомендации по теме
Комментарии
Автор

Hi @DerHecht4.0, Thank You.I have some problem how to chane the Directory by let User Open filedialog and select file by yourself? Wait for you Professor

PoomYoosorn
Автор

Hey,
is there a way to read a file path of an image and show it directly on the screen without using web control. Thanks in advance :)

enesyilmaz
Автор

I can't read a file from the HMI Unified, i use the intern memory, the path is /home/industrial/ but not works.

gabrielhern
Автор

HI,
Thank you very much for your videos.
Can we read from a text file line by line?
or how can we detect in the text variable the change of line?

robertocelorrio
Автор

Hello DerHect4.0,

Thank you for all WinCC Unified video, they are very useful to easily understand WinCC Unified functionality.
now I am facing issue to read data from particular cell from csv file and write to the PLC tags.
I have used this video but using this I read all data of csv file but I want take specified data to read and write to PLC address.

Please give solution for that. I am waiting for your answer.

Thank You,
Sunny Siddhapura

sunnysiddhapura
Автор

Hi @DerHecht4.0

Do you know that can i read property of object in script of wincc unified?
for example I have one DynamicSVG (Motor)
for example for "name" from property of DynamicSVG, I typed below code but wasn't correct...

export function DynamicSVG_4_OnTapped(item, x, y, modifiers, trigger) {
let tagValue1= item.Name;
let data = {stop:{Tag:("HH_"+tagValue1)}, start:{Tag:("LL_"+tagValue1)}, ColorProperty:0xff00ff00};
...

alavisin
Автор

Hi @DerHecht4.0,

danke für's Video! Funktioniert alles super so! 🙂
Habe mir damit einen EventLog gebastelt und schreibe da also in eine Text-Datei, wenn bestimmte Handlungen erfüllt sind.

Jeden Tag erstelle ich dabei dann eine neue Log-Datei. Das schreiben in die Log-Datei funktioniert perfekt. Das Lesen funktioniert nur bis zu einer gewissen Grenze. Wenn die zu lesende Text-Datei zu groß wird, dann wird einfach nichts mehr auf das Textfeld bei einem Lesebefehl projeziert, wobei trotzdem weiter in die Datei geschrieben wird und diese dann im Hintergrund gespeichert wird.

Kennst du eine Möglichkeit, im Ausgabefenster auch größere Text-Dateien anzuzeigen? Es schaut so aus, als würden Textdateien über 30kB nicht mehr gelesen werden können...

Danke! 🙂

mcmarci
join shbcf.ru