Application Examples
Introduction
The unified GOAL POWERLINK layer provides a common interface to all adapted POWERLINK stacks by using the same API in single core mode and also via GOALs Core To Core for multiple cores.
Application description
The GOAL POWERLINK stack comes with ready to run examples in the folder appl/goal_epl. A corresponding Device Description File can be found in the sub-directory design.
appl/goal_pnio/00_rpc_cc (only available for Core To Core)
This application must be run on the communication core of a device. It provides the functionality for all other examples to the application core. It is not restricted to the examples but also provides the full GOAL POWERLINK functionality to the user application.
appl/goal_epl/01_cn1
This is a simple example of a Controlled Node. It’s object dictionary has been created with Port's POWERLINK Design Tool and is placed in sub-directory design.
The example offers several objects of different lengths for testing. Each object of the Manufacturer Specific Profile Area (0x2000 .. 0x5FFF) consists of 25 sub-indexes.
Objects of 01_cn1 | |||
---|---|---|---|
Object Index | size [bytes] | C variable | Access |
0x3001 | 1 | arr_bool | RW |
0x3005 | 1 | arr_u8 | RW |
0x3006 | 2 | arr_u16 | RW |
0x3007 | 4 | arr_u32 | RW |
0x3008 | 8 | arr_u64 | RW |
| |||
0x6000 | 1 | dig_in_byte | RO |
0x6200 | 1 | dig_out_byte | RW |
0x6400 | 2 | wDigIn16 | RW |
0x6600 | 2 | wDigOut16 | RW |
The node number EplNodeId
is set to 1 in goal_appl.c.
The application provides several callback handlers in usr_ind.c for interacting. Data mirroring is supported in goal_eplNewPdoValueInd()
for following objects
0x3007:01 (data in arr_u32[0]) to 0x3007:02 (data in arr_u32[1])
0x3007:03 (data in arr_u32[3]) to 0x3007:04 (data in arr_u32[2])
0x3007:05 (data in arr_u32[5]) to 0x3007:06 (data in arr_u32[4])
0x3007:07 (data in arr_u32[7]) to 0x3007:08 (data in arr_u32[6])
Please note, that PL_CONFIG_PDO_INDICATION must be defined to execute the relevant callback.