industrialNETworXnetx

| 26.05.2008 | 15:18 | 3 replies

How to Start my own Programm

Hello Everybody,

I have allways Problems :D

My Controller is the cifX 50RE
My Slave is the NXHX 500

I need only a hint, how I can commande via PROFInet the LEDs, which are available on the slave. I just want that the LEDs blink.

In the netX Profinet IO device Linkable Object for rcX BETA, PNS_IF_START_BLINKING_IND ist the fonction to use (I hope :lol: )

How can I Start :?:

Kind Regards

Andreas Jacob

Andreas Jacob

Hilscher Gesellschaft fuer Systemautomation mbH

| 26.05.2008 | 18:59

You must implement the needed function on the device side.

Please have a look into the PNS_4BitIO_Functions.c *_Process.c and *_Resources.c.

There are the Diag and Status LEDs controlled.
This should give you the needed hint.

| 12.06.2008 | 16:37

Hello

while I am trying to control the 8 Leds on my board via Profinet , I got some Problems to configure the LedDemo and Uart Task in the Config_NetX.c
-the Static task list from the two task is looking like:

    {"rcX_UART",                                    /* Set Identification       */
     TSK_PRIO_25, TSK_TOK_13,                       /* Set Priority,and Token ID*/
     0,                                             /* Set Instance to 0        */
     &auTskStack_rcX_UART[0],                       /* Pointer to Stack         */
     TSK_STACK_SIZE_RCX_UART,                       /* Size of Task Stack       */
     0,                                             /* Threshold to maximum possible value */
     RX_TASK_AUTO_START,                            /* Start task automatically */
     (void(FAR*)(void FAR*))TaskEnter_rcX_UART,     /* Task function to schedule*/
     NULL,                                          /* Function called when Task will be deleted */
     0,                                             /* Startup Parameter        */
     {0, 0, 0, 0, 0, 0, 0, 0}                              /* Reserved Region          */
    },    
    
    {"LedDemo",                                     /* Set Identification       */
     TSK_PRIO_26, TSK_TOK_14,                       /* Set Priority,and Token ID*/
     0,                                             /* Set Instance to 0        */
     &auTskStack_LedDemo[0],                        /* Pointer to Stack         */
     TSK_STACK_SIZE_LED_DEMO,                       /* Size of Task Stack       */
     0,                                             /* Threshold to maximum possible value */
     RX_TASK_AUTO_START,                            /* Start task automatically */
     (void(FAR*)(void FAR*))TaskEnter_LedDemo,      /* Task function to schedule*/
     NULL,                                          /* Function called when Task will be deleted */
     0,                                             /* Startup Parameter        */
     {0, 0, 0, 0, 0, 0, 0, 0}                              /* Reserved Region */
    }, 

-and the Compiler shows these Errors:

Quote:
output/Config_netX.o:(.rodata+0x1190): undefined reference to `TaskEnter_rcX_UART'
output/Config_netX.o:(.rodata+0x11e8): undefined reference to `TaskEnter_LedDemo'

-then I change the 0 (Uart for example) of the Startup Parameter to :

(UINT32)&g_tRcXUartTaskParam, /* Startup Parameter */

-and the errors this time are:

Quote:
.\Sources\Config_netX.c:940: error: 'g_tRcxUartTaskParam' undeclared here (not in a function)
.\Sources\Config_netX.c:953: error: 'g_tLedDemoTaskParam' undeclared here (not in a function)

for these changes, I know that I have to configure the two Tasks inside the configuration Task-List before.

Kind regards

Andreas Jacob

Andreas Jacob

Hilscher Gesellschaft fuer Systemautomation mbH

| 12.06.2008 | 17:11

Hello,

I do not understand why you try to implement the configuration of the two task example into your PROFINET project. I thought you would like to control the LEDs.

Anyway, in your static task list you enter the "TaskEnter_rcX_xxx".
This is a symbolic name, which must be defined. I assume that this is NOT defined in your project because you get the compiler error.
The TaskEnter function is defined in the xxx_Body.c module.

Login