Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

ptSetConfig->bSwRevisionPrefix  = IM0.tSoftwareRevision.bPrefix;

3. GSDML

In the GSDML the device developer need to give the information, which modul has I&M data. Default in PNS V5.1.0.4 is at the moment on DAP:

<VirtualSubmoduleItem ID="DIM 31" IM5_Supported="false" MayIssueProcessAlarm="false" SubmoduleIdentNumber="0x00003010" Writeable_IM_Records="1 2 3">

That means, I&M0 till 3 is supported. I&M4 till 5 are not supported. Only the DAP Modul has I&M Data.


It is possbile to use the Writeable_IM_Records="1 2 3 4" on a mould. For example:

<VirtualSubmoduleItem ID="10byteinput" MayIssueProcessAlarm="false" SubmoduleIdentNumber="0x00000001" Writeable_IM_Records="1 2">

Thas means the DAP has now I&M0 till 3 and the 10 Byte Input modul has it own dataset for I&M0 till 2. In this case the application need to implement the I&M handling

4. Indications

Implement the packet handler Indications for

PNS_IF_READ_IM_IND

PNS_IF_WRITE_IM_IND


The stack does not know anything about the GSDML file. The stack needs first the information about supported I&M data. For that the stack sens  in startup the

PNS_IF_READ_IM_IND with the parameter PNS_IF_IM_TYPE_IM0FILTER. That means the stack wants to get from the application the information which Modul does support I&M data.

The application can response with some flags.

For Example the stack as for Slot 0 and Subslot 1 (DAP):

Send Back:

ptReadImRes->tData.tData.atIM0FilterData[0].ulFlags = PNS_IF_IM0_FILTER_DATA_HAS_IM_DATA | PNS_IF_IM0_FILTER_DATA_MODULE_REF | PNS_IF_IM0_FILTER_DATA_DEVICE_REF;


PNS_IF_IM0_FILTER_DATA_HAS_IM_DATA means, that the Modul has own I&M Data:

Image Added

PNS_IF_IM0_FILTER_DATA_MODULE_REF means, that the I&M data of this Modul are the reference for all Submoduls which belong to this modul:

Image Added

PNS_IF_IM0_FILTER_DATA_DEVICE_REF this is used only one time (on the DAP) and means, that all other Moduls and Submoduls without own I&M data willrefer to this modul:

Image Added



That means GSDML with

DAP: <VirtualSubmoduleItem ID="DIM 31" IM5_Supported="false" MayIssueProcessAlarm="false" SubmoduleIdentNumber="0x00003010" Writeable_IM_Records="1 2 3">

For Slot 0 Subslot 1

ptReadImRes->tData.tData.atIM0FilterData[0].ulFlags = PNS_IF_IM0_FILTER_DATA_HAS_IM_DATA | PNS_IF_IM0_FILTER_DATA_MODULE_REF | PNS_IF_IM0_FILTER_DATA_DEVICE_REF;


Modul: <VirtualSubmoduleItem ID="10byteinput" MayIssueProcessAlarm="false" SubmoduleIdentNumber="0x00000001" Writeable_IM_Records="1 2 ">

For Slot 2 Subslot 1

ptReadImRes->tData.tData.atIM0FilterData[0].ulFlags = PNS_IF_IM0_FILTER_DATA_HAS_IM_DATA | PNS_IF_IM0_FILTER_DATA_MODULE_REF;

Image Added

(For the Modul not marked yellow only ptReadImRes->tData.tData.atIM0FilterData[0].ulFlags = PNS_IF_IM0_FILTER_DATA_HAS_IM_DATA; is necessary, because no submoduls)


More informations to I&M can be found on How to deal with I&M data? (Updated 2016-12-20)

5. Indication implementation

I&M0 is allways only read. In a PNS_IF_WRITE_IM_IND comes for I&M0, than this can not be correct. I&M0 has the value usIMRevisionCounter. This must be updatet as soon as I&M1 till 4 go written.

I&M1 till 4 is read/write and need to be saved remanent on the application flash

I&M5 is allwasy only read.

That means each write and read can come for a slot with a subslot and the application need to ckeck if the combination of reaquested slot and sbuslot, write or read is really possbile.

6. TIA Portal read I&M0