FORUM CTRLX AUTOMATION
ctrlX World Partner Apps for ctrlX AUTOMATION
Dear Community User! We are updating our platform to a new
system.
Read more: Important
information on the platform change.
10-01-2024 01:01 AM
Hello
Is possible you can recomend an example to read drive parameters (S and P) using iq-select-box or another way to read a list parameter from drive to show in web panel.
Thank you
Solved! Go to Solution.
10-01-2024 07:52 AM
Can you please elaborate on what "drive parameters" are?
10-02-2024 09:30 AM
When I understand your question correct, it includes 2 different tasks:
1. Read drive parameters
I'm not really familiar with the drives, especially there are different fieldbuses for the drives, which means that retrieving the drive data is dependent on the fieldbus, but my expectation is there are 2 ways:
- Read the drive parameters in the PLC program and provide that information to WebIQ
- Check if the drive parameters are available on the data layer, than you can use the ctrlX REST API to read the information from there.
2. Display a list in WebIQ
- There is an example somewhere on the SmartHMI webPage.
10-02-2024 09:42 AM
Regarding 2: the scripting demo includes an example: https://demo.smart-hmi.com/scripting-demo/
10-04-2024 01:33 AM
Hello
thank you for information, I am following this example, is possible you can suggest me, how to progam scrip to read and write variables from OPC-UA
10-04-2024 08:08 AM
As I wrote above this is included in the scripting demo. Please familiarize yourself with it. You can download it directly from inside WebIQ Designer and look at the very well documented source code in Code Manager.
10-04-2024 07:49 PM
I am study https://demo.smart-hmi.com/scripting-demo/ but I can not clearly understand how to read and write variables from opc ua, is possible you can help me to make a scrip program to read and write booleans variables from OPC-UA
10-07-2024 08:08 AM
You have to load the project into WebIQ Designer, then open Code Manager and have a look at the scripts. These scripts are very well documented:
https://demo.smart-hmi.com/scripting-demo/js/custom-libs/local-scripts/demo-item-subscribe.js
https://demo.smart-hmi.com/scripting-demo/js/custom-libs/ui-actions/demo-item-readdirect.js
https://demo.smart-hmi.com/scripting-demo/js/custom-libs/ui-actions/demo-item-writedirect.js
If you do not know JavaScript there is a lot of information available online to cover the basics.