Here the object type = 8 means an array of values of the same data type = 6, which means unsigned 16.
If I want to change the object type = 9 because I want to specify a structure of values of different types. What should I do with dataType? Should I just leave it out? See below...
Please note that the objects in the 0x6XXX are specified device profile objects. You can either use the device profile objects that suit you datatype needs or create your own objects within 0x2XXX object range.
br
Christoph
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
If have a record consisting of 4 subobjects, the first object is a UINT32 and the rest is UINT16, then what should be the entrySize_p? According to the documentation, entrySize_p is defined as "the size of one process variable", I am confused because I don't know which process variable I should use.
Thanks,
Simon
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
In this case you have to link each sub-object individually, therefore pVarEntries_p is 1 for each function call. The pVarEntries_p argument can only be > 1, if you link an arry to a set of subindices (with the same size).
Alternatively, you can use oplk_linkObject() to link variables to a certain address instead of linking it to the process image. However, you will have the same restriction (records are not likable with only one call) in this case.
Best regards,
Michael
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
In one of the demo xdd file, under the Standardised Device Profile Area, we have a line like this...
<Object index="6200" name="DigitalOutput_00h_AU8" objectType="8" dataType="0006">
Here the object type = 8 means an array of values of the same data type = 6, which means unsigned 16.
If I want to change the object type = 9 because I want to specify a structure of values of different types. What should I do with dataType? Should I just leave it out? See below...
<Object index="6200" name="DigitalOutput_00h_AU8" objectType="9" dataType="????"">
Thanks,
Simon
Hello Simon,
Yes, you can leave the dataType.
It is not mandatory to specify the dataType if the objectType is a record.
Eg:
<Object index="6200" name="DigitalOutput_00h_AU8" objectType="9">
Regards,
Powerlink-Team-Klaycito
Hello Simon,
Please note that the objects in the 0x6XXX are specified device profile objects. You can either use the device profile objects that suit you datatype needs or create your own objects within 0x2XXX object range.
br
Christoph
Hi,
As a follow-up, I have a question about the following API which is found in app.c in the demo_cn_console folder:
tOplkError oplk_linkProcessImageObject (
UINT objIndex_p,
UINT firstSubindex_p,
UINT offsetPI_p,
BOOL fOutputPI_p,
tObdSize entrySize_p,
UINT * pVarEntries_p
)
If have a record consisting of 4 subobjects, the first object is a UINT32 and the rest is UINT16, then what should be the entrySize_p? According to the documentation, entrySize_p is defined as "the size of one process variable", I am confused because I don't know which process variable I should use.
Thanks,
Simon
Hello Simon,
In this case you have to link each sub-object individually, therefore pVarEntries_p is 1 for each function call. The pVarEntries_p argument can only be > 1, if you link an arry to a set of subindices (with the same size).
Alternatively, you can use oplk_linkObject() to link variables to a certain address instead of linking it to the process image. However, you will have the same restriction (records are not likable with only one call) in this case.
Best regards,
Michael