G4 Setup Port Variables
sonny
Posts: 208
Hello All,
Can anyone point me to documentation on the various items accessible through Port 0 - Setup Port? I've searched and searched to no avail. Need to know ranges, values, read/write capability, etc. Specifically trying to setup a bargraph and percent indicator of battery strength and wireless connection quality. I've tried several of the options with no luck.
Thanks...Sonny
Can anyone point me to documentation on the various items accessible through Port 0 - Setup Port? I've searched and searched to no avail. Need to know ranges, values, read/write capability, etc. Specifically trying to setup a bargraph and percent indicator of battery strength and wireless connection quality. I've tried several of the options with no luck.
Thanks...Sonny
0
Comments
Hi sonny,
Goto File-->Open System Page Template
From there you will see all the TP setup pages and you can then cut and paste what you need.
Hope this helps.
Cheers,
Joe
*****From Help File******
Formatting codes can be used in the state text for bargraph and multi-bargraph buttons. The following formatting codes will be replaced with the identified values:
$P - level percentage
$V - raw level value
$L - range low
$H - range high
$A - adjusted level value (raw level value ? range low)
$R - range (range high ? range low)
$$ - $ character
***************************
What this means is within a bargraph (any time of bargraph) if you put $P it will get replaced with the current values percentage of the range of the bargraph. The cool thing is you can put additional text in the bargraph, For example if you put the following text on a bargraph:
The current Percentage is $P%
once loaded in the panel you will get:
The current Percentage is 0%
and the 0 will get replaced on the fly as the level changes.
With the additional codes you can much more complex strings like:
Currently displaying Item $V out of $L-$H
Which would result in:
Currently displaying Item 32 out of 1-55
I hope this helps
Thanks for the great insight! I?ve always calculated the percent level and used SEND_COMMAND to the TP to write the text in the bargraph on every level change. Now I can dump that and just use $P% once at design time and be done with it. Very cool.
I also didn?t realize that the SetupCodes.xls even existed. There?s some great info in there.
I better end this post now as my ignorance is showing.
Cheers,
Joe
Yea there are quite a few little features that are in the help file, but really unless you know about them you probably wouldn't run across them. On that same note there are similar codes available for dynamic images, so you can append them to the URL of the dynamic image and on ther server side make determinations on them. I wouldn't say you showed any ignorance , I think most people don't even know about those features/items. You did the right thing by posting it here