Posts: 40
	Threads: 11
	Joined: Sep 2021
	
Reputation: 
0
	 
 
	
	
		I want to create a counter for steps so that the shutter will not go up (using only the steps command in the controller), it will only take 7 steps with a value of 1 and 7 with a value of 0. This means that the shutter can only move at angles. Thanks
	
	
	
	
		
	
 
 
	
	
	
		
	Posts: 8422
	Threads: 45
	Joined: Jun 2015
	
Reputation: 
481
	 
 
	
	
		Can you explain in more detail what do you want to achieve? Do you want a specific object value not to exceed a certain limit?
	
	
	
	
		
	
 
 
	
	
	
		
	Posts: 40
	Threads: 11
	Joined: Sep 2021
	
Reputation: 
0
	 
 
	
	
		Hello 
I want a shutter user to not be able to lift it. Just take steps. X steps to open shutter stages. X steps back to close. that the user does not continue to click on steps in the shutter. Best regards
	
	
	
	
		
	
 
 
	
	
	
		
	Posts: 8422
	Threads: 45
	Joined: Jun 2015
	
Reputation: 
481
	 
 
	
	
		Sorry, it still is not very clear what is needed. Do you want to convert binary object (step up/down) to a scale value (0..100%) with some limits on the output value?
	
	
	
	
		
	
 
 
	
	
	
		
	Posts: 40
	Threads: 11
	Joined: Sep 2021
	
Reputation: 
0
	 
 
	
	
		yes  , 7 step  up  7 step down  ( 1bit)
	
	
	
	
		
	
 
 
	
	
	
		
	Posts: 8422
	Threads: 45
	Joined: Jun 2015
	
Reputation: 
481
	 
 
	
	
		You can modify the script as needed. You can put any group address there instead of 0/0/2. Binary object is datatype 01. 1 bit (boolean).
	
	
	
	
		
	
 
 
	
	
	
		
	Posts: 8422
	Threads: 45
	Joined: Jun 2015
	
Reputation: 
481
	 
 
	
	
		+1 / -1 is the step direction. If false is received then current_step = current_step - 1, if true is received then current_step = current_step + 1. Then the current_step value is limited between 0 and 6.