Home AMX User Forum NetLinx Studio

display value on bargraph problem

udiudi Posts: 107
I am trying to do a module for denon 3310 AVR but I am having some problems with the volume description. (Files are added)
When I press the volume up button the volume on the receiver is raise up but on the bargraph it always set to 0. And when I am trying to drug the bar he doesn’t move he is always returning to zero. (Same in volume down)
In the diagnostic I see the value raising but the value always return to zero.

Line 30 (16:13:25):: Command To [33001:1:1]-[MAIN_VOLUME+]
Line 31 (16:13:25):: Command From [33001:1:1]-[MAIN_VOLUME+]
Line 32 (16:13:25):: String To [5001:1:1]-[MVUP#13]
Line 33 (16:13:25):: Input Status: Released [11001:14:1] - Channel 24
Line 34 (16:13:25):: String From [5001:1:1]-[MV965#13MVMAX 975#13]
Line 35 (16:13:25):: String To [33001:1:1]-[MAIN_VOLUME=96#13]
Line 36 (16:13:25):: String From [33001:1:1]-[MAIN_VOLUME=96#13]
Line 37 (16:13:25):: String To [33001:1:1]-[MAIN_VOLUME=0#13]
Line 38 (16:13:25):: String From [33001:1:1]-[MAIN_VOLUME=0#13]
Line 39 (16:13:25):: Level Value To [11001:14:1] - Level 1 Value= 96
Line 40 (16:13:25):: Level Value To [11001:14:1] - Level 1 Value= 0
Line 41 (16:13:25):: String To [33001:1:1]-[MAIN_VOLUME_SET=96#13]
Line 42 (16:13:25):: String From [33001:1:1]-[MAIN_VOLUME_SET=96#13]
Line 43 (16:13:25):: String To [33001:1:1]-[MAIN_VOLUME_SET=0#13]
Line 44 (16:13:25):: String From [33001:1:1]-[MAIN_VOLUME_SET=0#13]

I don’t understand what is the problem. I want to show the value on the bar but it is always on zero.

What can be the problem?
Thanks for any help.

Comments

  • a_riot42a_riot42 Posts: 1,624
    Are you parsing the mvmax reply properly? Since it contains an 'mv' it will get past your if guard. Using find string can be dangerous the way you are using it since the same string can be found in different responses ie: find_string(reply, 'stereo', 1) will match 'stereo' and but so will '5 ch stereo'.
    Paul
  • viningvining Posts: 4,368
    I would look at your parsing routing in the module since the AVR response of MVMAXxxx will get parsed by your find_string(buf,"'MV'",1) or what ever your comm module does. You need a find_string(buf,"'MVMAX'",1) in the routine before the find_string(buf,"'MV'",1) to trap the MVMAX since when your current code comes across MVMAX it removes the MV and then take the next 2 or 3 characters for a vol level and "MAX" will equal zero. MVMAX might always follow MV which means the current parsing routine properly handles the MV and is then cleared by improperly parsing the MVMAX.

    I guess that's what paul jujst said. I really nead to read posts first. :)
  • udiudi Posts: 107
    another problem

    thanks the MVMAX was the problem.
    But know I have another problem I am trying to use the dragging of the bar to change the volume on the AVR but when I am dragging it the volume get crazy.
    In the UI FILE:
    I think the problem is in the command: send_level dvTP_RCV,1,nVOLUME in the DEFINE_PROGRAM section.
    Because when I am changing the volume value with the bar in the DATA_EAVENT
    DATA_EVENT[vdvReceiver]
    {
    ………….
    ACTIVE(LEFT_STRING(DATA.TEXT,12)=='MAIN_VOLUME='):// VOLUME FEEDBACK
    {
    nVOLUME=ATOI(DATA.TEXT)
    SEND_STRING 0,"'From UI RECEIVED FROM COMM MainVol: ',itoa(nVOLUME)"
    }
    ……………..
    }
    The nVOLUME is change and then he send the value again to the TP I think.
    I want to get feedback from the receiver and send the value to the bargraph and also to control the volume with the bar and the up and down buttons.
    How can I do that?????
    Thanks for any help
  • udiudi Posts: 107
    I see that nobody answered to my questions yet.
    Can someone answer me please I'm pretty stuck with this??
  • viningvining Posts: 4,368
    I normally use 2 bargraphs. Position the 2 bargraphs one on top ot the other with the top level channel x and the bottom level channel y. Top is invisible but active and is used to send sevels to the master while the bottom in visible but display only and used to display the level that returns to the panel.

    This was also just discussed very recently in another thread so if you feel like searching......
Sign In or Register to comment.