As it mentioned e.g. for the Altera Nios II: there are the designs of cn and mn nodes with respectively the demo mn and cn embedded applications.
There is not the design and/or stack library configuration for cn in hybrid design, so my question is: would it be the implementation of the cn on hybrid design and its stack configuration in the future.
It would be nice to test e.g. the time required between Preq and Pres when the kernel side of the mn and cn is running on microblaze .
Best regards,
Hassen
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thank you for answer. I used the patch below to generate the library liboplkcnapp-kernelpcp.a required for the compiling of the demo_cn_console in "Kernel stack on Zynq PCP".
I used the same module "oplkmnzynqintf.ko" generated in mn-demo and hardware configuration to run the Zynq hybrid as cn and the mn in PC
The stack initialisation and PDO mapping is correctly executed:
root@zc702-zynq7:/mnt/demo_cn_console# ./demo_cn_console
----------------------------------------------------
openPOWERLINK console CN DEMO application
Using openPOWERLINK stack: V2.6.1
----------------------------------------------------
2016/06/09-17:09:22 INFO GENERIC demo_cn_console: Stack version:V2.6.1 Stack configuration:0x0000000A
Initializing openPOWERLINK stack...
2016/06/09-17:09:22 INFO CONTROL Initializing openPOWERLINK stack
Initializing process image...
Size of process image: Input = 1 Output = 1
2016/06/09-17:09:24 INFO GENERIC Allocating process image: Input:1 Output:1
Linking process image vars:
Linking process vars... ok
Start POWERLINK stack... ok
Digital I/O interface with openPOWERLINK is ready!
-------------------------------
Press Esc to leave the program
Press r to reset the node
Press i to increase the digital input
Press d to decrease the digital input
Press p to print the digital outputs
-------------------------------
2016/06/09-17:09:24 EVENT STATE_CHANGE NmtGsOff->NmtGsInitializing Originating event:NmtEventSwReset
Stack entered state: NmtGsInitializing
2016/06/09-17:09:24 EVENT STATE_CHANGE NmtGsInitializing->NmtGsResetApplication Originating event:NmtEventEnterResetApp
Stack entered state: NmtGsResetApplication
2016/06/09-17:09:24 EVENT STATE_CHANGE NmtGsResetApplication->NmtGsResetCommunication Originating event:NmtEventEnterResetCom
Stack entered state: NmtGsResetCommunication
ifconfig: SIOCSIFFLAGS: Cannot assign requested address
Synchronous data thread is starting...
2016/06/09-17:09:25 EVENT STATE_CHANGE NmtGsResetCommunication->NmtGsResetConfiguration Originating event:NmtEventEnterResetConfig
Stack entered state: NmtGsResetConfiguration
2016/06/09-17:09:25 EVENT STATE_CHANGE NmtGsResetConfiguration->NmtCsNotActive Originating event:NmtEventEnterCsNotActive
Stack entered state: NmtCsNotActive
2016/06/09-17:09:25 EVENT STATE_CHANGE NmtCsNotActive->NmtCsPreOperational1 Originating event:NmtEventDllCeSoc
Stack entered state: NmtCsPreOperational1
2016/06/09-17:09:25 EVENT STATE_CHANGE NmtCsPreOperational1->NmtCsPreOperational2 Originating event:NmtEventDllCeSoc
Stack entered state: NmtCsPreOperational2
2016/06/09-17:09:30 EVENT PDO_CHANGE RPDO = 0x1600 to node 0 with 1 objects activated
2016/06/09-17:09:30 INFO PDOMAP 0x1600/1 Mapped object 0x6200/ 1
2016/06/09-17:09:30 EVENT PDO_CHANGE TPDO = 0x1A00 to node 0 with 1 objects activated
2016/06/09-17:09:30 INFO PDOMAP 0x1a00/1 Mapped object 0x6000/ 1
ifconfig: SIOCSIFFLAGS: Cannot assign requested address
2016/06/09-17:09:31 EVENT PDO_CHANGE RPDO = 0x1600 to node 0 with 1 objects activated
2016/06/09-17:09:31 INFO PDOMAP 0x1600/1 Mapped object 0x6200/ 1
2016/06/09-17:09:31 EVENT PDO_CHANGE TPDO = 0x1A00 to node 0 with 1 objects activated
2016/06/09-17:09:31 INFO PDOMAP 0x1a00/1 Mapped object 0x6000/ 1
2016/06/09-17:09:32 EVENT STATE_CHANGE NmtCsPreOperational2->NmtGsResetConfiguration Originating event:NmtEventResetConfig
Stack entered state: NmtGsResetConfiguration
2016/06/09-17:09:32 EVENT STATE_CHANGE NmtGsResetConfiguration->NmtCsNotActive Originating event:NmtEventEnterCsNotActive
Stack entered state: NmtCsNotActive
2016/06/09-17:09:32 EVENT STATE_CHANGE NmtCsNotActive->NmtCsPreOperational1 Originating event:NmtEventDllCeSoc
Stack entered state: NmtCsPreOperational1
2016/06/09-17:09:32 EVENT STATE_CHANGE NmtCsPreOperational1->NmtCsPreOperational2 Originating event:NmtEventDllCeSoc
Stack entered state: NmtCsPreOperational2
2016/06/09-17:09:32 EVENT STATE_CHANGE NmtCsPreOperational2->NmtCsReadyToOperate Originating event:NmtEventEnableReadyToOperate
Stack entered state: NmtCsReadyToOperate
2016/06/09-17:09:33 EVENT STATE_CHANGE NmtCsReadyToOperate->NmtCsOperational Originating event:NmtEventStartNode
Stack entered state: **NmtCsOperational**
The stack is correctly initialized and running ( I think so ).
Capturing the traffic with wireshark it shows the SoC, PReq, PRes and SoA in correct order.
The problem is in each PReq in wireshark we have a new PDO from MN but the CN does not get the value of this PDO ( it prints always --------) and sends always the 0 value in PRes, also when incrementing or decreasing !
through debugging I get this error (when calling the oplk_waitSyncEvent(100000) in app.c :
k2uEventFetchThread(): Error in retrieving kernel to user event!!
timesyncucal_waitSyncEvent: ret=-1
waitsync ret=0xd
I do not know why the cn could not get the PDO received and stored in the shared memory ?
The Output of the CN should be looped back to the MN for getting the desired PDO data in PRes frame.
Here is an example application of MN (Refer to the patch attached) for looping the data.
The CN fails at the start of the processSync to get the sync event from the shared memroy. I assume it is a configuration issue in the driver side of the linux to communicate with the PCP.
It is odd but after like every 70-100 Cycle, the CN runs the timesyncucal_waitSyncEvent once successfully!
tOplkError timesyncucal_waitSyncEvent(ULONG timeout_p)
{
int ret;
**ret = ioctl(fd_l, PLK_CMD_TIMESYNC_SYNC, timeout_p);**
if (ret == 0)
return kErrorOk;
return kErrorGeneralError;
I tried your suggestion in the MN side which is running on PC and I got the same problem.
Best regards,
Hassen
Last edit: Hassen G 2018-02-12
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
We see that it requires modification in the Microblaze side of the Zynq hybrid design to make it act as CN. This must be a complete new implementation of the design.
I am working now on adapting this design as CN, so it would be helpful if you may share informations about the modifications that should take place in this design ( in which level, components ..)
I may try to modify the design of the microblaze and let you know my progress.
Best regards,
Hassen
Last edit: Hassen G 2018-04-12
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
As it mentioned e.g. for the Altera Nios II: there are the designs of cn and mn nodes with respectively the demo mn and cn embedded applications.
There is not the design and/or stack library configuration for cn in hybrid design, so my question is: would it be the implementation of the cn on hybrid design and its stack configuration in the future.
It would be nice to test e.g. the time required between Preq and Pres when the kernel side of the mn and cn is running on microblaze .
Best regards,
Hassen
Hi Hassen,
The Zynq hybrid MN can act as CN if the node ID is set as required. (Other than the MN's Node ID).
Thanks,
Powerlink-Team-Kalycito
Hi Kalycito,
Thank you for answer. I used the patch below to generate the library liboplkcnapp-kernelpcp.a required for the compiling of the demo_cn_console in "Kernel stack on Zynq PCP".
I used the same module "oplkmnzynqintf.ko" generated in mn-demo and hardware configuration to run the Zynq hybrid as cn and the mn in PC
The stack initialisation and PDO mapping is correctly executed:
MN output in PC:
CN output in Zynq Hybrid ;
The stack is correctly initialized and running ( I think so ).
Capturing the traffic with wireshark it shows the SoC, PReq, PRes and SoA in correct order.
The problem is in each PReq in wireshark we have a new PDO from MN but the CN does not get the value of this PDO ( it prints always --------) and sends always the 0 value in PRes, also when incrementing or decreasing !
through debugging I get this error (when calling the oplk_waitSyncEvent(100000) in app.c :
I do not know why the cn could not get the PDO received and stored in the shared memory ?
Best regards,
Hassen
Hi Hassen,
The Output of the CN should be looped back to the MN for getting the desired PDO data in PRes frame.
Here is an example application of MN (Refer to the patch attached) for looping the data.
Kindly make a try and let us know your progress.
Thanks,
Powerlink-Team-Kalycito
Hi Team Kalycito,
Thank you for the response.
The CN fails at the start of the processSync to get the sync event from the shared memroy. I assume it is a configuration issue in the driver side of the linux to communicate with the PCP.
It is odd but after like every 70-100 Cycle, the CN runs the timesyncucal_waitSyncEvent once successfully!
I tried your suggestion in the MN side which is running on PC and I got the same problem.
Best regards,
Hassen
Last edit: Hassen G 2018-02-12
Hi Hassen,
We see that it requires modification in the Microblaze side of the Zynq hybrid design to make it act as CN. This must be a complete new implementation of the design.
We have logged this bug in Github https://github.com/OpenAutomationTechnologies/openPOWERLINK_V2/issues/345 . You can track the status of the bug in Github.
Thanks,
Powerlink-Team-Kalycito
Hi Powerlink-Team-Kalycito,
Thank you for your reply.
I am working now on adapting this design as CN, so it would be helpful if you may share informations about the modifications that should take place in this design ( in which level, components ..)
I may try to modify the design of the microblaze and let you know my progress.
Best regards,
Hassen
Last edit: Hassen G 2018-04-12
hi,Hassen G and Powerlink-team Kalycito
Have you already adapted the Zynq Hybrid Design as CN?
Hi liu zhi qiang,
We are currently implementing Zynq Hybrid (in Zc702) as CN. We will update the status in the bug once the implementation is available.
Thanks,
Powerlink-Team-Kalycito