industrialNETworXnetx

Rainer Versteeg

Rainer Versteeg

| 05.08.2008 | 08:50 | 3 replies

Ethernet/IP and Profibus Slave Linkable Object

Hi,

I want to start Ethernet/IP and Profibus Slave at the same time on a NDXB500 - SYS Board.

Ethernet/IP uses XC [0 and 1] Profbus Slave XC=2.

Ethernet/IP runs only when the Task Profibus Slave is not started.
Is the Profbus Slave Task is started the Ethernet/IP Task get an Error by the function xChannelIORead();

Br,
Rainer

Andreas Jacob

Andreas Jacob

Hilscher Gesellschaft fuer Systemautomation mbH

| 05.08.2008 | 09:41

Hi Rainer,

Rainer wrote:
...get an Error by the function xChannelIORead();

It would be helpful, when you would also post your error message/code it self and not only, that you get an error.

Principally should both stacks work together.
Please check if both stacks are not using the same IRQ and the same priority.

Rainer Versteeg

Rainer Versteeg

| 05.08.2008 | 10:38

HI AJ,

The error number is -2146697183 0x800C0021.
The Priority auf the Task´s are different.

How can I see wich Interrupt are use from the stack.

I have configured to Interrupt:

{{"COM", RX_PERIPHERAL_TYPE_INTERRUPT, 2}, /* Communication Channel, Instance 2 */
SRT_NETX_VIC_IRQ_STAT_com2, /* Use external communication channel 2 Interrupt */
28, /* Priority 28 */
RX_INTERRUPT_MODE_TASK, /* Allow interrupt to be a thread */
RX_INTERRUPT_EOI_AUTO, /* EOI self by RX */
RX_INTERRUPT_TRIGGER_RISING_EDGE, /* Edge triggered */
RX_INTERRUPT_PRIORITY_STANDARD, /* Normal Priority */
RX_INTERRUPT_REENTRANCY_DISABLED, /* Interrupt itself is not reentrant */
TSK_PRIO_7, /* Task Mode Priority */
TSK_TOK_7, /* Task Token */
1024 /* Task Stack Size */
},
{{"COM0",RX_PERIPHERAL_TYPE_INTERRUPT,0}, /* Communication Channel, Instance 0 */
SRT_NETX_VIC_IRQ_STAT_com0, /* Use external communication channel 0 Interrupt */
27, /* Priority 27 */
RX_INTERRUPT_MODE_SYSTEM, /* Allow interrupt to be a thread */
RX_INTERRUPT_EOI_AUTO, /* EOI automatically by RX */
RX_INTERRUPT_TRIGGER_RISING_EDGE, /* Edge triggered */
RX_INTERRUPT_PRIORITY_STANDARD, /* Normal Priority */
RX_INTERRUPT_REENTRANCY_DISABLED, /* Interrupt itself is not reentrant */
TSK_PRIO_8, /* Task Priority */
TSK_TOK_8, /* Task Token */
1024 /* Task Stack Size */
},

The first should be for Channel 2 und the second for channel 0.

How can I see wich Intterrupt are used from the stack ?

Br,
Rainer

Andreas Jacob

Andreas Jacob

Hilscher Gesellschaft fuer Systemautomation mbH

| 05.08.2008 | 10:48

Hi Rainer,

the error code you get "0x800C0021" means: "Communication flag not set".
In other words the stack is not in communication status and not running.
There are a lot of reasons, why this can happen. One could be a missing configuration or missing warmstart messages and so on.

If each stack is running for it self, you should double check, if you are using some resources twice (like variables or ...)

Rainer wrote:
How can I see which Interrupt are use from the stack.

I think you have two examples. One for the EthernetIP and one for the PROFIBUS. Please have a look into the original examples into the config.c file and look to the Interrupt instances.

The best way is to debug step by step each function inside your project. Maybe you are able to figure out some other errors.

Login