Labelling DLT's From PAC

Discussion in 'C-Touch/HomeGate/SchedulePlus/PICED Software' started by Simmo74, Jan 27, 2012.

  1. Simmo74

    Simmo74

    Joined:
    Feb 1, 2009
    Messages:
    4
    Likes Received:
    0
    Location:
    Australia
    Greetings

    Could anybody shed any light on the code below, as to why the label on the DLT does not change? The code is executing as the scenes are being triggered.

    Thanks Tim.


    Once GetCbusLevel( Net, C4, "LsCycleFrtDoor") = 100% then

    begin
    SetScene("LsWelcomeFrtDoor");
    SetStringIBSystemIO("Label Group Text", Net, C4, 10, 3,'Goodbye');
    end;

    Once GetCbusLevel( Net, C4, "LsCycleFrtDoor") = 50% then

    begin
    SetScene ("LsGoodbye");
    SetStringIBSystemIO("Label Group Text", Net, C4, 10, 3,'Welcome');
    end;


    P.s. "LsCycleFrtDoor" is group 10 (I just tried putting 10 in for S&*ts & giggle's) also net=254 C4=58.
     
    Simmo74, Jan 27, 2012
    #1
  2. Simmo74

    Darren Senior Member

    Joined:
    Jul 29, 2004
    Messages:
    2,361
    Likes Received:
    0
    Location:
    Adelaide, South Australia
    Are you using the correct variant? I think that when ToolKit refers to Variant 3, it is actually variant 2 on C-Bus.

    You can also use the C-Bus Diagnostic software to see what messages are being sent, or to send your own label messages to try to get it working.
     
    Darren, Jan 27, 2012
    #2
  3. Simmo74

    NickD Moderator

    Joined:
    Nov 1, 2004
    Messages:
    1,427
    Likes Received:
    64
    Location:
    Adelaide
    The '3' you have for the second-last parameter is the variant of the label... it would normally be '0' (Variant 1). Did you intentionally choose this value?

    If the DLT is not configured to display variant 4 of the label then it would not display the new value you are sending.

    Label variants are normally only used where you have more than one key controlling a group and you want a different label on each key... for example Volume Up and Volume Down.

    The other thing is you need to have the language set by the "Label Language" SystemIO variable set to the same language as the DLT you are trying to label.

    Nick
     
    NickD, Jan 27, 2012
    #3
  4. Simmo74

    Simmo74

    Joined:
    Feb 1, 2009
    Messages:
    4
    Likes Received:
    0
    Location:
    Australia
    Thanks Guys,

    Appreciate your input, I had tried label variants 0 to 3 which correct me if i'm wrong the integer is zero based & relates to 1 to 4. The reason I was on variant 3 was because it was nearing the end of Nock-off Friday and being hung over from Australia day I was checking messages broadcast onto the network via the diagnostic Utility. I did notice that when sent from the PAC the Language part of the string is not transmitted, however when setting the Label via Diag Utility the language is appended to the string.

    I have just checked the project (On a Saturday I Know!) by adding an object to the workspace area, then clicking in the system IO language it was set to null.

    Would I be correct in saying that I need to 'initialise' the language IBsystemio in programming once?.......... Or do what?

    Regards Tim.
     
    Simmo74, Jan 28, 2012
    #4
  5. Simmo74

    Darren Senior Member

    Joined:
    Jul 29, 2004
    Messages:
    2,361
    Likes Received:
    0
    Location:
    Adelaide, South Australia
    I think that is right.

    Change to using variant 0 (which is called variant 1 in ToolKit) and it should work.

    This doesn't sound right. If you get a chance, post an extract of the Diagnostic Utility log showing what you mean.

    It defaults to English, so it should work without having to set the language first. You could set the language to English in the logic initialisation to see if it makes a difference.
     
    Darren, Jan 28, 2012
    #5
  6. Simmo74

    Simmo74

    Joined:
    Feb 1, 2009
    Messages:
    4
    Likes Received:
    0
    Location:
    Australia
    Ok Fixed it thanks to your help....

    Messages Before Change: Still set to variant 3

    10:25:41 Rx : 05643A00790ADA<CR> "_d:_y__"
    10:25:41 Rx : = GA 10 On
    10:25:41 Rx : 05643A00020A7FD2<CR> "_d:_____"
    10:25:41 Rx : = GA 10 Set to 50%
    10:25:41 Rx : 057538000A017C222928222828122682322A1EAE<CR> "_u8___|")("((_&_2*__"
    10:25:41 Rx : = GA 1 Ramp to 49% at 4s rate; GA 41 Ramp to 16% at 20s rate; GA 40 Ramp to 16% at 20s rate; GA 38 Ramp to 51% at 8s rate; GA 42 Ramp to 12% at 40s rate
    10:25:41 Rx : 05643A00010A52<CR> "_d:___R"
    10:25:42 Rx : = GA 10 Off
    10:25:42 Rx : 0575380079401A2C66E9<CR> "_u8_y@_,f_"
    10:25:42 Rx : = GA 64 On; GA 44 Ramp to 40% at 12s rate
    10:25:42 Rx : 0575CA000200FFBB<CR> "_u______"
    10:25:42 Rx : = Ctrl: Grp 0 set to 255
    10:25:42 Rx : 05753A00AA0A6000476F6F646279656F<CR> "_u:___`_Goodbyeo"
    10:25:42 Rx : = GA 10 Label, Variant 3, Language 0, Text label, 7 Bytes = "Goodbye"

    Message Tansmit to DLT from Diag Util: Which Worked.

    10:09:14 Tx : \053A00AA0A000177656C636F6D65<CR>
    10:09:14 Tx : = GA 10 Label, Variant 0, Language 1 [English], Text label, 7 Bytes = "welcome"

    Message Tansmit To DLT after changing JUST Variant back to '0'

    10:32:11 Rx : 05643A00790ADA<CR> "_d:_y__"
    10:32:11 Rx : = GA 10 On
    10:32:11 Rx : 05643A00010A52<CR> "_d:___R"
    10:32:11 Rx : = GA 10 Off
    10:32:11 Rx : 057538000A017C222928222828122682322A1EAE<CR> "_u8___|")("((_&_2*__"
    10:32:11 Rx : = GA 1 Ramp to 49% at 4s rate; GA 41 Ramp to 16% at 20s rate; GA 40 Ramp to 16% at 20s rate; GA 38 Ramp to 51% at 8s rate; GA 42 Ramp to 12% at 40s rate
    10:32:12 Rx : 0575380079401A2C66E9<CR> "_u8_y@_,f_"
    10:32:12 Rx : = GA 64 On; GA 44 Ramp to 40% at 12s rate
    10:32:12 Rx : 0575CA000200FFBB<CR> "_u______"
    10:32:12 Rx : = Ctrl: Grp 0 set to 255
    10:32:12 Rx : 05753A00AA0A0000476F6F64627965CF<CR> "_u:_____Goodbye_"
    10:32:12 Rx : = GA 10 Label, Variant 0, Language 0, Text label, 7 Bytes = "Goodbye"

    Message Transmit After adding inisialisation code:- SetIntIBSystemIO("Label Language", 1);
    Which Worked!


    10:37:31 Rx : 05753A00AA0A000157656C636F6D65CB<CR> "_u:_____Welcome_"
    10:37:31 Rx : = GA 10 Label, Variant 0, Language 1 [English], Text label, 7 Bytes = "Welcome"

    What I had failed to notice when looking at the Diagnostic utility, was a language was being transmitted. It just happened to be Null because my eyes on friday were only seeing the words [English] which I took for it not being sent.

    Added the SysVar in Initialisation, hey presto as if by magic it Worked!!

    Thanks again for your input.

    Cheers Tim.
     
    Simmo74, Jan 30, 2012
    #6
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.