157
OPUS Projektor Manual
Variables
·
Variable groups are supposed to support the designer in keeping variables where he
will find them again. These groups are not relevant for the device.
·
Index and subindex are used to identify a variable even on display side. This concept
was mainly introduced for CANopen support but is used for all variables.
Variable Groups
It is suggested to create variable groups for all variables belonging together in one way
or the other. One option would be to create one variable group per ECU. Another would
be to find variables belonging to a certain subject and create a group for them.
Anyways each variable has to belong to exactly one variable group and if you don't
create your own groups all your variables will end up in "common" group.
Note: In main screen variables can be handled and searched using variable view but
when choosing a variable in a dialog it can really be helpful to have them ordered in
meaningful groups.
CANopen organizes all variables as "objects" in its "object dictionary". From this object
dictionary definition we "borrowed" the index and subindex approach. And since the
display does not follow any of the predefined CANopen "device profiles" we had to
move them all into the CANopen index range of 0x2000 ... 0x5FFF where proprietary
objects have to reside.
Within this range we reserved index 0x2000 ... 0x2FFF for our predefined variables
whereas user defined variables are located in the 0x3000 ... 0x5FFF range.
CANopen (and our program) allow two approaches to handle subindices: Either the
subindex 0 is the only variable defined for an index or subindex 0 defines the highest
subindex existing for an index.
It is recommended to use the latter approach and create subindices starting from 1. If
you really want to use CANopen, the program will calculate the correct value of subindex
0 in this case.
Similar to variable groups you can use index as a grouping mechanism for many sub-
indices. It would probably be a good idea to store all variables with the same index in the
same variable group.
Organization of predefined variables
For the predefined variables every variable group contains exactly one index with all its
sub-indices.
Variable import
It is possible to import variables from another project or via a .csv file with parameters for
variables. This way large amounts of variables can be created quickly. The .csv file has to
look like this:
Variable;Index;Sub-
Index;Owner;Group;Property_Description;Data-
Type;Length;Access Type;Min Val;Max Value;Default
Value;Initialize Value As Invalid;Remanant;Force writing
test1;0x3011;0x01;;;;INTEGER;8;;;;;TRUE;FALSE;FALSE
test2;0x3011;0x02;;;;INTEGER;16;;;;;TRUE;FALSE;FALSE
test3;0x3011;0x03;;;;INTEGER;8;;;;;TRUE;FALSE;FALSE
146