Industrial Communications

cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to open DeviceNet interface

Hi all,

 

I'm attempting to use a PCI-DNET card (p/n 777358-01) as a DeviceNet master to operate a single device, and I can't even seem to get off the ground.  I'm running LabVIEW 8.5 with the ni-dnet add-ons on my development laptop, and testing as an executable on a PC in our assembly cell, and I can't even properly run the Easy I/O Config.

 

I've attached my VI (currently I'm only running the "dnet config" event by clicking "OPEN COMM"), and I always get a Wait for State error from the Easy I/O Config, presumably where it's waiting for the Established state.  I've also attached screenshots to show the setup of the VI and to show the setup in MAX on the operating PC.

 

My device is at address 63, and it is not auto-bauding when I attempt to establish the dnet network.  The device itself is known good.

 

When I build the executable, I only include the attached VI as the startup VI, I do not include any references.  I assume that LabVIEW will pull in what is necessary.

 

Any thoughts?

Download All
0 Kudos
Message 1 of 18
(7,525 Views)

Hi JeffOverton,

 

What is the exact error that you're receiving (number and the text)? From the error, we might be able to understand what could be going wrong.

 

Thanks!

Chris T.
0 Kudos
Message 2 of 18
(7,515 Views)

It is error -1074388991 from Wait for State.

 

If you open Easy I/O Config.vi, and in the block diagram open Wait For State.vi, you can actually see where the error gets bundled in on a timeout case (except it's displayed as hex BFF62001).

0 Kudos
Message 3 of 18
(7,510 Views)

I kind of percolated about this over the weekend, and I think I can narrow it down.  I know the device works, because it operates perfectly on a PLC in the lab.  I also know that it's getting power properly, as I can see the device boot up and wait to autobaud.

 

However, since it never autobauds, that means there is no network traffic.  This is leading me to believe that I have a setup error, either in my interface or device setup clusters, that is preventing the NI card from actually going out and talking on the network.

 

Does anyone have experience with this collection of VI's that could maybe share how their setup worked?

0 Kudos
Message 4 of 18
(7,505 Views)

Another point:  In Easy Open I/O.vi, an I/O object handle is passed to wait for state, and told to wait for Established.  However, in the help for Wait for State.vi, Established is only used with explicit messaging object handles, not I/O.

0 Kudos
Message 5 of 18
(7,502 Views)

Update: I've gotten the software worked out.  I found out that in MAX, you have to change the protocol of the PCI-CAN port to DeviceNet, and I found the Knowledge Base that describes the error codes in depth.  Anyways, now my code runs without errors, but I am still not communicating with my device.

 

Even if I go into MAX and run the configurator, my device never autobauds at any of the bit rates.  I am wired in properly and the connection is terminated, but as far as the device is concerned, there is no network traffic.  Any thoughts?

0 Kudos
Message 6 of 18
(7,499 Views)

Hi JeffOverton,

 

How do you have the cable terminated? What type of cable are you using? Just wanting to get a better picture on the layout of the hardware.

 

Thanks!

Chris T.
0 Kudos
Message 7 of 18
(7,494 Views)

When I checked the cable termination, I noticed that my CanHi and CanLo wires were swapped.  I knew it had to be something dumb like that with as long as this thread was getting.

 

Still, the MAX operation and list of error codes are handy. 

0 Kudos
Message 8 of 18
(7,492 Views)

Sorry, I have one extra question.  Everything is working as it should, with the following exception:

 

Sometimes, I will get error BFF6200E from Get DeviceNet Attribute.vi and Set DeviceNet Attribute.vi.  The documentation says that BFF6200E is DnetErrNoReadAvail, which seems like if you tried to read an I/O that wasn't there.

 

The set attribute works, becuase the device responds appropriately, I'm just getting that error.  When I get that error from get attribute, I get garbage data (instead of a real 50, I get a real 1.96182E-44, and get attribute spits out ActualAttrDataLength of zero).

 

So it seems like I can just ignore the error, but I don't like doing that.  That always leads to problems down the road.

 

 

Any ideas?

0 Kudos
Message 9 of 18
(7,485 Views)

Hi JeffOverton,

 

When you get the error does this only occur once? Or is this intermittent behavior?

 

Thanks!

Chris T.
0 Kudos
Message 10 of 18
(7,479 Views)