Author Topic: Setting a input equal to a DM value  (Read 5761 times)

pstiles

  • Newbie
  • Posts: 12
    • View Profile
Setting a input equal to a DM value
« 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

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3171
    • View Profile
    • Internet Programmable PLCs
Re:Setting a input equal to a DM value
« Reply #1 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.
Email: support@triplc.com
Tel: 1-877-TRI-PLCS