7/13/2024 7:58 AM | |
Joined: 6/28/2024 Last visit: 9/5/2024 Posts: 3 Rating: (0) |
Hi everyone, I'm having issue in converting the VBscript from my previous Comfort HMI project to the HMI script that will be used in WinCC Unified. The script that worked in "Comfort" is not working in WinCC Unified. FYI, the JS script used in the WinCC Unified are the script I converted from the VBscript (attached in zip) with reference to the script converted using ChatGPT. The JS script used have no syntax error and I'm confused where did I go wrong or miss. Hoping to get help from everyone. Thanks. With Regards. AttachmentVBscript to Unified.zip (65 Downloads) |
7/15/2024 5:34 AM | |
Joined: 1/21/2013 Last visit: 9/12/2024 Posts: 3093 Rating: (483)
|
Hi MZulDTM, Based on Murof's post (7/18/2024 11:02 AM), I had to correct my answer. The syntax is wrong! I missed that. From the screenshots, your script looks fine. So some more knowledge about the behavior of your script would be required. Have you tried testing the script in simulation and using the Google Chrome debugger? You can find more information about debugging in the manual or the FAQ. Kind regards |
Last edited by: Stefan Arcularius at: 07/18/2024 12:38:53Correction based on Murof's post |
|
7/18/2024 11:02 AM | |
Joined: 8/3/2009 Last visit: 9/12/2024 Posts: 13656 Rating: (1725)
|
Hello MZulDTM The syntax in the screenshot makes no sence I think you should have a look at the basic funktions of Javascript in WInCC Unified like reading or writing WinCC Tags. This is a good starting point: https://support.industry.siemens.com/cs/de/en/view/109758536 for example setting the value of a Tag makes no sense if you do not make a tag reference first on a internal variable. If you want to use it in an inline command then you have to use the write method of the Tag Object like in the first lines. (I not against AI but in this situation: I think converting the Script by your own and learning the usage of Javascript in WInCC Unified makes more sence than using AI for generating something you cannot understand or debug properly, if you work with Unified in the future you will need scripting a lot ) Bye Murof |
Last edited by: Murof at: 07/18/2024 11:03:55If this Information really helps, you could use the Rate function |
|
This contribution was helpful to1 thankful Users |
Follow us on