|
<< Click to Display Table of Contents >> Navigation: Object Reference > Palette Objects > UT Primary View |
The UT Primary View object is similar to a frame object (even though it has to be put into a frame).
At development time it is nothing more but an empty frame; it will be filled with content at runtime when a UT pool was loaded.
With this property the CAN port number for the UT View can be specified.
Port Number 0: The default value. The CAN bus from which the ISOBUS UT pool is expected is managed with the variable @IsobusCanInterface
Port Number 1 - 4: The CAN bus 1 to 4 is used.
By default, there is only one instance of the ISOBUS environment running on device which can be configured using the predefined variables with index 0x2510 … 0x2530.
This instance is also required in cases where additional instances should be created as it maintains the common resources, such as alarm handling and gpsd for ground speed from a GNSS receiver.
There are two expected use cases for having more than one instance running in parallel:
•They should cover more than one physical bus, e.g. a vehicle-internal ISOBUS and one to connect implements.
•It’s desired to have two fully operational UTs on the same bus in parallel - i.e. two UTs with working inputs and softkeys, both guaranteed to be refreshed by the implement
The implemented approach starts additional full instances of the stack which then come with their own file server and TECU simulation.
An instance is started for every primary view defined in the project with a different ‘Port Number’.
The ‘default instance’ has to exist in any case where ISOBUS should be used in project and has to have ‘Port Number’ 0. This instance can be attached to any physical CAN bus via predefined variable @IsobusCanInterface. For all other instances the CAN interface is defined by the CAN Port Number set for the primary and secondary views in project.
Consequently, it is now allowed to have more than one primary view on every page - but they have to differ in ‘Port Number’.
Additionally, secondary views also have to be assigned to an instance by setting the Port Number.
As mentioned before, the CAN interface of additional instances cannot be configured at runtime but is determined by the ‘Port Number’ assigned in project.
Variables of the group ‘Alarm-Settings’ with index 0x2500 are shared among all instances - i.e. there is only one alarm that can be defined for all instances.
The same applies to the general GNSS receiver configuration in group ‘Ground-Speed-Settings’ with index 0x2530 and sub-index < 9.
All other configuration variables can be assigned to self-defined PClient variables (which should be defined as ‘remanent’ to get persistent settings). If they are not assigned, additional instances will also listen to the pre-defined UT configuration variables.
Assuming the variables exist, assignments have to be done by setting the combined key (calculated from index and sub-index) in project init script as properties of the primary view DDO defined for the ISOBUS instance in project.
To avoid dealing with this combined key directly, an additional function getVariableCombinedKey is provided to fetch this variable key using the variable name.
An example script setting all configuration variable via a primary view DDO with ID 363 looks like this:
// Assign separate variables for the CAN2 UT instance
// via properties of one of its primary views:
pclient.setProperty(363, "UT Button ISB State Var", pclient.getVariableCombinedKey("ut2_isb_state"));
pclient.setProperty(363, "UT Button Language Cmd Var", pclient.getVariableCombinedKey("ut2_trigger_lang_cmd"));
pclient.setProperty(363, "UT Button Focus Up Var", pclient.getVariableCombinedKey("ut2_focus_up"));
pclient.setProperty(363, "UT Button Focus Down Var", pclient.getVariableCombinedKey("ut2_focus_down"));
pclient.setProperty(363, "UT Button Cycle Pools Var", pclient.getVariableCombinedKey("ut2_cycle"));
pclient.setProperty(363, "UT Button Enter Var", pclient.getVariableCombinedKey("ut2_enter"));
pclient.setProperty(363, "UT Button Ack Var", pclient.getVariableCombinedKey("ut2_ack"));
pclient.setProperty(363, "UT Button ESC Var", pclient.getVariableCombinedKey("ut2_esc"));
pclient.setProperty(363, "UT Button Delete Pools Var", pclient.getVariableCombinedKey("ut2_delete_pools"));
pclient.setProperty(363, "UT Button Aux Config Var", pclient.getVariableCombinedKey("ut2_aux_config"));
pclient.setProperty(363, "UT Button Identify UTs Var", pclient.getVariableCombinedKey("ut2_identify"));
pclient.setProperty(363, "UT Manufacturer Var", pclient.getVariableCombinedKey("ut2_manufacturer"));
pclient.setProperty(363, "UT Ignition on Display Var", pclient.getVariableCombinedKey("ut2_ignition_on_display"));
pclient.setProperty(363, "UT Active Var", pclient.getVariableCombinedKey("ut2_ut_active"));
pclient.setProperty(363, "UT Number Var", pclient.getVariableCombinedKey("ut2_ut_number"));
pclient.setProperty(363, "UT Key Layout Var", pclient.getVariableCombinedKey("ut2_key_layout"));
pclient.setProperty(363, "UT Keys per Row Var", pclient.getVariableCombinedKey("ut2_keys_per_row"));
pclient.setProperty(363, "FS Active Var", pclient.getVariableCombinedKey("ut2_fs_active"));
pclient.setProperty(363, "FS Number Var", pclient.getVariableCombinedKey("ut2_fs_number"));
pclient.setProperty(363, "UT GNSS feeds Groundspeed Var", pclient.getVariableCombinedKey("ut2_gnss_feeds_groundspeed"));
pclient.setProperty(363, "UT GNSS feeds NMEA2000 Speed Var", pclient.getVariableCombinedKey("ut2_gnss_feeds_NMEA2000_speed"));
pclient.setProperty(363, "UT GNSS feeds NMEA2000 Pos Var", pclient.getVariableCombinedKey("ut2_gnss_feeds_NMEA2000_pos"));
// pclient.setProperty(363, , pclient.getVariableCombinedKey());
pclient.setProperty(363, "UT Variables Assignment Complete", true);
Note that finally the boolean property '"UT Variables Assignment Complete"' is set to true to trigger all values of the configuration variables to be applied initially.
Also note that all of these properties can be set via any primary view DDO assigned to the instance but cannot be read back (as they effectively are maintained by the underlying stack and not by the DDO).
An example implementation of a dual ISO solution can be found in the Welcome Project.