plc programing help

Hello iam trying to write a program for my web control that does the following
 
if temp sensor 4 is lower than 40 input 2 will come on and when sensor 4reaches 60 i want input 2 off
then if temp sensor 4 reaches 85 then output 3 turns on and when sensor 4 reaches 78 input 3 is off
 
any examples :
 
robertbennet said:
Hello iam trying to write a program for my web control that does the following
 
if temp sensor 4 is lower than 40 input 2 will come on and when sensor 4reaches 60 i want input 2 off
then if temp sensor 4 reaches 85 then output 3 turns on and when sensor 4 reaches 78 input 3 is off
 
That only makes sense if you mean OUTPUT 2 and 3, not input?
 
Something like this should do it.
 
 
Code:
start
  tstlt T4 400
  set op2 1   ; output 2 on if T4<40.0
 
  tstge T4 600
  set op2 0   ; output 2 off when T4>=60.0
 
  tstge T4 850
  set op3 1  ; output 3 on when T4>=85.0
 
  tstle T4 780
  set op3 0  ; output 3 off when T4<= 78.0
 
end
 
Back
Top