From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Industrial Communications

cancel
Showing results for 
Search instead for 
Did you mean: 

DNP3 Error Detection

I am having issues keeping a reliable connection with the DNP3 master device using a SBRIO and NI’s DNP3 toolkit.  I am trying to use flags and error codes to determine and log the state of the connection.  I don’t see the flag status change even when I unplug the Ethernet cable between the sbRIO and DNP3 master and only get limited information back from the error code.  Any thoughts?  What should I do using to determine the current DNP3 communication status?  Is anyone using the flags with any success?

 

From nidnp3.chm help files.

 

Analog Input / Output – Stayed ONLINE (1) even when Ethernet cable was disconnected

00000001: ONLINE

00000010: RESTART

00000100: COMM_LOST

00001000: REMOTE_FORCED

00010000: LOCAL_FORCED

00100000: OVER_RANGE

01000000: REFERENCE_ERR

10000000: Reserved, always 0

 

Error Codes – Only seem to get Warning 44236.  Don’t see or get any other errors / warnings.

−44284 The device does not support this wire mode.

−44283 The device does not support this type of flow control.

−44281 The device does not support this stop bits value.

−44280 The device does not support this type of parity.

−44279 The device does not support this baud rate.

−44278 Invalid serial channel refnum. Make sure Create Channel (Serial).vi created the refnum correctly.

−44277 This property is not supported on Windows.

−44276 Invalid event class value. Refer to the help for the valid enumeration. 

−44275 Invalid default variation value. Refer to the help for the valid enumeration. 

−44274 Invalid point type.

−44273 Invalid event mode. Choose either Sequence of Event or Most Recent.

−44272 Invalid confirmation mode. Choose either Never, Always, or Sometimes.

−44271 Invalid channel type. Choose either UDP Only or TCP and UDP.

−44270 Invalid outstation session refnum. Be sure Create Outstation Session.vi created it correctly.

−44269 Invalid session refnum. Be sure it is created correctly.

−44268 Invalid outstation refnum. Be sure Create Outstation.vi created it correctly.

−44267 Invalid network channel refnum. Be sure Create Channel (IP Network).vi created it correctly.

−44266 Invalid channel refnum. Be sure Create Channel.vi created it correctly.

−44265 Invalid outstation or master refnum. Be sure it is created correctly.

−44232 The serial port does not exist.

−44231 Unable to open the serial channel. Make sure the serial port is present and you install VISA and NI-Serial correctly.

−44230 Unable to increase the type point number.

−44229 The specified point does not exist or has been disabled.

−44227 The specified session was not created properly. Call Create Session.vi to create a session.

−44226 You cannot apply the channel configuration when the channel is working, that is, when any session is created using this channel.

−44225 The DNP3 stack has run out of memory.

−44224 The specified channel is not working properly. It probably cannot transmit/receive messages.

−44223 The specified channel was not created properly. Call Create Channel.vi to create a channel.

−44222 The scan thread priority cannot be set correctly. Be sure the master or outstation is created correctly.

−44221 Unable to create the DNP3 stack scan thread. The system has run out of memory or cannot spawn more threads.

−44220 The outstation or master was not created correctly.

−44207 Unable to create the outstation session.

−44206 The outstation session has the same name as existing sessions in the same channel, or there are too many outstation sessions with the same source and destination.

−44205 Unable to create the IP network channel.

−44204 The channel has the same name as existing channels in the same outstation, or there are too many IP network channels with the same IP and port.

−44203 You have exceeded the maximum number of outstations. You cannot create more outstations.

−44202 Unable to create the outstation.

−44201 The specified DNP3 outstation, channel, or session name is invalid. It contains one or more of the reserved characters /, $, ^, (, or ), which are illegal to use in their decoded form.

  44200 Unable to write the value because a reset operation is carried out on the point. Re-evaluate the value according to the reset and write the point again.

  44228 Warning: There are several changes to this data point, and the last change overwrote the previous version before it was used.

  44233 Warning: No data transmission in the channel. Make sure the master is connected, the serial settings of the master match those of the outstation, and the serial port is not being used by other applications.

  44234 Warning: Link status timed out. Make sure the cable is connected to the master and the master is alive.

  44235 Warning: The starting sync byte of the frame is invalid. Make sure the serial settings of the master match those of the outstation.

  44236 Warning: No master is connected, or the listening port is being used by other applications.

  44260 Warning: This value exceeds the maximum value for the Max Controls per Request property.

  44261 Warning: The rx frame size is out of range. The default (292) will be used.

  44262 Warning: The tx frame size is out of range. The default (292) will be used.

  44263 Warning: The rx fragment size is out of range. The default (2048) will be used.

  44264 Warning: The tx fragment size is out of range. The default (2048) will be used.

  44280 Warning: Invalid parity value. The default (0: None) will be used.

  44281 Warning: Invalid stop bits value. The default (10: 1 Bit) will be used.

  44283 Warning: Invalid flow control value. The default (0: None) will be used.

  44284 Warning: Invalid wire mode value. The default (–1: Auto) will be used.

Matt Fitzsimons
NI Alliance Member
LabVIEW Champion
NI Certified LabVIEW Architect
LabVIEW, LV-RT, Vision, DAQ, Motion, and FPGA
0 Kudos
Message 1 of 6
(6,423 Views)

Hi Matt,

 

Sorry for replying late.

 

The flag refers to supplementary data that indicates conditions such as the source being on-line, the source device having restarted or the value being outside of the measurement range. Many of the readable data objects have variations that include flags consisting of bit string (BSTRn) fields to indicate conditions or attributes of the associated data value. 

Refer to the DNP3 Object Library for specific details.

These flags can be set in our DNP3 VI as inputs and has no direct connection with the error codes for DNP3. 

 

Yishi Liu 

IndComm PSE, NI

0 Kudos
Message 2 of 6
(6,384 Views)

I have read through your response and have a few more questions.  Are the object flags part of standard DNP3 communication or an addition as part of this DNP3 toolkit?  Is there a DNP3 requirement that these flags are updated by the master and the client devices? 

 

In my case I am not seeing change when I induce an error like network disconnect.  It would seem to imply that the DNP3 master that I am communicating with is not updating these flags.  Where would you recommend I look to view the complete DNP3 standard?

Matt Fitzsimons
NI Alliance Member
LabVIEW Champion
NI Certified LabVIEW Architect
LabVIEW, LV-RT, Vision, DAQ, Motion, and FPGA
0 Kudos
Message 3 of 6
(6,374 Views)

Hi Matt,

 

An object flag is only a string whose format is defined by DNP3 spec as supplementary data to indicate the status of the data source (measured point, etc.). It does NOT indicate DNP3 status communication-wise. There is no requirement that these flags are implemented in a VI but if done it certainly helps building a robust DNP3 network by having the ability to process with this addtional information about the data source.
You have to programtically use the flags by relevant information you get from the data source.

 

 

0 Kudos
Message 4 of 6
(6,353 Views)

Hi Matt,

 

Attached are some improved DNP3 examples. See if they help you understand more and your feedbacks are welcome.

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

Hi Matt,

Attached are some improved DNP3 examples. See if they help you understand more and your feedbacks are welcome.

 

For the moment the forum service being impaired due to some issue,  please download here within 72 hours:

ftp://ftp.ni.com/outgoing/DNP3/DNP3_V2.rar

0 Kudos
Message 6 of 6
(6,343 Views)