HMI Pad Forums Old forum Support (old) Set & Reset in 0ne Botton with two Tags

This topic contains 1 reply, has 1 voice, and was last updated by  John 8 years, 6 months ago. This post has been viewed 795 times

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #19938


      This can be done in your csv with the following code:

      theButton, BOOL, INTERNAL, “style=button; write_access=0;”
      latchValue, BOOL, INTERNAL, “value = if theButton then !latchValue;”
      onlatchValue, BOOL, C0, “value = latchValue;”
      offlatchValue, BOOL, C1, “value = !latchValue ;”

      Alternatively, you can program the latch effect on your PLC tag rows instead of using an intermediate variable:

      onlatchValue, BOOL, C0, “value = if theButton then !onlatchValue;”
      offlatchValue, BOOL, C1, “value = !onlatchValue;”

      Said that, we always recommend to program this kind of things right in your PLC if you are able, then just use a regular button on ScadaMobile. This helps to keep things clean and ultimately leaves all control to the hands of the PLC. At least, you should consider to perform the reversed state of the second bit in your PLC program, instead of letting ScadaMobile to set it. This would be safer against network disconnections and makes sure that the set/reset state changes of both bits are always keep in sync at all times and that they will happen exactly on the same PLC execution cycle.

      SweetWilliam Support.



        I want to use two different tags in one button, My application is for a pressure pump, when I pressed the button once, First tag should be set and the second tag should be reset, and once again when I press the same button, First tag should be reset & the seond tag should be set and the comments should be display on the button, Please give a solution how use code in .cvs file


      Viewing 2 posts - 1 through 2 (of 2 total)

      You must be logged in to reply to this topic.

      Copyright © SweetWilliam, S.L 2009-2013. All rights reserved.
      Science and Technology Park of the University of Girona, Emili Grahit, 91 (NarcĂ­s Monturiol building, Office P3-B03) 17003-Girona. Phone +34972183244