widget template - Printable Version +- Logic Machine Forum (https://forum.logicmachine.net) +-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1) +--- Forum: Visualization (https://forum.logicmachine.net/forumdisplay.php?fid=9) +--- Thread: widget template (/showthread.php?tid=2717) |
widget template - Frank68 - 10.07.2020 Hi I'm trying to use widgets, and I find it particularly reductive to have to create a widget for each shutter, since the connection to the object is given in the widget, there is a way to pass the parameters not inside the widget but to its use. I attach an example image Tank's RE: widget template - admin - 10.07.2020 Does your shutter actuator support 4-bit objects? If so you can just use 4-bit control which has +/- buttons for control via press and hold. RE: widget template - Frank68 - 10.07.2020 (10.07.2020, 06:44)admin Wrote: Does your shutter actuator support 4-bit objects? If so you can just use 4-bit control which has +/- buttons for control via press and hold.My problem I have 3 different bit up/down/stop and 1 bit for status open/close some idea ? RE: widget template - admin - 10.07.2020 You can create a script to convert 4-bit to 1-bit. In visualization object select 4-bit as Main object and 1-bit as Status object. This way the icon will show the status. Script to determine 4-bit action (stop/up/down). Change 1-bit addresses and values as needed. Code: value = tonumber(event.datahex, 16) RE: widget template - Frank68 - 10.07.2020 (10.07.2020, 08:35)admin Wrote: You can create a script to convert 4-bit to 1-bit. In visualization object select 4-bit as Main object and 1-bit as Status object. This way the icon will show the status.Hi but in this way need to create more script , i have more shutter and more windows , best solution is a tempplate widget , where is possible to connecto directly at the right address . If it's possible I prefer not write more script. Thank's RE: widget template - Daniel - 10.07.2020 Hi There is no such thing what you are looking for. Some users created a scripts with direct database write where they shifted groups of a template page. This will work only if you have certain pattern of object creation. Here is an example https://forum.logicmachine.net/showthread.php?tid=1249&pid=7450#pid7450 Not sure what for but I wrote some script to shift visu objects based on selected shift. It may be useful to you. Code: planID = 8 --plan number shown after # in quisk visu preview http://URL/scada-vis/#6 Always make a backup before using any of this scripts. BR |