Home AMX User Forum AMXForums Archive Threads Tips and Tricks

Read an sync bargraph on several panels - and keep the state

Hi Guys

I am having an issue, with reading a bargraph - and keep all bargraph on all three panels on the same level.
Alle panels contains the same project file.

The communication is running - and I got the values distrbuted to alle panels - but after aprox 10min the level goes to 0....

This is what I done:

DEFINE_VARIABLE

DEV ALLTP[] = {TP1,TP2,TP3,TP4} //ALL PANELS NAMED ALLTP

INTEGER BARGRAPH1 // STORE BARGRAPH1

DEFINE_EVENT

LEVEL_EVENT[ALLTP,1] // READ THE LEVEL OF THE BARGRAPH
{
BARGRAPH1 = LEVEL.VALUE // STORE THE LEVEL OF THE BARGRAPH

SEND_LEVEL VAO,1,BARGRAPH1 // SEND VALUE TO VAO4 OUTPUT
WAIT 50
SEND_LEVEL TP1,1,BARGRAPH1 // UPDATE BARGRAPH ON PANEL1
WAIT 50
SEND_LEVEL TP2,1,BARGRAPH1 // UPDATE BARGRAPH ON PANEL2
WAIT 50
SEND_LEVEL TP3,1,BARGRAPH1 // UPDATE BARGRAPH ON PANEL3
}

Comments

  • ericmedleyericmedley Posts: 4,177
    I would handle this by creating a for loop and only sending/updating the level feedback to panels actively on the page/popup with the fader in question.

    something like.
    for(nloop=length_array(AllTPs);nloop;nloop--)
      {
      if(TP_Fader_Feedback_active[nloop])
        {
        send_level AllTPs[nloop], the level
        }
      }
    
  • Is your source panel going offline after 10 mins and causing the level to drop to 0?

    May be worth putting a qualifier in the update:
    if(BARGRAPH1)
    {
    	SEND_LEVEL VAO,1,BARGRAPH1 // SEND VALUE TO VAO4 OUTPUT
    	WAIT 50
    	SEND_LEVEL TP1,1,BARGRAPH1 // UPDATE BARGRAPH ON PANEL1
    	WAIT 50
    	SEND_LEVEL TP2,1,BARGRAPH1 // UPDATE BARGRAPH ON PANEL2
    	WAIT 50
    	SEND_LEVEL TP3,1,BARGRAPH1 // UPDATE BARGRAPH ON PANEL3
    }
    

    Also, I wouldn't use one panel as a source for others. Presumably you're setting the levels based on some other variable (like volume) ? Use that as the source data for all your panels.
  • PhreaKPhreaK Posts: 966
    Have a look in the NetLinx Keyword Help at 'Combining and Uncombining Levels'. It'll give you a rundown on how to bind multiple levels to a virtual level.
Sign In or Register to comment.