Sign in to follow this  
Followers 0
kumarsaurab92@gmail.com

Siemems Set Reset with singal input

5 posts in this topic

Dear all

I need one help i have one application where 1st time any input comming then one output should be SET.

and when 2nd time same input will come this output should be RESET.

Share this post


Link to post
Share on other sites
On 24.04.2017 at 1:13 PM, kumarsaurab92@gmail.com said:

Dear all

I need one help i have one application where 1st time any input comming then one output should be SET.

and when 2nd time same input will come this output should be RESET.

Hello you need invert bool function? 

 

//invert_bool

FUNCTION FC 25 : VOID
TITLE =
VERSION : 0.1


VAR_INPUT
  input : BOOL ;    //press_input
END_VAR
VAR_OUTPUT
  output : BOOL ;    
END_VAR
VAR_TEMP
  temp1 : BOOL ;    
  temp2 : BOOL ;    
END_VAR
BEGIN
NETWORK
TITLE =

      A     #input; 
      FP    #temp1; 
      =     #temp2; 
      A     #temp2; 
      AN    #output; 
      S     #output; 
      JC    end; 
      A     #temp2; 
      A     #output; 
      R     #output; 
end:  NOP   0; 

END_FUNCTION
//end_invert_bool

 

but it's better to change temp1 and temp2 to some merkers or dbx.

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0