Hi, I want to use open powerlink as communication between 2 normal pc's. I want to define a data structure of which instances are transmitted from the managing node to a controled node. By the way, I am completely beginner with powerlink and field buses. I started experiments using open powerlink demo 2.2.1 and open configurator 2.0.0.
As a first step I want to add one object of type real32. As far as I understood I have to define an object within the xdc/xdd file for the controlled node and need to add support for the real32 data type for the managing node. I had that information from the open configurator forum, there is a topic about real32 support.
For the controlled node I added the following code to the xdc file:
I am able to build a cdc file with open configurator 2.0.0 without any errors.
Unfortunately during runtime that did not work: when I start the managing node, the following is reported:
...
2016/03/07-20:29:12.939 - PDO change event: (TPDO = 0x1a00 to node 0x01 with 2 objects activated)
2016/03/07-20:29:12.939 - 1. mapped object 0xa040/0001
2016/03/07-20:29:12.939 - 2. mapped object 0x0000/0000
...
2016/03/07-20:29:13.451 - Err/Warn: Source = EventSourceObdu (0x14) OplkError = The referenced object in a PDO mapping does not exist (0x0b9)
2016/03/07-20:29:13.465 - val = 1a00
...
The 1st mapped object is an unsigned8. The 2nd is the real object. It seams that the address of the dynamic channel are not properly configured for successful lookup.
When I switch the data type of the object to unsigned8 (which is used within the demo sample) everything works fine.
Is there any other place where I had to configure the data type support?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Wolfgang, thank you for your answer! I am sorry for my late answer, it's just my monday business :-/
I did not add according objects to the object dictionary of the MN. Is this necessary?
As far as I understood the demo application, the configured objects for transfer are just configured in the xdc files for the CNs but not in the xdc for the MN, e.g.:
Thus I thought the dynamic channel mechanism (magic) does this on MN side as the reported addresses match:
PDO change event: (RPDO = 0x1600 to node 0x01 with 1 objects activated)
1. mapped object 0xa4c0/0001
PDO change event: (RPDO = 0x1601 to node 0x20 with 1 objects activated)
1. mapped object 0xa4c0/0002
PDO change event: (TPDO = 0x1a00 to node 0x01 with 2 objects activated)
1. mapped object 0xa040/0001
If I switch the data type of my object from real32 to unsigned8 the MN will report during startup an address from the according dynamic channel:
2. mapped object 0xa040/0002
instead of:
2. mapped object 0x0000/0000
Did I get here something wrong?
You mentioned the file objdict.h. Do it need to exist? It does not exist within the demo application and I thought the object dictionary is contained within the cdc file?
kind regards and thanks in advance!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
yes, it is necessary that you add the objects also to the node's object dictionary, which is in fact the objdict.h header file. Without adding them to the header file you very likely face similar errors as you have posted initially (object does not exist).
You can find object dictionaries for the MN and the CN in the repository:
objdicts/CiA302-4_MN/objdict.h
objdicts/CiA401_CN/objdict.h
Note that they are compiled into the stack libraries so if you update them, you need to recompile the stack libraries.
We usually do lots of magic, but also the dynamic channels need to be added to the objdict.h of the MN as well :-)
The cdc file you mentioned assigns the values to the MN's object dictionary according to the network configuration.
Best regards
Joerg
Last edit: Joerg Zelenka 2016-03-15
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
many thanks for your answer! I've added the object to the controled node objdict.h and the dynamic channel for real32 support to the managed node objdict.h. Now the managed node reports a valid address from the dynamic channel for the real32 object.
When a controled node with an real32 object connects, the managed node reports an error (E_NMT_BPO1_CF_VERIFY) during the CMF progress when processing the object with real32 datatype (in my case an RPDO on 1600/2). I guess I need some debugging sessions to figure out what happens and then I will ask again :D
thanks again and kind regards!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Tobi,
The E_NMT_BPO1_CF_VERIFY usually links to a wrong configuration. Can you please attach the openCONFIGURATOR project for me to verify that there is not misconfiguration happening.
Best regards
Christoph
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
<!-- add REAL32 support --><dynamicChannelaccessType="readOnly"addressOffset="0000"bitAlignment="0"dataType="0008"maxNumber="1016"startIndex="A900"endIndex="A903"/><dynamicChannelaccessType="readWriteOutput"addressOffset="0000"bitAlignment="0"dataType="0008"maxNumber="1016"startIndex="A910"endIndex="A913"/>
add object definition to xdc file of controlled node
Hi, I am still stuck at the same problem: when a controlled node with a configured real32 value connects, the E_NMT_BPO1_CF_VERIFY error occurs during the CMF progress.
Does anyone has some hints to isolate the problem? Important configuration options, objects/subobject values in object dictionary or source code lines/functions?
As you are using the real32 objects as RPDO, please update the object dictionary defines for the subindexes to support RW permission for the objects by using kObdAccVPRW instead of kObdAccVPR
Hi Powerlink team!
Thanks a million for your answer! The missing write permission was causing my configuration problem. Now the controlled nodes connect successfully and data transfer starts.
But unfortunately I am unable to transmit real values :-( It seams there is something wrong the process image object linking.
I took the provided demo as example. If I configure 2 digital output values (subindex 1 and 2 of object 6200) to be send to controlled node 1 (RPDO), both values correctly are transmitted and received. And controlled node 32 still receives their one digital output (RPDO, subindex 1 of object 6200).
If I configure 1 digital output (byte, subindex 1 of object 6200) and a real value (both RPDO), controlled node 1 just receives the digital output (byte), the real value is always zero (0). And in addition, controlled node 32 doesn't receives its one digital output (RPDO).
I use the open configurator generated xap.h for the managed node. The process image struct definition for the controlled node 1 I changed manually (add the real values as unsigned int with 32 bits).
Do you have any idea whats happening and where to look?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Good to hear that the conifugration issue in now resolved!!!
Just to be sure:
After generating the new configuration (cdc) you replace the xap.h in the apps\demo_mn_console\src directoty and compile the application again right?
I don't think the modification in the xap.h is required as the varibles would already be configured as unsigned 32 bit. Any specific reasons for this change?
Regards,
POWERLINK Team,
Kalycito
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
replace generated xap.h in apps\demo_mn_console\src
modified function processSync in managed node to send a value to controlled node 1
modified process image struct and init process image function for controlled node 1
typedefstruct{BYTEdigitalOut;// the real value just for cn 1, not for cn 32unsignedtestReal1:32;}PI_OUT;// link process image object containing digital outputvarEntries=1;ret=oplk_linkProcessImageObject(0x6200,0x01,0,TRUE,obdSize,&varEntries);// link process image object containing real value (just cn1, not cn32)ret=oplk_linkProcessImageObject(0x6600,0x01,1,TRUE,4,&varEntries);
controlled node 32 uses the following process image struct and the link process image object call
typedefstruct{BYTEdigitalOut;}// link digital output objectvarEntries=1;ret=oplk_linkProcessImageObject(0x6200,0x01,0,TRUE,1,&varEntries);
Note: I defined an array object at index 6600 with 2 subindexes with real32 data type to exclude differences in handling between array object types and struct object types (my object definition at index 2200). But in both cases I got the same result.
My results:
managed node starts
controlled node 1 and 32 successfully connect
managed node sends the digital output values of the demo application to node 1 or node 32, and additionally the value 0xAAAAAAAA as 'real' value to node 1
controlled node 1 receives the digital output of the demo application, the real value is always zero (0)
controlled node 32 does not receive the digital output of the demo application, instead it receives the value 170
but when I use the sources of controlled node 32 for controlled node 1, controlled node 1 receives the digital output value
It seams that the value 170 node 32 is receiving is some piece of the real value send to node 1. Did I do something wrong? Do you have any idea what goes wrong? Or where should I take a closer look?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
I know this thread is old and may be closed for more that two years. I am still hopeing that someone can help me. I am facing the same issue, when I change the object type, the controlled node doesn't recieve the value correctly. I changed the xap.h on the managing node, app.c on both the managing and the controlled. I made sure that the object is exisiting in the object dictionary header file. What else need to be done?
Thanks in advance!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
To help you further, we would require versions of the openPOWERLINK stack and openCONFIGURATOR plugin that you are using. Also let us know the object / sub-object index and its datatype. Share us debug log and wireshark trace to support you better.
Regards,
Powerlink-Team-Kalycito
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi, I want to use open powerlink as communication between 2 normal pc's. I want to define a data structure of which instances are transmitted from the managing node to a controled node. By the way, I am completely beginner with powerlink and field buses. I started experiments using open powerlink demo 2.2.1 and open configurator 2.0.0.
As a first step I want to add one object of type real32. As far as I understood I have to define an object within the xdc/xdd file for the controlled node and need to add support for the real32 data type for the managing node. I had that information from the open configurator forum, there is a topic about real32 support.
For the controlled node I added the following code to the xdc file:
For the managing node I had to enable the data type real32 in the xdc:
I am able to build a cdc file with open configurator 2.0.0 without any errors.
Unfortunately during runtime that did not work: when I start the managing node, the following is reported:
The 1st mapped object is an unsigned8. The 2nd is the real object. It seams that the address of the dynamic channel are not properly configured for successful lookup.
When I switch the data type of the object to unsigned8 (which is used within the demo sample) everything works fine.
Is there any other place where I had to configure the data type support?
Hi Tobi,
Did you add according objects also to the object dictionary of your MN (i.e. in the objdict.h file)?
Regards,
Wolfgang
Hi Wolfgang, thank you for your answer! I am sorry for my late answer, it's just my monday business :-/
I did not add according objects to the object dictionary of the MN. Is this necessary?
As far as I understood the demo application, the configured objects for transfer are just configured in the xdc files for the CNs but not in the xdc for the MN, e.g.:
Thus I thought the dynamic channel mechanism (magic) does this on MN side as the reported addresses match:
If I switch the data type of my object from real32 to unsigned8 the MN will report during startup an address from the according dynamic channel:
instead of:
Did I get here something wrong?
You mentioned the file objdict.h. Do it need to exist? It does not exist within the demo application and I thought the object dictionary is contained within the cdc file?
kind regards and thanks in advance!
Hi Tobi,
yes, it is necessary that you add the objects also to the node's object dictionary, which is in fact the objdict.h header file. Without adding them to the header file you very likely face similar errors as you have posted initially (object does not exist).
You can find object dictionaries for the MN and the CN in the repository:
Note that they are compiled into the stack libraries so if you update them, you need to recompile the stack libraries.
We usually do lots of magic, but also the dynamic channels need to be added to the objdict.h of the MN as well :-)
The cdc file you mentioned assigns the values to the MN's object dictionary according to the network configuration.
Best regards
Joerg
Last edit: Joerg Zelenka 2016-03-15
Hi Joerg,
many thanks for your answer! I've added the object to the controled node objdict.h and the dynamic channel for real32 support to the managed node objdict.h. Now the managed node reports a valid address from the dynamic channel for the real32 object.
When a controled node with an real32 object connects, the managed node reports an error (E_NMT_BPO1_CF_VERIFY) during the CMF progress when processing the object with real32 datatype (in my case an RPDO on 1600/2). I guess I need some debugging sessions to figure out what happens and then I will ask again :D
thanks again and kind regards!
Hi Tobi,
The E_NMT_BPO1_CF_VERIFY usually links to a wrong configuration. Can you please attach the openCONFIGURATOR project for me to verify that there is not misconfiguration happening.
Best regards
Christoph
Hi Christoph,
thanks a lot for the offer to check my configuration! But sorry for my late reply, I was on vacation :-)
Please find attached the open configurator 2.0.0 project. Here is a summary of my changes:
objdict.h
objdict.h
With that changes, I thought, it should be possible send 2 real32 values from the managed node to one controlled node. I use open powerlink 2.2.2.
thanks in advance and kind regards!
Hi, I am still stuck at the same problem: when a controlled node with a configured real32 value connects, the E_NMT_BPO1_CF_VERIFY error occurs during the CMF progress.
Does anyone has some hints to isolate the problem? Important configuration options, objects/subobject values in object dictionary or source code lines/functions?
I appreciate any help! Kind regards
tobi
Hello Tobi,
As you are using the real32 objects as RPDO, please update the object dictionary defines for the subindexes to support RW permission for the objects by using
kObdAccVPRW
instead ofkObdAccVPR
Hope this should solve the issues. Please let us know your findings after the changes.
Regards,
POWERLINK Team,
Kalycito
Hi Powerlink team!
Thanks a million for your answer! The missing write permission was causing my configuration problem. Now the controlled nodes connect successfully and data transfer starts.
But unfortunately I am unable to transmit real values :-( It seams there is something wrong the process image object linking.
I took the provided demo as example. If I configure 2 digital output values (subindex 1 and 2 of object 6200) to be send to controlled node 1 (RPDO), both values correctly are transmitted and received. And controlled node 32 still receives their one digital output (RPDO, subindex 1 of object 6200).
If I configure 1 digital output (byte, subindex 1 of object 6200) and a real value (both RPDO), controlled node 1 just receives the digital output (byte), the real value is always zero (0). And in addition, controlled node 32 doesn't receives its one digital output (RPDO).
I use the open configurator generated xap.h for the managed node. The process image struct definition for the controlled node 1 I changed manually (add the real values as unsigned int with 32 bits).
Do you have any idea whats happening and where to look?
Hi Tobi,
Good to hear that the conifugration issue in now resolved!!!
Just to be sure:
After generating the new configuration (cdc) you replace the xap.h in the apps\demo_mn_console\src directoty and compile the application again right?
I don't think the modification in the xap.h is required as the varibles would already be configured as unsigned 32 bit. Any specific reasons for this change?
Regards,
POWERLINK Team,
Kalycito
Hi, thanks for your quick answer! Yes, I did replace the file xap.h in the src directory and recompiled it.
Well I guess my explaination was a too rough. Here are some details:
Note: I defined an array object at index 6600 with 2 subindexes with real32 data type to exclude differences in handling between array object types and struct object types (my object definition at index 2200). But in both cases I got the same result.
My results:
It seams that the value 170 node 32 is receiving is some piece of the real value send to node 1. Did I do something wrong? Do you have any idea what goes wrong? Or where should I take a closer look?
Hello,
I know this thread is old and may be closed for more that two years. I am still hopeing that someone can help me. I am facing the same issue, when I change the object type, the controlled node doesn't recieve the value correctly. I changed the xap.h on the managing node, app.c on both the managing and the controlled. I made sure that the object is exisiting in the object dictionary header file. What else need to be done?
Thanks in advance!
Hi Ahmed,
To help you further, we would require versions of the openPOWERLINK stack and openCONFIGURATOR plugin that you are using. Also let us know the object / sub-object index and its datatype. Share us debug log and wireshark trace to support you better.
Regards,
Powerlink-Team-Kalycito