filmov
tv
How to Write Simple Scripts in SCADA-LTS for Data Point Control

Показать описание
Discover the essential guidelines and examples to effectively script in SCADA-LTS, enabling you to control data points effortlessly.
---
Visit these links for original content and any more details, such as alternate solutions, latest updates/developments on topic, comments, revision history etc. For example, the original title of the Question was: Is there a guidline for Scripting for ScadaLTS?
If anything seems off to you, please feel free to write me at vlogize [AT] gmail [DOT] com.
---
How to Write Simple Scripts in SCADA-LTS for Data Point Control
If you are working with SCADA-LTS, particularly version 2.6.18, you might find yourself needing to send commands from the graphical interface to devices on your network. This post addresses a common inquiry regarding how to script effectively in SCADA-LTS, specifically for writing values to data points like DP_921176.
Understanding the Problem
You have been successfully using SCADA-LTS to collect data through Modbus TCP and BACnet TCP for over a year. However, you now want to take it a step further by sending an action from the graphical view of the application to a specific device. You aim to write the value 3 to the alias for the data point DP_921176 named VU_OG1_Stufe_Local. The challenge arises when your initial attempts using JavaScript yield no result, leading you to seek guidance on the correct scripting syntax.
Progress Overview
You've explored the application's interface, and your progress includes:
Setting up the data source
Designing graphical views
Experimenting with scripting
Despite these efforts, the intended value change has not occurred, prompting your search for a solution.
The Solution: Correct Scripting Syntax
Key Points to Understand
Correct Script Structure: The primary issue you encountered was related to how the script was structured. Here’s the snippet that worked for you:
[[See Video to Reveal this Text or Code Snippet]]
val_2: This variable should reference the data point manager in your setup.
writeDataPoint: This method sends the specified value to the defined data point.
Settable Checkbox: You also discovered the necessity of ticking the "Settable" checkbox in the Data Source settings. This option allows the data point to accept write commands properly. Ensure that this setting is enabled for successful scripting actions.
Context Points: There's some ambiguity around “context points.” While the exact usage may still be unclear, context points generally refer to specific parameters or states about a data point's environment that may influence its behavior or accessibility. It is beneficial to further explore this concept to enhance your scripting capabilities in SCADA-LTS.
Final Steps to Implement
Test Your Script: Always validate your script in a controlled environment before deploying it effectively. Monitor the data point after executing the command to confirm the value has been updated correctly.
Documentation and Resources: While comprehensive documentation may be lacking, consider reaching out to the SCADA-LTS community forums or user groups for additional support and best practices.
Conclusion
Scripting in SCADA-LTS may initially seem challenging, especially when it comes to writing values to data points. However, with the correct syntax and understanding the required settings, you can successfully send commands from the graphical interface to your devices. If you encounter obstacles in the future, don't hesitate to seek assistance, as the user community is a valuable resource for troubleshooting and learning.
By following the steps outlined in this post, you'll be able to harness the full power of SCADA-LTS and enhance your approach to automation and control.
---
Visit these links for original content and any more details, such as alternate solutions, latest updates/developments on topic, comments, revision history etc. For example, the original title of the Question was: Is there a guidline for Scripting for ScadaLTS?
If anything seems off to you, please feel free to write me at vlogize [AT] gmail [DOT] com.
---
How to Write Simple Scripts in SCADA-LTS for Data Point Control
If you are working with SCADA-LTS, particularly version 2.6.18, you might find yourself needing to send commands from the graphical interface to devices on your network. This post addresses a common inquiry regarding how to script effectively in SCADA-LTS, specifically for writing values to data points like DP_921176.
Understanding the Problem
You have been successfully using SCADA-LTS to collect data through Modbus TCP and BACnet TCP for over a year. However, you now want to take it a step further by sending an action from the graphical view of the application to a specific device. You aim to write the value 3 to the alias for the data point DP_921176 named VU_OG1_Stufe_Local. The challenge arises when your initial attempts using JavaScript yield no result, leading you to seek guidance on the correct scripting syntax.
Progress Overview
You've explored the application's interface, and your progress includes:
Setting up the data source
Designing graphical views
Experimenting with scripting
Despite these efforts, the intended value change has not occurred, prompting your search for a solution.
The Solution: Correct Scripting Syntax
Key Points to Understand
Correct Script Structure: The primary issue you encountered was related to how the script was structured. Here’s the snippet that worked for you:
[[See Video to Reveal this Text or Code Snippet]]
val_2: This variable should reference the data point manager in your setup.
writeDataPoint: This method sends the specified value to the defined data point.
Settable Checkbox: You also discovered the necessity of ticking the "Settable" checkbox in the Data Source settings. This option allows the data point to accept write commands properly. Ensure that this setting is enabled for successful scripting actions.
Context Points: There's some ambiguity around “context points.” While the exact usage may still be unclear, context points generally refer to specific parameters or states about a data point's environment that may influence its behavior or accessibility. It is beneficial to further explore this concept to enhance your scripting capabilities in SCADA-LTS.
Final Steps to Implement
Test Your Script: Always validate your script in a controlled environment before deploying it effectively. Monitor the data point after executing the command to confirm the value has been updated correctly.
Documentation and Resources: While comprehensive documentation may be lacking, consider reaching out to the SCADA-LTS community forums or user groups for additional support and best practices.
Conclusion
Scripting in SCADA-LTS may initially seem challenging, especially when it comes to writing values to data points. However, with the correct syntax and understanding the required settings, you can successfully send commands from the graphical interface to your devices. If you encounter obstacles in the future, don't hesitate to seek assistance, as the user community is a valuable resource for troubleshooting and learning.
By following the steps outlined in this post, you'll be able to harness the full power of SCADA-LTS and enhance your approach to automation and control.