Industrial Communications

cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to open DeviceNet interface

The setup for the problem is that I'm getting or setting Class 0x31, Instance 0x01, Attribute 0x10 or 0x0E.

 

Once the error occurs, I will keep occuring on the same CIA.  However, if I change the instance to 0x02, everything works fine and dandy again, even on the original setup.  If the error occurs at 0x02, changing it to 0x01 clears it out.

 

 

Basically, once the error occurs for a given CIA, it will continue occurring until I change the CIA being addressed.

0 Kudos
Message 11 of 18
(3,767 Views)

Hi JeffOverton,

 

When it does continue to occur is the data correct though? Are you still using that dnet test.vi?

 

Thanks!

Chris T.
0 Kudos
Message 12 of 18
(3,761 Views)

When an error occurs on a read, the output does not update.  When an error occurs on a write, the data is still written to the device.  And I updated my test VI, but only in terms of opening and closing connections, not in terms of reading data or explicit messaging.

0 Kudos
Message 13 of 18
(3,759 Views)

Hi JeffOverton,

 

Chris is out of the office this week, but I was investigating this error for you and perhaps have a suggestion or two.  I found in LabVIEW the error code you were referring to, and I noticed in your post that you didn't mention the solution listed in the error description.  You may have already seen this, but I just want to make sure. The error description I found is listed below:

 

NI-CAN:  (Hex 0xBFF6200E) You called Read DeviceNet Explicit Message before the response arrived.

Solution: Wait for the Read Avail state prior to calling read; Make sure you call Write DeviceNet Explicit Message before calling read (every response requires a request).

 

That being said, have you tried using the WaitForState VI before using the Get- or Set- DeviceNet Attribute function that was originally throeing the error?  Or is there something in your code that would prevent you from using this VI that I may have overlooked?

 

 

0 Kudos
Message 14 of 18
(3,737 Views)

Hi Rory,

 

I'm actually using VI's one step up from Read and Write DeviceNet Explicit Message.  I'm using the Get and Set DeviceNet Attribute VI's, and they just shoot a dll call.  I don't know how the timing or waiting is handled.

0 Kudos
Message 15 of 18
(3,731 Views)

JeffOverton:

 

Do you get similar behavior if you replace the higher level functions with the lower ones? If you put down a diagram disable structure, and use a Read or Write DeviceNet Explicit function in the enabled case, do you get different behavior?

 

Another thing to try would be using the WaitForState function before calling the Get DeviceNet Attribute function. Does the code hang on that function where you would usually get the error?

Caleb Harris

National Instruments | http://www.ni.com/support
0 Kudos
Message 16 of 18
(3,721 Views)

Hi Caleb,

 

I haven't been down to the assembly cell to try out the lower level functions, but the code does not hang in the slightest.

 

 - Jeff

0 Kudos
Message 17 of 18
(3,718 Views)

look at the CanHi and CanLo wires first of all, common fault here, but an easy fix.

0 Kudos
Message 18 of 18
(3,684 Views)