This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Check script status + modbus link
#1
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.
Reply
#2
You can use script.status(name) to get script status. Modbus device has a status object.
------------------------------
Ctrl+F5
Reply
#3
Okey, not able test right now, but...

Code:
res, strScriptStatus = script.status(name)
log(res)

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?
Reply
#4
script.status returns true/false. Status object is in the device settings (connection type, profile, etc), not in the mapping.
Reply
#5
Here
   
------------------------------
Ctrl+F5
Reply


Forum Jump: