What Does the NI-DNET NC_ATTR_KEEP_EXPL_MSG Attribute Do? Primary Software: Driver Software>>NI-DNETPrimary Software Version: 1.3 Primary Software Fixed Version: N/A Secondary Software: N/A
Problem: In the nican.h header file there is an attribute named Keep Explicit Message, NC_ATTR_KEEP_EXPL_MSG. As the comment in the header file mentions, this is an uncommon attribute, which is not described in the User Manual. What does this attribute do? What is the effect of disabling this setting? Solution: By default, the NI-DNET driver will keep explicit messaging connections open by sending a ping message to the slave device. This action avoids the connection expiring, which would make the driver close the connection object. This ping message occurs approximately every 10 seconds. Most of this information can be obtained from the comment in the header file. What is not mentioned is that the ping message will continue even if there are no explicit messaging connections open. If the application only opens I/O connections to the slave device, the explicit messaging ping will continue. Although some DeviceNet devices require this ping message, some customers have reported that the ping message causes the remote device to reset. This is not the intended behavior. In those cases, the ping can be disabled calling the ncSetDriverAttr function with the NC_ATTR_KEEP_EXPL_MSG attribute (or 0x80000099 as <User Supplied AttrID>) set to zero (0). The NC_ATTR_KEEP_EXPL_MSG attribute has to be set using the object reference for the Explicit Messaging connection and before starting the interface with ncAction. With the Keep Explicit Message attribute disabled, any open explicit messaging connection not in use for about 10 seconds (the time the driver would ping the device) would timeout and be closed. Related Links: Attachments:
Report Date: 02/18/2003 Last Updated: 12/09/2005 Document ID: 2UHG152Y |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
