Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI
2 rating:
 1 out of 5     Rate this Document

Can I Programmatically Change the MacID of My DeviceNet Device?

Primary Software: Driver Software>>NI-DNET
Primary Software Version: 1.4
Primary Software Fixed Version: N/A
Secondary Software: N/A

Problem:
I want to change the MacID of my DeviceNet device programmatically. How can I do this?

Solution:
The MacID is usually a default value of 63. Explicit Messaging (EM) can be used to change the MacID. Simply run the ncWriteDnetExplMsg.vi if using LabVIEW or use the ncWriteDnetExplMsg() function call for text-based languages. Set the input values to the following:


Service Code=10 hex (16 decimal)
ClassId=3
InstanceId=1
ServDataLength=2
ServData= 1,


Also, it may be necessary to reset some devices after changing the MacID. To do this, run the ncWriteDnetExplMsg.vi with the following settings:


Service Code=5
ClassId=1
InstanceId=1
ServDataLength=0
ServData= NULL


Note: It is not always possible to change the MacID of your DeviceNet programmatically. Many DeviceNet devices require the MacID to be set on the device itself (usually via DIP switches or another mechanism).
NI-DNET 1.5.0 introduces the NI-DNET Configurator. You can use the NI-DNET Configurator to change a device MAC ID instead of programmatically changing it in LabVIEW.

Related Links:
NI-DNET Programmer Reference Manual

Attachments:





Report Date: 10/04/2002
Last Updated: 06/12/2006
Document ID: 2Q39D58R

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit