Skip to content

Version_LoadProcedure

thewhobox edited this page Oct 19, 2022 · 1 revision

Overview
This is the view where you can edit your LoadProcedure.
A LoadProcedure defines how the parameter get into your devices memory.

Implemented Procedures

On the right you can see already implemented Prodecures by your MaskVersion.
Each device has a procedure to unload or load it.

Unload means free the memory space (if relative memory is used) and set all tables to unloaded.
This means your devices application won't start.

There are three types of LoadProcedures:

  • Default
  • Product
  • Merge

Default
When you use a default LoadProcedure it means you will use the one in the MaskVersion.

Product
This means you have a complete LoadProcedure in your KnxProd.
Below you find a sample LoadProcedure.

<LoadProcedures>
  <LoadProcedure>
    <LdCtrlConnect />
    <LdCtrlCompareProp ObjIdx="0" PropId="78" InlineData="00000000022500000000" />
    <LdCtrlUnload LsmIdx="1" />
    <LdCtrlUnload LsmIdx="2" />
    <LdCtrlUnload LsmIdx="3" />
    <LdCtrlLoad LsmIdx="1" />
    <LdCtrlAbsSegment LsmIdx="1" SegType="0" Address="16384" Size="513" Access="255" MemType="3" SegFlags="128" />
    <LdCtrlTaskSegment LsmIdx="1" Address="16384" />
    <LdCtrlLoadCompleted LsmIdx="1" />
    <LdCtrlLoad LsmIdx="2" />
    <LdCtrlAbsSegment LsmIdx="2" SegType="0" Address="16897" Size="511" Access="255" MemType="3" SegFlags="128" />
    <LdCtrlTaskSegment LsmIdx="2" Address="16897" />
    <LdCtrlLoadCompleted LsmIdx="2" />
    <LdCtrlLoad LsmIdx="3" />
    <LdCtrlAbsSegment LsmIdx="3" SegType="0" Address="1792" Size="152" Access="0" MemType="2" SegFlags="0" />
    <LdCtrlAbsSegment LsmIdx="3" SegType="1" Address="1944" Size="1" Access="0" MemType="2" SegFlags="0" />
    <LdCtrlAbsSegment LsmIdx="3" SegType="0" Address="17408" Size="394" Access="255" MemType="3" SegFlags="128" />
    <LdCtrlTaskSegment LsmIdx="3" Address="17408" />
    <LdCtrlLoadCompleted LsmIdx="3" />
    <LdCtrlRestart />
    <LdCtrlDisconnect />
  </LoadProcedure>
</LoadProcedures>

Merge
This is the most complicated procedure where you merge the one you have in your KnxProd into the one of the MaskVersion.

<LdCtrlConnect />
<LdCtrlMerge MergeId="1" />
<LdCtrlMapError OriginalError="3221498632" MappedError="0" />
<LdCtrlUnload LsmIdx="5" />
<LdCtrlMapError OriginalError="3221498632" MappedError="3221498632" />
<LdCtrlUnload LsmIdx="4" />
<LdCtrlUnload LsmIdx="3" />
[...]
<LdCtrlLoadCompleted LsmIdx="2" />
<LdCtrlLoadCompleted LsmIdx="1" />
<LdCtrlMerge MergeId="6" />
<LdCtrlMerge MergeId="7" />
<LdCtrlRestart />

This is a sample of a MergeProcedure in the MaskVersion.
You can now merge your own instruction into this Procedure by using the MergeId:

<LoadProcedures>
  <LoadProcedure MergeId="2">
    <LdCtrlRelSegment LsmIdx="4" Size="256" Mode="0" Fill="0" />
    <LdCtrlCompareProp InlineData="00FA020723" ObjIdx="4" PropId="13">
      <OnError Cause="CompareMismatch" MessageRef="1" />
    </LdCtrlCompareProp>
  </LoadProcedure>
  <LoadProcedure MergeId="4">
    <LdCtrlWriteRelMem ObjIdx="4" Offset="0" Size="256" Verify="false" />
  </LoadProcedure>
</LoadProcedures>

For example if you combine this two Merges:

<LdCtrlConnect />
<LdCtrlMerge MergeId="1" />
<LdCtrlRestart />

and

<LoadProcedures>
  <LoadProcedure MergeId="1">
    <LdCtrlWriteRelMem ObjIdx="4" Offset="0" Size="256" Verify="false" />
  </LoadProcedure>
</LoadProcedures>

it will result in this:

<LdCtrlConnect />
<LdCtrlWriteRelMem ObjIdx="4" Offset="0" Size="256" Verify="false" />
<LdCtrlRestart />

More Info

Choose
You can also use chooses in your LoadProcedure:

<LoadProcedures>
  <LoadProcedure>
    <LdCtrlConnect />
    [...]
    <choose RefId="M-00FA_A-0001-01-0000_P-1_R-1">
        <when test="1">
            <LdCtrlAbsSegment LsmIdx="3" SegType="0" Address="1792" Size="152" Access="0" MemType="2" SegFlags="0" />
        </when>
    </choose>
    [...]
    <LdCtrlLoadCompleted LsmIdx="3" />
    <LdCtrlRestart />
    <LdCtrlDisconnect />
  </LoadProcedure>
</LoadProcedures>

With this technice you can also download only a small part of your application.
Like if your device stores custom data (timers, variables the user can change on the device) you can create a parameter and ask the user if he wants to overwrite those settings or keep them.

Messages
Sometimes you need to make sure the device fits the application.
You can use LdCtrlCompareProp for example.
It reads the Property and compares with the InlineData.
If it fails you can also show a customized Message:

<LdCtrlCompareProp InlineData="00000000000127" ObjIdx="0" PropId="78">
  <OnError Cause="CompareMismatch" MessageRef="M-00FA_A-0001-01-0000_M-1" />
</LdCtrlCompareProp>

See Message for more info.

Partial Download

This requires more to do in the LoadProcedure.

Let's go

If you checked "activate Messages" start now with your first Message.
Otherwise go next with Dynamic.

Clone this wiki locally