PAC Commands

Discussion in 'C-Touch/HomeGate/SchedulePlus/PICED Software' started by PeteS, Dec 10, 2011.

  1. PeteS

    PeteS

    Joined:
    Jun 25, 2007
    Messages:
    33
    Likes Received:
    0
    Location:
    Onamalutu Valley, NZ
    Hi,

    I'm trying to get DLT labels to change with logic in a PAC by using the SetStringIBSystemIO to tell the DLT what to display. When I compile I get 006 illegal Symbol error. Does this command work on a PAC?

    The lines in question look like this:-

    SetStringIBSystemIO ( "Label Group Text", 254, 56, 25, 3, "Fan 1")

    Which, if I understood the help files correctly, should set the DLT at address 25 to use variant 4 as "Fan 1".

    Apart from this I have the single button stepping through the scenes just fine, I just don't know where I am!
     
    PeteS, Dec 10, 2011
    #1
  2. PeteS

    Newman

    Joined:
    Aug 3, 2004
    Messages:
    2,203
    Likes Received:
    0
    Location:
    Adelaide, South Australia
    Your new text for the DLT label should be in single quotes, not double quotes.

    Also, your decription of what the various bits of the command do are not quite correct. The command you have there (with the single quotes for the text label) would do the following.

    • Apply a new label to a group;
    • That group is on network 254;
    • That group is on Application 56 (default lighting);
    • The group address is 25;
    • The particular label variant we want to update is Variant 4 (numbers are 0-based). Units currently configured to use variants 1, 2 or 3 will not update;
    • The new text is 'Fan 1'
    Not quite. It will set the label of any button on a DLT using Group Address 25 and currently configured to use variant 4 for that group to 'Fan 1'. If that button of the DLT is not configured to use Variant 4, it will ignore the label command.

    Note that you can make your code a little more transparent by replacing the hard-coded numbers with the actual tag names. You can use "Lounge Room Fan" (or whatever you've called it) in lieu of the number 25, for example.
     
    Newman, Dec 10, 2011
    #2
  3. PeteS

    PeteS

    Joined:
    Jun 25, 2007
    Messages:
    33
    Likes Received:
    0
    Location:
    Onamalutu Valley, NZ
    Hi Newman,

    I've changed the quotes but I still get the same errors - C006 - Illegal Symbol, and when I click on the error message it takes me to the begining of the line for the setstring command. If I REM these lines out (curly brackets) it compiles fine. If I copy the line setstring.... to a dummy module with only that line in it it compiles fine, if I include the adjacent setscene command in the dummy module (cut and paste two adjacent lines of code, setscene and setstring) it throws up the error message and will not compile.:confused:

    Can you see what I'm doing wrong?

    once
    GetLightingState("fan speed adjust") then
    begin
    if SceneIsSet("Ceiling fan off") then
    begin
    SetScene("Ceiling fan slow")
    SetStringIBSystemIO("Label Group Text", 254, 56, 25, 3, 'Fan 1')
    end
    else if SceneIsSet("Ceiling fan slow") then
    begin
    SetScene("Ceiling fan medium")
    SetStringIBSystemIO("Label Group Text", 254, 56, 25, 3, 'Fan 2')
    end
    else if SceneIsSet("Ceiling fan medium") then
    begin
    SetScene("Ceiling fan fast")
    SetStringIBSystemIO("Label Group Text", 254, 56, 25, 3, 'Fan 3')
    end
    else if SceneIsSet("Ceiling fan fast") then
    begin
    SetScene("Ceiling fan off")
    SetStringIBSystemIO("Label Group Text", 254, 56, 25, 3, 'Fan OFF')
    end
    end;
     
    PeteS, Dec 10, 2011
    #3
  4. PeteS

    Newman

    Joined:
    Aug 3, 2004
    Messages:
    2,203
    Likes Received:
    0
    Location:
    Adelaide, South Australia
    Your code is missing the semicolons on the end of the lines. Each of the SetScene and SetStringIBSystemIO lines needs a semicolon on the end. Without them the compiler doesn't know that the next line is a new command.
     
    Newman, Dec 10, 2011
    #4
  5. PeteS

    PeteS

    Joined:
    Jun 25, 2007
    Messages:
    33
    Likes Received:
    0
    Location:
    Onamalutu Valley, NZ
    Thank you for that, it's been a long day!

    My number 25 was wrong as well, it needed to be 53....... :)
     
    PeteS, Dec 10, 2011
    #5
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.