Check script status + modbus link - Printable Version +- Logic Machine Forum (https://forum.logicmachine.net) +-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1) +--- Forum: Scripting (https://forum.logicmachine.net/forumdisplay.php?fid=8) +--- Thread: Check script status + modbus link (/showthread.php?tid=4383) |
Check script status + modbus link - sx3 - 15.11.2022 Hello, I have understood how to enable and disable scripts. But is it possible per read request determine from a 3rd party visualization if a script is enabled or disbled? What would be the best practice to achive this? As regarding to a earlier post, that I encountered some problem with dropped modbus link - Is it possible to per GA see if modbus link is up or down? This goes for both TCP and RTU connections. RE: Check script status + modbus link - Daniel - 15.11.2022 You can use script.status(name) to get script status. Modbus device has a status object. RE: Check script status + modbus link - sx3 - 15.11.2022 Okey, not able test right now, but... Code: res, strScriptStatus = script.status(name) Will return 0 or 1 to the log depending if it's enabled or disabled? Regarding Modbus, my devices don't have any status object? Or is it withing the profile in LM? Where I set TCP / RTU and assign a profile? RE: Check script status + modbus link - admin - 15.11.2022 script.status returns true/false. Status object is in the device settings (connection type, profile, etc), not in the mapping. RE: Check script status + modbus link - Daniel - 15.11.2022 Here |