I have encountered a very strange issue with the quality bits of a IEC 61850 SMV stream that I am attempting to publish. When I use the "Write SMV Data" VI to publish my quality bits as an unsigned integer, the actual published values (read via Wireshark) appear to be masked and bit shifted!
i.e. actual_quality_field = (set_quality_field & 0x0000FFFF) >>3
The instantaneous magnitude fields appear normal.
I have attached a simplistic VI capable of replicating my issue, and the .cid I am using.
I am using LabVIEW 2018.0f2 and a cRIO-9046 with the following software installed:
Any insights into the source of this problem would be greatly appreciated
Solved! Go to Solution.
Since you're using the Industrial Communications for IEC 61850 driver, posting at the proper discussion forum below would be the best way to get the right eyes on your issue.
I try to reproduce this problem in my office. However, there was missing VI when I opened the sv_quality_test.vi. Could you please check again? Also, could you reproduce this problem with NI SMV example?
Thank you for your help and my apologies for the oversight. I've attached a zip file with the labview project and missing VI.
Yes, I was able to re-create the problem with the NI IEC61850 SMV example. I needed to modify the "Quality" Control to accept data in hex (screenshot attached). There are two unexplained bitshifts (screenshot also attached) that modify the effect slightly. Trying to send a quality of "0xFFFFFFFF" results in a read quality value of "0x00001FF8".
Thank you again for taking a look at this!
The Quality is 13-bit code Enum, or Bit Field. The 13-bit code Enum uses the highest 13 bits of an INT16U. Quality ignores the rest 3 bits. So we added the bitshifts in the example. And could you please test again with the quality of "0x1FFF" ?
Thank you for your response. Can you please point me to the relevant section of the standard where it specifies that the highest 13 bits are used? I couldn't find anything explicitly mentioning it in 61850-9-2 or 61850-7-3. I had to look at 61850-9-2 LE (available from the IEC61850 user group), to find this information.
R2.1 section 6.2.3 extends the 61850-7-3 quality field with a "derived" bit, and figure 5 shows the quality bits occupying the lower 13 bits of the quality field.
Attempting to publish "0x1FFF" with the example "Publisher.vi" results in a value of "0x1FF8" being actually published.
You can get detailed information from NI-Industrial Communications for IEC-61850 Help document. And I also find the related information from the spec of iec 61850-7-3.
Thank you for your reply. The table you mention in 61850-7-3 does not make any mention of how the various quality flags should actually be encoded into the quality word. 61850-9-2LE specifies a "derived bit" and how the quality field should be encoded.
Is there a way I can support this aspect of 61850-9-2LE with the NI SMV VIs?
I am afraid that NI SMV didn't support the derived bits defined in the 61850-9-2EL. Because NI 61850 is developed based on the third-party's stack. I also checked the reference materials for developing the NI IEC 61850 software. However, these references don't contain the 61850-9-2EL.
Thank you for providing clarity on this issue. Hopefully NI will choose to support this component of 61850-9-2LE at some point in the future.