Ankündigung

Einklappen
Keine Ankündigung bisher.

HS Visu: variable text display

Einklappen
X
 
  • Filter
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge

    HS Visu: variable text display

    Hi,

    I'm using a dynamic text which is controlled by a variable (IconIndex with values 1-12).
    This works fine, but the output text is sometimes too big to fit in the right place. i.e 1=text 2=long text 3=much longer text 6=really very long text

    So I would like to use the "Text in Zeilen module" to cut the sentence into single words for proper display, but don't know how to set-up the stuff
    So my question is: how can I capture the content of the sentence pointed to by IconIndex and fit it into "Text in Zeilen" ?

    Maybe write a logic module that translates the numeric value into the corresponding text, and fit the ouput into "Text in Zeilen".

    Maybe a better idea ? maybe such a module exists already ?

    Thanks
    Raymond

    #2
    Hi Raymond,

    i´m realy not an expert, more an bloody amateur, but i´ve seen some days ago an Logik-modul with an scrolling Text-function.

    Could be the right solution for you...
    i can not found the download-link.... please send me an PN with you mail-addy, and you will receive an hsl-file...


    c ya
    Mirko
    Gruß
    Mirko

    Kommentar


      #3
      It is possible to use BEFEHLE to set a word, like your small text on an 14Byte variable.
      after that use a VERGLEICHER to set the different texts on one 14Byte Variable. After that you can use die logicmodul TEXT-ABSCHNEIDEN (weich) and put the output on diftet 14Byte´s (E.g. First Line, Second Line, etc) If the text is now longer then the WEICHABSCHNEIDEN- length the rest of the text is written to second output.
      First Line is now your firs line you have to place as first shown linie in your Visu
      Gruß Christian

      Kommentar


        #4
        Zitat von ChristianB Beitrag anzeigen
        It is possible to use BEFEHLE to set a word, like your small text on an 14Byte variable......
        Thank you very much for the clever trick.
        I'll try it asap.

        Raymond

        Kommentar


          #5
          Zitat von ChristianB Beitrag anzeigen
          It is possible to use BEFEHLE to set a word, like your small text on an 14Byte variable.
          Hi Christian,
          Sorry to be a pain, but I'm unable to start.
          Suppose I've a numeric variable (which I get from evaluation of a web site). This variable is used as an index to acces some text.
          What would be the first step in the chain ?

          Thank you for your patience with a HS newbie.

          PS: to make the matter even worse, my Experte is in....english

          Kommentar


            #6
            Zitat von Warichet Beitrag anzeigen
            Hi,

            I'm using a dynamic text which is controlled by a variable (IconIndex with values 1-12).
            This works fine, but the output text is sometimes too big to fit in the right place. i.e 1=text 2=long text 3=much longer text 6=really very long text

            So I would like to use the "Text in Zeilen module" to cut the sentence into single words for proper display, but don't know how to set-up the stuff
            So my question is: how can I capture the content of the sentence pointed to by IconIndex and fit it into "Text in Zeilen" ?

            Maybe write a logic module that translates the numeric value into the corresponding text, and fit the ouput into "Text in Zeilen".

            Maybe a better idea ? maybe such a module exists already ?

            Thanks
            Raymond
            such a module does already exists: http://www.eib4fun.de/homeserver/hs_...ml#Textumbruch

            it splits a longer text into as many lines with given characters as you want.
            my page is in german but maybe the picture tells you all you need.

            cheers
            tilo

            Kommentar


              #7
              Zitat von bytefactory Beitrag anzeigen
              such a module does already exists: http://www.eib4fun.de/homeserver/hs_...ml#Textumbruch

              it splits a longer text into as many lines with given characters as you want.
              Hi Tilo,

              But my problem is not cutting a long sentence into smaller chunks but rather how can I catch the output of a dynamic text (which is too long) and re-direct it into a 14Byte variable. Once it's there, the problem is solved and I can use your module.

              Thank you for the tip.
              Raymond
              btw: do you know about an "array" module or a "translation table" module ? That would do the trick as well, I could use the numeric variable as index to the table/array send the output to another 14Byte variable and finally cut it into slices.

              Kommentar


                #8
                Zitat von Warichet Beitrag anzeigen
                Hi Tilo,

                But my problem is not cutting a long sentence into smaller chunks but rather how can I catch the output of a dynamic text (which is too long) and re-direct it into a 14Byte variable. Once it's there, the problem is solved and I can use your module.

                Thank you for the tip.
                Raymond
                btw: do you know about an "array" module or a "translation table" module ? That would do the trick as well, I could use the numeric variable as index to the table/array send the output to another 14Byte variable and finally cut it into slices.
                you could use my "conditional text" module to generate a dynamic text.
                http://www.eib4fun.de/homeserver/hs_...BedingungsText

                cheers
                tilo

                Kommentar


                  #9
                  Zitat von bytefactory Beitrag anzeigen
                  you could use my "conditional text" module to generate a dynamic text.
                  Yes, indeed, but it doesn't do exactly what I want, so I'm trying to write my own module (my Python skills are below average)
                  I understand that the syntax for accessing an element of an array is:
                  (SN[1])
                  But instead of a fixed value, could I use a variable as index ? like:
                  (EN[EN[17]])
                  I've no error, but it doesn't work, so I guess there is something wrong.

                  Any tip is welcome
                  Raymond

                  Kommentar


                    #10
                    Zitat von Warichet Beitrag anzeigen
                    Yes, indeed, but it doesn't do exactly what I want, so I'm trying to write my own module (my Python skills are below average)
                    I understand that the syntax for accessing an element of an array is:
                    (SN[1])
                    But instead of a fixed value, could I use a variable as index ? like:
                    (EN[EN[17]])
                    I've no error, but it doesn't work, so I guess there is something wrong.

                    Any tip is welcome
                    Raymond
                    you should post the source of you module to get any hints ... a select a string by value operator should be very easy to write ...

                    cheers
                    tilo

                    Kommentar


                      #11
                      Zitat von bytefactory Beitrag anzeigen
                      you should post the source of you module to get any hints
                      OK, it's just 1 line
                      Zitat von bytefactory Beitrag anzeigen
                      a select a string by value operator should be very easy to write ...
                      Aaah !?! tell me more

                      5000|"Warichet\Translation_Table"|0|17|"E1 Text"|"E2 Text"|"E3 Text"|"E4 Text"|"E5 Text"|"E6 Text"|"E7 Text"|"E8 Text"|"E9 Text"|"E10 Text"|"E11 Text"|"E12 Text"|"E13 Text"|"E14 Text"|"E15 Text"|"E16 Text"|"Index Num"|1|"A1 Translated output"
                      5001|17|1|0|0|1
                      5002|1|""|1 # Input n°1, text
                      5002|2|""|1 # Input n°2, text
                      5002|3|""|1 # Input n°3, text
                      5002|4|""|1 # Input n°4, text
                      5002|5|""|1 # Input n°5, text
                      5002|6|""|1 # Input n°6, text
                      5002|7|""|1 # Input n°7, text
                      5002|8|""|1 # Input n°8, text
                      5002|9|""|1 # Input n°9, text
                      5002|10|""|1 # Input n°10, text
                      5002|11|""|1 # Input n°11, text
                      5002|12|""|1 # Input n°12, text
                      5002|13|""|1 # Input n°13, text
                      5002|14|""|1 # Input n°14, text
                      5002|15|""|1 # Input n°15, text
                      5002|16|""|1 # Input n°16, text
                      5002|17|0|0 # Input n°17 Index (number)
                      5004|1|""|0|1|1 # Output 1, texte
                      5012|0|""|"(EN[EN[17]])"|""|0|0|1|0

                      Kommentar


                        #12
                        Have you realized, that you do not send your result to output1??

                        5012|0|""|"(EN[EN[17]])"|""|0|0|1|0
                        This means intrenal variable 1 which has not been set.

                        5012|0|""|"(EN[EN[17]])"|""|1|0|0|0
                        This should work
                        Gruß Matthias
                        EIB übersetzt meine Frau mit "Ehepaar Ist Beschäftigt"
                        - PN nur für PERSÖNLICHES!

                        Kommentar


                          #13
                          Zitat von MatthiasS Beitrag anzeigen
                          Have you realized, that you do not send your result to output1??

                          Zitat von MatthiasS Beitrag anzeigen
                          5012|0|""|"(EN[EN[17]])"|""|1|0|0|0
                          This should work
                          Yes, but I can make more than 1 mistake in 1 line

                          Thank you very much Matthias

                          Kommentar


                            #14
                            Zitat von MatthiasS Beitrag anzeigen
                            5012|0|""|"(EN[EN[17]])"|""|1|0|0|0
                            This should work
                            I'm unable to make it work.
                            I tried to pass via a memory variable (although not really needed) no result.
                            Anyone having a sharp eye to see something wrong ? maybe the whole logic is wrong if it is'nt supposed to work this way.

                            Thanks
                            Raymond

                            5000|"Warichet\Translation_Table"|0|17|"E1 Text"|"E2 Text"|"E3 Text"|"E4 Text"|"E5 Text"|"E6 Text"|"E7 Text"|"E8 Text"|"E9 Text"|"E10 Text"|"E11 Text"|"E12 Text"|"E13 Text"|"E14 Text"|"E15 Text"|"E16 Text"|"Index Num"|1|"A1 Transl text"
                            5001|17|1|0|1|0 # 17 Input, 1 Output, 0 time variable, 1 variable, No Compute at Start
                            5002|1|""|1 # Input n°01, text
                            5002|2|""|1 # Input n°02, text
                            5002|3|""|1 # Input n°03, text
                            5002|4|""|1 # Input n°04, text
                            5002|5|""|1 # Input n°05, text
                            5002|6|""|1 # Input n°06, text
                            5002|7|""|1 # Input n°07, text
                            5002|8|""|1 # Input n°08, text
                            5002|9|""|1 # Input n°09, text
                            5002|10|""|1 # Input n°10, text
                            5002|11|""|1 # Input n°11, text
                            5002|12|""|1 # Input n°12, text
                            5002|13|""|1 # Input n°13, text
                            5002|14|""|1 # Input n°14, text
                            5002|15|""|1 # Input n°15, text
                            5002|16|""|1 # Input n°16, text
                            5002|17|0|0 # Input n°17, index (numeric)
                            5003|1|""|0 # Variable
                            5004|1|"$"|0|1|1 # Output 1, text
                            5012|0|""|"(EN[EN[17]])"|""|0|0|1|0
                            5012|0|""|"SN[1]"|""|1|0|0|0

                            Kommentar


                              #15
                              I think, it is generally not possible to make a reference like taht.

                              If you have a look at this original DACOM logic module, you will see, how they do a similar problem:

                              ###################################
                              ### BS : Eingangsauswahlschalter8Text
                              ###################################
                              #5000|"Text"|Remanent(1/0)|Anz.Eingänge|.n.|Anzahl Ausgänge|.n.|.n.
                              #5001|Anzahl Eingänge|Ausgänge|Offset|Speicher|Berechnung bei Start
                              #5002|Index Eingang|Default Wert|0=numerisch 1=alphanummerisch
                              #5003|Speicher|Initwert|Remanent
                              #5004|ausgang|Initwert|runden binär (0/1)|typ (1-send/2-sbc)|0=numerisch 1=alphanummerisch
                              #5012|abbruch bei bed. (0/1)|bedingung|formel|zeit|pin-ausgang|pin-offset|pin-speicher|pin-neg.ausgang
                              5000|"DaCom Erweiterungen\Eingangsauswahlschalter8Text"|0|9|"E 1 Selektion"|"E2 Text1"|"E3 Text2"|"E4 Text3"|"E5 Text4"|"E6 Text5"|"E7 Text6"|"E8 Text7"|"E9 Text8"|1|"A1 Auswahl"
                              # bei Start nicht berechnen
                              5001|9|1|0|0|0
                              # EN[x]
                              5002|1|0|0
                              5002|2|""|1
                              5002|3|""|1
                              5002|4|""|1
                              5002|5|""|1
                              5002|6|""|1
                              5002|7|""|1
                              5002|8|""|1
                              5002|9|""|1
                              # Ausgänge
                              5004|1|""|0|1|1

                              #################################################
                              5012|0|"EC[1] and (EN[1]==1)"|"EN[2]"|""|1|0|0|0
                              5012|0|"EC[1] and (EN[1]==2)"|"EN[3]"|""|1|0|0|0
                              5012|0|"EC[1] and (EN[1]==3)"|"EN[4]"|""|1|0|0|0
                              5012|0|"EC[1] and (EN[1]==4)"|"EN[5]"|""|1|0|0|0
                              5012|0|"EC[1] and (EN[1]==5)"|"EN[6]"|""|1|0|0|0
                              5012|0|"EC[1] and (EN[1]==6)"|"EN[7]"|""|1|0|0|0
                              5012|0|"EC[1] and (EN[1]==7)"|"EN[8]"|""|1|0|0|0
                              5012|0|"EC[1] and (EN[1]==8)"|"EN[9]"|""|1|0|0|0
                              Gruß Matthias
                              EIB übersetzt meine Frau mit "Ehepaar Ist Beschäftigt"
                              - PN nur für PERSÖNLICHES!

                              Kommentar

                              Lädt...
                              X