Negative value in DNPr not coming

I am trying Schneider NOR module to read data over DNPr protocol. Has anyone have tried to read negative value from NOR in CitectSCADA ?

As i am not getting value in negative. Instead its displaying 65535 like that value. I tried to read same tag in Kepserver and datatype with Short datatype and its reading negative value properly. Even Kepware also not able to read same negative value using Long/read (Which only support for Analog Input in Citect).

Any idea about this or there is limitation of driver that we are not able to read INT datatype using DNPr protocol.

  • I have not used that device, but several other DNP devices. One thing to check is that your both your tag scales (input & engineering ?) have a negative value range. I have had issues where without this the values will only be positive.

    Good Luck
  • My main question is that Citect work with LONG and REAL data type only for Analog Input.

    We are not able to read INT data via DNPr protocol.

  • Indeed, according to the DNPR driver documentation you can only use LONG (for 16/32 bit integer values) an REAL (for floating point values) when reading analog inputs. What is the exact problem with that?

    Your initial question was about not being able to read negative values. Did that issue occur only when you configured the tags as INT?
    If so, please use LONG instead. INTs can only hold 16 bits and the minus-sign is probably stored at bit 31, so that should explain the issue in your case.

    You may or may not have to configure scaling like Andrew mentioned earlier. Please try these options and let us know what you find.

    Best regards,
    Patrick
  • Thanks for reply. I already tried the scaling also but no success.

    More clarification on my Question:

    "PLC's Single Word (16 bit) is configured as analog Input variable in NOR module to read it via DNPr protocol. Now i'm trying to to read that tag in Citect. In Citect we can configure only 32 bit tags(means as REAL or LONG only). So INT value value in PLC is goes to negative then i'm not able to read it as REAL or LONG because my source value is 16 bit and we are reading in citect as 32 bit.

    But when i try to read same in KEPServer, we can configure same tag as single (means INT) and it can read 16 bit negative value. So my question is that can we consider in Citect there is limitation of this. Driver should be upgraded to read 16 bit value also."
  • Can you check which DNP object group and variant number is being used for this variable?
    It should be Object group 30 or 32 (analog input) and Variant number 2 or 4 (16-bit values).
    If the NOR module transmits the value as variant 1 or 3 it tells the Citect driver to treat the variable as 32-bit and then you will not be able to read negative values.

    So I don't think it is a driver bug, but rather a configuration issue on the data source end (NOR module).
    Setting the data type to Single in Kepware forces the data to be seen as 16-bit INTs, so it overrules the DNP3 data type.

    After browsing the NOR manual I found that you need to set Static Variation to "g30v2" or "g30v4" and Event Variation to "g32v2" or "g32v4" for 16-bit integer analog inputs.
  • Good to here that you browse NOR manual for this.
    I have already gone that exercise but not success in that also.

    The same manual i have gone through today also and it clearly mentioned that we have to select data type DINT or REAL in PLC and same tag need to map in NOR.

    But when we link INT tag in NOR and read it using LONG data type in SCADA it reads positive value as good as DINT mapped. but we can not read negative value (instead we are getting 65537 something value).

    So i conclude that we can not map INT/16 bit word in NOR (if there is negative value in data) and same can not be read in SCADA. So i think driver developer should think about that KepServer can read as 16 bit data and Citect can not !
  • Hi Bhadresh,

    Again, the problem lies in the configuration of the NOR, not in the Citect driver. The DNPR driver is able to read both 16 and 32-bit integer values if the correct variation is used in the DNP3-protocol.

    Please search the NOR manual for the term "variation" for things to check in your configuration, especially:

    1. Setup -> Channel -> Parameters -> Advanced Parameters. Parameter "Analog mode" should probably be set to "Mixed Mode", not "All 32-bits". You need firmware v1.7 or higher for this parameter to be available.

    2. Setup -> Channel -> Session -> Data Mapping. When you configure your analog input point(s), make sure to set the "Static Variation" to "g30v2" or "g30v4".

    If all of this still does not work, you might consider moving/converting the INT value to a DINT register in the PLC application and then use 32-bit analog int type in NOR.
  • Hello Patrick,

    Thanks for update.

    I tried both setting already (and today also) but Setting of "Mixed Mode" does't work.
    But as said earlier by converting INT to DINT or REAL in PLC and it works fine with LONG/REAL (32 bit). But we can not read 16 bit register direct.