6 Using the CP 1616 as a PROFINET IO Controller/Device

6.4installing the PROFINET IO Sample Program (Suse Linux 9.2)

The “pniotest” sample program is restricted to the use of the CP1616 as controller.

Follow the steps outlined below

1.Run the “make test” command in the “/host -xxx/” (xxx = version -specific) directory.

2.Run the “./pniotest“ command in the “/host -xxx/testapps/” directory to start the program.

3.Settings:

Set the number of modules in pniotest.c in the /host -xxx/testapps/ path.

const PNIO_UINT32 g_deviceInputCount=3;

" Number of input

volatile PNIO_IOXS g_deviceInputState[g_deviceInputCount]=

modules

 

{PNIO_S_BAD,PNIO_S_BAD,PNIO_S_BAD};

" One PNIO_S_BAD per

PNIO_UINT32 g_deviceInputLength[g_deviceInputCount] ={ 1, 1, 1};

input module

 

PNIO_ADDR g_deviceInputAddress[g_deviceInputCount]=

" One “1“ per input

module

{

 

{ PNIO_ADDR_LOG, PNIO_IO_IN, 0},

 

{ PNIO_ADDR_LOG, PNIO_IO_IN, 1},

 

{ PNIO_ADDR_LOG, PNIO_IO_IN, 2}

" Address of 1st input

};

module

 

" Address of 2nd input

 

module

 

" Address of 3rd input

 

module

These settings must also be made for the output modules.

 

const PNIO_UINT32 g_deviceOutputCount=3;

" Number of output

 

modules

volatile PNIO_IOXS g_deviceOutputState[g_deviceOutputCount]=

" one PNIO_S_BAD per

{PNIO_S_BAD,PNIO_S_BAD,PNIO_S_BAD};

output module

PNIO_UINT32 g_deviceOutputLength[g_deviceOutputCount] ={ 1, 1,

" One “1“ per output

1};

module

PNIO_ADDR g_deviceOutputAddress[g_deviceOutputCount]=

 

{

 

{ PNIO_ADDR_LOG, PNIO_IO_IN, 0},

" Address of 1st output

{ PNIO_ADDR_LOG, PNIO_IO_IN, 1},

module

" Address of 2nd output

 

module

{ PNIO_ADDR_LOG, PNIO_IO_IN, 2}

" Address of 3rd output

};

module

78

Commissioning PC Stations - Manual and Quick Start

Release 5/2005

C79000-G8976-C156-07

Page 78
Image 78
Siemens C79000-G8976-C156-07 quick start Installing the Profinet IO Sample Program Suse Linux, Pniosbad,Pniosbad,Pniosbad