DLT text

Discussion in 'Pascal Logic Code Examples' started by Dave Byron, Nov 4, 2007.

  1. Dave Byron

    Dave Byron

    Joined:
    Aug 3, 2004
    Messages:
    835
    Likes Received:
    0
    Location:
    Casurina
    How do I use this syntax instead of having to but in the numbers ??

    SetStringIBSystemIO("Label Action Selector Text", "Local","Trigger Control","Xtrig_Blind_Door","low",0, 'Low');

    or
    get the group number as an integer ??

    dave
     
    Dave Byron, Nov 4, 2007
    #1
  2. Dave Byron

    Darren Senior Member

    Joined:
    Jul 29, 2004
    Messages:
    2,361
    Likes Received:
    0
    Location:
    Adelaide, South Australia
    Sorry Dave, but I am not sure what you are asking here. Can you clarify your questions please ?
     
    Darren, Nov 5, 2007
    #2
  3. Dave Byron

    Dave Byron

    Joined:
    Aug 3, 2004
    Messages:
    835
    Likes Received:
    0
    Location:
    Casurina
    Darren
    Instead of using constants with the numbers in - it would be nice to have the complier translate the strings to integers for me.
    Like this;
    SetCBusState("Local Network", "Lighting", "Kitchen", OFF)

    instead of having constants;
    local = 254
    trigger control = 202
    blind = 44

    option B
    how can I get the integer value of the group from the string value to use in the command








    dave
     
    Last edited by a moderator: Nov 5, 2007
    Dave Byron, Nov 5, 2007
    #3
  4. Dave Byron

    Darren Senior Member

    Joined:
    Jul 29, 2004
    Messages:
    2,361
    Likes Received:
    0
    Location:
    Adelaide, South Australia
    I am still a little confused. If you use code like in your example :

    SetCBusState("Local Network", "Lighting", "Kitchen", OFF);

    the compiler does translate the tags (not strings) into integers. So the above is equivalent to something like :

    SetCBusState(254, 56, 20, OFF);

    It is not currently possible to convert a string (containing a tag) into an integer. I assume you want to do something like :

    GroupAddress := GetGroupFromTag("Local Network", "Lighting", TagString);

    where TagString might contain a the name (tag) of a group like 'Kitchen'.

    This is on the list of things to do. We haven't implemented this yet because it would need to be used with caution as it would be quite processor intensive. Although it should be rarely required, we are concerned that it might get used indiscriminately and result in some very poor coding practices.
     
    Darren, Nov 6, 2007
    #4
  5. Dave Byron

    Dave Byron

    Joined:
    Aug 3, 2004
    Messages:
    835
    Likes Received:
    0
    Location:
    Casurina
    Darren,
    Problem.
    Sending DLT text is in out 100 lines in my logic source code, the trouble with using number for all the parameters is ? having to go to Toolkit all the time to look up the values and entering all the numbers without a typing error.

    eg - SetStringIBSystemIO("Label Group Text", 256,56,123,456",0, 'Low');

    What I would like to do is this;

    SetStringIBSystemIO("Label Group", "Local","Trigger Control","Blind","low",0, 'Low');

    The same as in say the

    SetCBusState("Local Network", "Lighting", "Kitchen", OFF);

    and have the compiler do the translate the tags.

    dave
     
    Dave Byron, Nov 6, 2007
    #5
  6. Dave Byron

    Darren Senior Member

    Joined:
    Jul 29, 2004
    Messages:
    2,361
    Likes Received:
    0
    Location:
    Adelaide, South Australia
    Ah, now I understand what you are wanting.

    Currently it is not possible to use C-Bus tags in the system IO functions, as you have found. This is a very good idea (as usual), so I have added this to our "to do list", item number 12654.
     
    Darren, Nov 6, 2007
    #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.