PDA

View Full Version : DLT text


Dave Byron
05 Nov 07, 08:13 AM
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

Darren
05 Nov 07, 03:14 PM
Sorry Dave, but I am not sure what you are asking here. Can you clarify your questions please ?

Dave Byron
05 Nov 07, 03:17 PM
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

Darren
06 Nov 07, 04:48 PM
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
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);


option B
how can I get the integer value of the group from the string value to use in the command
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.

Dave Byron
07 Nov 07, 07:44 AM
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

Darren
07 Nov 07, 09:32 AM
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.