Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

NI-DNET in poll mode trys to reconnect every 10 seconds

I have been able to get my poll device talking to NI-DNET board.  However after everything is connected and poll communication is established the NI-DNET board decides it has to try connecting via a group 3 message every 10 secs. My device is connected via group 2 only  Predefined Master/Slave connection.  This wouldn't be so bad except that when it does this the wait for read vi fails instantly during the 2 secs that NI-DNET uses to try a group 3 connection. It does this regardless of the amount of time I put in for the wait for read.

 

1. Is there a way to configure the board so that once it is connected it doesn't try reconnecting?

2. Is there a method to make the wait for read available to not time out immeadiately when trying to reconnect?

 

System specs:

 

Labview V 8.0.1

NI-DNET V 1.6.1f2

Window XP

 

Thanks

John 

 

 

0 Kudos
Message 1 of 5
(6,867 Views)

Hi,

 

Try disabling explicit messaging, this will send a dummy message every 10 seconds and may be causing this weird behavior you see. You can do that by calling SetDriverAttr.vi and setting the Keep Explicit Messaging to False (0).  Take a look at the picture I've attached.

Matt
Applications Engineer
National Instruments
0 Kudos
Message 2 of 5
(6,846 Views)

Hi Matt,

 

Your suggestion worked. Thank you.

 

However with explicit messaging disabled does this mean if I want to send an explicit message after the polling has begun I have to

 1.. Stop the interface

 2.  Reenable explicit messaging

 3.  Restart the interface

 4.  Send the explicit message

 5. Stop the interface 

 6. Disable explicit messaging

 7. Restart the interface

 8. Restart the polling link

 

?

 

My understanding of the devicenet protocol for predefined master/slave poll I/O connection is that there are always  two connection instances created one for explicit messages and the other would be for poll I/O connection

 

Because of this odd behavior  of trying to connect via group 3 message after it has already failed would make the interface incapable of making a predefined master/slave only connections.

 

How will this work if I have a device that is an explict message server only on the same network?

 

Or maybe I missing something?

 

Regards

John

 

 

 

 

0 Kudos
Message 3 of 5
(6,836 Views)

Hi,

 

I would be able to know for sure without testing it. What hardware are you using and can you post your code? Has disabling the “Keep Explicit Messaging” negatively affected your program?

Matt
Applications Engineer
National Instruments
0 Kudos
Message 4 of 5
(6,818 Views)

Ah Ha I was missing something.  In order to do simultaneous explicit messaging and poll I/O I have to open two seperate connections. 

 

1.  Open DeviceNet Explicit Messaging.vi

2.  Open DeviceNet I/O.vi

 

On the Open DeviceNet I/O obj handle I run the Set Driver Attribute.vi to turn off explicit messaging in that connection

I use the DeviceNet Explicit Messaging.vi object handle out to get attributes and do all the explicit messaging.

 

 I attached a pdf of the opening of the two connections

 

 

So all is well

 

Thank You

 

John

0 Kudos
Message 5 of 5
(6,814 Views)