- Posts: 33
- Thank you received: 11
Visualisation of bitmasks or alarm codes
3 weeks 4 days ago #63
by claes
Replied by claes on topic Visualisation of bitmasks or alarm codes
Hi jds,
The syntax for the array is Da1->Alarmtext[I1].
I1 is a signed integer so I would also check for erroneous negative values
if (I1 <= 0 && I1 < 3).
Created objects will be a copies of the template object and contain the array values. New attributes in existing objects though will be empty.
/Claes
The syntax for the array is Da1->Alarmtext[I1].
I1 is a signed integer so I would also check for erroneous negative values
if (I1 <= 0 && I1 < 3).
Created objects will be a copies of the template object and contain the array values. New attributes in existing objects though will be empty.
/Claes
Please Log in or Create an account to join the conversation.
3 weeks 3 days ago #66
by jds
Replied by jds on topic Visualisation of bitmasks or alarm codes
Please Log in or Create an account to join the conversation.
3 weeks 3 days ago #67
by claes
Replied by claes on topic Visualisation of bitmasks or alarm codes
Yes, or you can write a script. Something like
Execute from the command line in the configurator with '@scriptname'.
/Claes
Code:
main()
string oname;
string aname;
string value;
# verify(1);
oname = GetClassList("BaseFcXylem");
while (oname != "")
aname = oname + ".Alarmtext[0]";
value = "text1";
SetAttribute(aname, value);
aname = oname + ".Alarmtext[1]";
value = "t2";
SetAttribute(aname, value);
...
oname = GetNextObject(oname);
endwhile
endmain
Execute from the command line in the configurator with '@scriptname'.
/Claes
Please Log in or Create an account to join the conversation.
3 weeks 3 days ago #68
by jds
Replied by jds on topic Visualisation of bitmasks or alarm codes
Top! Learning day by day.
In the meantime I let chatgpt do the dirty work since I had to convert 255 alarmtext from the manual in a horrible formated table to be converted. Copied the table directly into the wb_load file at the correct places (and adjusting the array to the correct size) and the right classnames. Works like a charm. Now up to creating the whole class since this was just some testing
Thanks a lot!
In the meantime I let chatgpt do the dirty work since I had to convert 255 alarmtext from the manual in a horrible formated table to be converted. Copied the table directly into the wb_load file at the correct places (and adjusting the array to the correct size) and the right classnames. Works like a charm. Now up to creating the whole class since this was just some testing

Thanks a lot!
Please Log in or Create an account to join the conversation.
Time to create page: 0.433 seconds