Read an sync bargraph on several panels - and keep the state
bia@jdm.dk
Posts: 20
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
}
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
}
0
Comments
something like.
May be worth putting a qualifier in the update:
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.