Posts: 238
	Threads: 66
	Joined: May 2018
	
Reputation: 
4
	 
	
	
		Hello.
I'm writing av script to read several values from different GA and comparing all of these values to get the highest of them as an output.
I can structure the GA's so that they come with increment of +1.
Any tips from people who have done this before?
-Regards
	
	
	
	
		
	
 
 
	
	
	
		
	Posts: 8410
	Threads: 45
	Joined: Jun 2015
	
Reputation: 
481
	 
	
	
		Why not use tags? You can get values for all objects with a single function call this way.
	
	
	
	
		
	
 
 
	
	
	
		
	Posts: 238
	Threads: 66
	Joined: May 2018
	
Reputation: 
4
	 
	
	
		Oh, I did not know.
Could you give an example?
Sent fra min SM-G980F via Tapatalk
	
	
	
	
		
	
 
 
	
	
	
		
	Posts: 238
	Threads: 66
	Joined: May 2018
	
Reputation: 
4
	 
	
	
		works perfekt, thank you!
	
	
	
	
		
	
 
 
	
	
	
		
	Posts: 238
	Threads: 66
	Joined: May 2018
	
Reputation: 
4
	 
	
	
		Spinoff on this post.
Here we use tags to calculate the max value. Is there any clever way to disregard a value if a GA is "true"? I want to check if the damper is in faultstate before running the "max"script.
	
	
	
	
		
	
 
 
	
	
	
		
	Posts: 5283
	Threads: 29
	Joined: Aug 2017
	
Reputation: 
237
	 
	
	
	
	
------------------------------
Ctrl+F5
	
		
	
 
 
	
	
	
		
	Posts: 238
	Threads: 66
	Joined: May 2018
	
Reputation: 
4
	 
	
	
		i don't think that will work. There is one fault GA for each damper, and I only want to dismiss the value from that one damper. Is it possible to alter tags on GAs from script?
	
	
	
	
		
	
 
 
	
	
	
		
	Posts: 8410
	Threads: 45
	Joined: Jun 2015
	
Reputation: 
481
	 
	
	
		Do you mean that you want to check another status object before including value in the calculation? In this case you need some addressing rules so you can get status object address for another tagged object.