Internet PLC Forum

General => Technical support => Topic started by: pstiles on July 15, 2008, 04:12:43 PM

Title: Setting a input equal to a DM value
Post by: pstiles on July 15, 2008, 04:12:43 PM
I have a input labeled Night, and I wold lke to set it equal to a DM vaule  so I can turn it on and off via steeing the value of the Dm via a HMI panel. Can someone show me how to do this?

Thanks,

Paul
Title: Re:Setting a input equal to a DM value
Post by: support on July 15, 2008, 06:11:03 PM
digital input are boolean (ON/OFF) type only. DM is a 16-bit integer. You can't set a boolean type to an integer type.

However, if you use HMI to set a DM value and you want to decide whether to turn ON/OFF an internal relay named "Night", then:

  IF DM[1] = xxx
      SETIO Night
  ELSE
      CLRIO Night
  ENDIF

This would work. You can't really change an input bit for more than a single scan cycle. So it makes sense to SET/CLEAR an internal relay and use the internal relay in the ladder logic to trigger other part of the program.