Forum Discussion
Altera_Forum
Honored Contributor
14 years agoThe problem you're running into:
SEVERE: Cannot register content with passed id. An already registered dockable exists. [id : Dashboard Example] is a bug that gets triggered because the "Dashboard Example" tab is open in System Console. If you were to close the tab before re-running the script, then you wouldn't run into this problem and it should work as good as the first time you ran the script. This bug is fixed in 11.1. Also, I updated your script for it to use callbacks. Using callbacks will make your GUIs more responsive. I added a comment where you would need to access the hardware to get new values, as opposed to using the fake values. Also, it should be trivial to add a button that changes another variable to stop the updates from happening or restarting them once it's stopped. I hope it helps. Silvio
namespace eval dashboard_example {
variable dash
variable count
set dash
dashboard_set_property $dash self developmentMode true
dashboard_set_property $dash self visible true
dashboard_add $dash time0 timeChart self
dashboard_set_property $dash time0 maximumItemCount 10
set count 0
proc update {} {
variable dash
variable count
set count
# Here's where you would do a master_read or bytestream_receive to get some data
# from the device, and then update time0's latest with it, as opposed to $count.
dashboard_set_property $dash time0 latest $count
after 1000
}
update
}