Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1
  • 2

TOPIC: Xttgraph inhibition

Xttgraph inhibition 12 years 6 months ago #2889

  • Snarf77
  • Snarf77's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 847
  • Thank you received: 2
  • Karma: 5
Hi all,

I just wonder if there a way to prevent the openening or the display of a xttgraph based on the value of a variable in the plant ?

Indeed, in my case I need to grant access to some parameters available on one mimic only if some initial condition are presents. I tried with grouping object and set them an invisible attribute (dimmed) depending on this variable and it works but this give a very ugly flickering effect due to the refresh of groups and objects on the mimic (perphas because I have several elements already \"masked\" based on this principle and probably also due to the poor refersh rate on the screen I use (tactile scree are sometime limited)).

So I think I must find another manner to do things which makes me raise this question now

Thanks for any answers.

Snarf
The administrator has disabled public write access.

Re:Xttgraph inhibition 12 years 6 months ago #2890

  • claes
  • claes's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 3180
  • Thank you received: 502
  • Karma: 133
Hi Snarf,

Have you set double buffering in graph attributes. This will remove most flickering.

It is possible to start a xtt script from an XttGraph object and this script can test no an attribute and open the graph if the condition is true.

In the Action attribute of the XttGraph object insert '@$pwrp_exe/some_script'

Create the script $pwrp_exe/some_script.rtt_com

[code:1]main()
int value;

value = GetAttribute( \"H1-SomeDv.ActualValue\"«»);
if ( value == 1)
open graph /object=Nodes-MyNode-Op-SomeXttGraph
endif

endmain[/code:1]

/Claes

Post edited by: claes, at: 2011/11/04 16:26
The administrator has disabled public write access.

Re:Xttgraph inhibition 12 years 5 months ago #2937

  • Snarf77
  • Snarf77's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 847
  • Thank you received: 2
  • Karma: 5
Hi Claes,

I just tested the double buffering option and the difference is really impressive.

No flickering remaining at all. Really perfect.

Stupid question, why is this option not ticked by default, does this consume a lot of ressource of something like this ??


Other question: I tried to restart playing with invisible group layer since this option is nice with the double buffering but I got a problem with a slider has soon as it is grouped.
Indeed I lost the possibility to move it. the cursor is following the ref value (if I changed it from the plant) but I can't modify it with the cursor.
I'm sure I succeeded once with quite the same configuration but can't find what happens.

Any known problems with slider or something I can try ...


Thanks in advance

Snarf


PS: I will try your solution with the script in a while.
The administrator has disabled public write access.

Re:Xttgraph inhibition 12 years 5 months ago #2943

  • claes
  • claes's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 3180
  • Thank you received: 502
  • Karma: 133
Hi Snarf,

When doublebuffering is on a buffer is allocated in the X server, and all the graphics are first drawn the buffer which is the copied to the screen. The buffer is about 1 megabyte so it no big deal nowadays.

Motion events are not forwarded by a group to the group members, so it's not a good idea to group a slider. If you want to make the slider invisible, you have add the invisible dynamic to the slider itself.

/Claes
The administrator has disabled public write access.

Re:Xttgraph inhibition 12 years 5 months ago #2946

  • Snarf77
  • Snarf77's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 847
  • Thank you received: 2
  • Karma: 5
OK, so I will always use the double buffering as my default configuration for sure :P

Concerning the slider, now I have only one which must be hidden that way so I will put it out of the group but I have multi invisible instances which I must copy twice (for the group and itself) which is a potential source of error in my opinion and require all the case to be tested each time.

I don't know if I'm alone in that case but I think it could be an improvment for some future release. If I'm the only one needing this I think I can survive even with the current configuration....
Just for my understanding what difference do you make between forwarding from the element to the group owner, let's say a pushbutton or an edit box (which works now) but not a slider ?

Thanks for explanation

Snarf
The administrator has disabled public write access.

Re:Xttgraph inhibition 12 years 5 months ago #2951

  • claes
  • claes's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 3180
  • Thank you received: 502
  • Karma: 133
Maybe you could use a window object instead of a group. The window object supports sliders, and you can view different graphs in the window by using the 'set subwindow' command. By using the DigCommand dynamics it is possible the change graph when some value in the database is changed, and you can also execute the command from a command push button.

There is an updated version of the Ge manual where you can read about the window object and the 'set subwindow' command.

/Claes
The administrator has disabled public write access.
  • Page:
  • 1
  • 2
Time to create page: 7.539 seconds