Home AMX User Forum NetLinx Studio

Is there some kind of setup port that references a level?

Hi there. Very simple question: is it possible to set the address port of a button so that it updates the text on it according to some specific level? Kinda like what the Time setup port does, but with a level. Or do I necessarily have to use the SEND_LEVEL command?

Thanks in advance

Comments

  • viningvining Posts: 4,368
    set up the button as a multi-state bargraph and then set the state count and range hi-lo to correspond with the number of text displays or icons needed. Then just fill in the states with you text or icon and send a level to update.

    I actually do this most of the time for transport control and any other fixed text displays like surround modes, etc. It allows transport control to be automatically mutually exclusive since I put them all on the same level channel with their corresponded on state to match the appropriate level and being a level your text displays as levels states are managed by the master.

    I'll do entire device pages w/o variable text send_commands or channel feedback if possibly and handle everything w/ levels.
  • ericmedleyericmedley Posts: 4,177
    jp1016 wrote: »
    Hi there. Very simple question: is it possible to set the address port of a button so that it updates the text on it according to some specific level? Kinda like what the Time setup port does, but with a level. Or do I necessarily have to use the SEND_LEVEL command?

    Thanks in advance

    Perhaps you might explain specifically what you wish to accomplish. There might be an easier way to get the gig done.

    What you're describing would be possible if you made a multi-state level and put the desired text in each frame of the graphic for the level. On obvious one would be the old fashioned odometer type clocks that have a set of wheels that roll by to display the time. Or even an analog clock.

    But if your goal is to be able to send some set of text to a button, then there's much easier ways of doing that.
  • DHawthorneDHawthorne Posts: 4,584
    There are some text shortcuts that will automatically update the text field of a level button with the value of the level. For example, putting "$P %" in the text field will cause the text on the level to display the percentage of the level. I use this one a lot; it's far more convenient than converting oddball scales in code.

    I have no idea, however, where this is documented. I found the example listed above by looking at the program on a demo panel ... prior to seeing it done on a panel with no master, I had no idea it was possible. I've toyed with some other $ strings:

    $A is the absolute value of the level
    $H is the high level cap
    $L is the low level cap
    (so something like "$A of $H" would read "50 of 100" if the level went to 100 and was currently 50).
    $R I'm guessing is for "range," seems to be the same as $H
  • jp1016jp1016 Posts: 32
    DHawthorne wrote: »
    There are some text shortcuts that will automatically update the text field of a level button with the value of the level. For example, putting "$P %" in the text field will cause the text on the level to display the percentage of the level. I use this one a lot; it's far more convenient than converting oddball scales in code.

    I have no idea, however, where this is documented. I found the example listed above by looking at the program on a demo panel ... prior to seeing it done on a panel with no master, I had no idea it was possible. I've toyed with some other $ strings:

    $A is the absolute value of the level
    $H is the high level cap
    $L is the low level cap
    (so something like "$A of $H" would read "50 of 100" if the level went to 100 and was currently 50).
    $R I'm guessing is for "range," seems to be the same as $H


    Well, what I want is exactly that. Playing with the TP solo. No master. The touch panel I'm programming is going to be shown off to some potencial client, but without a master. So I wanted the text on a bargraph to be updated with the percentage of the level. That's what the code you're talking about does, right? The TP itself updates the text?


    I'm going to try it off now =)

    Thanks
  • Joe HebertJoe Hebert Posts: 2,159
    DHawthorne wrote:
    I have no idea, however, where this is documented.
    It?s in the TPD4 help file but it?s not real easy to find. If you do a search for text formatting codes, this is the first result:
    State Properties - Text

    Text ? To change or enter the text to be displayed on the selected state(s), click the browse button (...) to open the Enter Text dialog, where you can type the new button text. Use the Preview Using Font option to view the text as it will appear in the selected font, style and size (on by default).

    Unicode characters may be entered via the Enter Text dialog only (not through in-place editing in the States tab of the Properties Control window). When Unicode text is input, the name of the button will not match it?s Off state text.

    Formatting codes can be used in the state text for bargraph and multi-bargraph buttons. The following formatting codes will be replaced with the identified values:

    $P - level percentage

    $V - raw level value

    $L - range low

    $H - range high

    $A - adjusted level value (raw level value ? range low)

    $R - range (range high ? range low)

    $$ - $ character
  • gregrgregr Posts: 54
    It's here, too.

    It's documented in the Appendix section of any of the Modero Instruction manuals.
Sign In or Register to comment.