profile label in spectran HF-6065  

  RSS

patrice
(@patrice)
Active Member
Joined: 7 years ago
Posts: 5
07/01/2016 12:14 am  

How can I program a label for a custom profile stored in a 300 to 400 location which would replace the "custom" quickly repaced by "dbm" label? :idea:


Quote
Moderator
(@moderator)
Member Admin
Joined: 9 years ago
Posts: 1048
07/01/2016 10:30 am  

Read the posting in this thread e.g. viewtopic.php?f=23&t=161

Snip


ReplyQuote
patrice
(@patrice)
Active Member
Joined: 7 years ago
Posts: 5
07/01/2016 7:53 pm  

Thanks, I believe I did exactly as in the example progam you mention by actually copying the P-code of one of the hot key and replacing each hot key profile value by the value of my custom profile and the hot key label in the "PRINTSTR 03h," command by my label. When I run the program however I do get my profile values but, instead of my profile label, the indication "custom" quickly repaced by "dBm". Any idea?


ReplyQuote
Moderator
(@moderator)
Member Admin
Joined: 9 years ago
Posts: 1048
08/01/2016 7:58 am  

That is exactly as it should work. The label name will be overwritten by the unit after the first sweep is finished (the first time a marker gets a value).
You can avoide this by rewriting the label after each sweep.
BTW "custom" needs to get replaced by your label name...

Snip


ReplyQuote
patrice
(@patrice)
Active Member
Joined: 7 years ago
Posts: 5
08/01/2016 7:45 pm  

Thanks again but I am really dumb; What is BTW and how can I replace the BTW "custom" by my label name as you suggest?


ReplyQuote
Moderator
(@moderator)
Member Admin
Joined: 9 years ago
Posts: 1048
08/01/2016 8:35 pm  

BTW = by the way....

You need to CHANGE "custom" or what ever is shown in the label in the P-Code source by YOUR label name (e.G. "GSM900"). Please read the P-Code instructions...

Snip


ReplyQuote
patrice
(@patrice)
Active Member
Joined: 7 years ago
Posts: 5
10/01/2016 9:34 pm  

Sorry it is me again because I am really lost. Attached is the program I wrote for my custom profile labeled SFR9DL, copying hotkey 5 with different values. I guess it is right because when I run it in the Spectran I do get my profile values. I understand my SFR9DLlabel gets wiped out after the first sweep and is replaced by "custom" quickly replaced by "dBm" but I would like to avoid that. You tell me I should print my label after each sweep and also that I should replace the "custom" by my label but I cannot find how to do that (actually I do not even know where the "custom" comes from!). Could you tell me which code I should add in my program or somewhere else? There must be a way to label custom programs in the Spectran, as written in the Users Manual. Thanks a lot for your patience.


ReplyQuote
patrice
(@patrice)
Active Member
Joined: 7 years ago
Posts: 5
13/01/2016 1:27 pm  

Not having a reply I guess I have to struggle or forget my question. It would help me a lot however to know, which is not clear in the API instructions:
1) I understand that T1 is the top of the stack, does it mean that the variable loaded last is in T1 and the variable loaded before last is in T2?
2) does the instruction "JUMPLT Label" mean a jump to the label if T1 is lower than or equal to T2 or only if T1 is strictly lower than T2 (in that case I don't understand how your example Provider Display program works for when T1 and T2 are equal it jumps to the label mentioned in the instruction)?
3)does the instruction "SUB" mean to substract T1 from T2 or the contrary?
4) Are sweeps "one shot" (and then how are they started and ended?) or continuous, once the environment variables are loaded?
Thanks


ReplyQuote
Moderator
(@moderator)
Member Admin
Joined: 9 years ago
Posts: 1048
14/01/2016 2:32 pm  

It is much easier: If you press the hotkey the NAME of the hotkey will be shown (remain displayd) forever. ONLY if you enter and exit the menu you will get "CUSTOM" replacing the hotkey name and replacing "CUSTOM" with the selected unit (e.g. dBm) after the first sweep.

If you want your label ALLWAYS to be seen simply add

PRINTSTR 03h, "labelname"

on TOP of program 150 (scanprog). Aftger that this label will show up after every sweep since program 150 will be called after each sweep.

But if you want to do some own P-Code programming please have a look at P-Code samples we offer so far e.g.
viewtopic.php?f=23&t=191
viewtopic.php?f=23&t=161

Snip


ReplyQuote
Share: