HMI Pad Forums Old forum Support (old) 2 Tags at 1 line?

This topic contains 3 replies, has 2 voices, and was last updated by  BigBosch 8 years, 4 months ago. This post has been viewed 824 times

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #19968

    BigBosch
    Participant

      I want to set a time that some has to start. I need to set the Hours and the Minutes. Now I use the following code:

      //

      HrStart ,DINT,Beregening[0].HrStart, “page=”"Tuin”"; section=”"Start beregenen:”"; label=”" “”; comment=”"Uur dat de beregening start”"; write_access=0 ; format=”"d”"; bounds={0,23} ; style=”"bezel”";”

      MinStart ,DINT,Beregening[0].MinStart, “page=”"Tuin”"; Section=”"Start beregenen:”"; label=”" “”; comment=”"Min. dat de beregening start”"; write_access=0 ; format=”"d”"; bounds={0,59} ; style=”"bezel”";”

      //
      This code works fine but takes 2 lines at my screen. Is it possible to get them both at 1 line?
      So I get something like this on my screen:

      Time installation will start: “Hr” : “Min”

      Regards,
      Loek

      #19969

      John
      Keymaster

        You can combine the two tags in any way using a INTERNAL STRING tag and display the two values in a single row. The ‘format’ function allows you to do so in quite flexible ways. Please refer to the sections covering strings and string functions in the manual and have a look at the examples in the ‘aphorism.one’ example file.

        Thanks,
        Sweetwilliamsl Support

        #19970

        BigBosch
        Participant

          John,

          your answer is absolute clear, but maybe my question isn’t…

          With your answer I’m able to show 2 tags at 1 line. But what I want is put 2 input fields next to each other.
          In the next example I want to be able to set the Hours and the minutes:

          //
          Time to start installation: “Hr” : “Min”
          //

          Loek

          #19971

          John
          Keymaster

            It is not possible to place two input fields on the same row, but you can let your users enter a string including the colon ‘:’ on a writable INTERNAL STRING tag and then split that string into hours and minutes for your use. This approach requires users to type the colon between hours and minutes (for example 2:45), but it may still work for your needs.

            If you have not done already, please look at the Advanced Expressions Examples section of the manual for some code that could help you to achieve that. Look also at the “Example 1″ page of the Aphorism-ONE file. On that example a time string containing colons is converted to total seconds by extracting hours, minutes and seconds

            Let me know in case I can help you further.

          Viewing 4 posts - 1 through 4 (of 4 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