LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

[Bug?] DSC - Clusters Different between 'Read Alarm.vi' and 'Alarm and Event Query.vi" but Contain 'Same' Data

Howdy!

 

Why are the clusters different coming out of the Read Alarm.vi and the Alarm and Event Query.vi when they have the exact same data?

The only difference is the order of two last elements.

I am leaning towards bug on this one, unless these clusters need to be distinct for some reason?

 

21944i20036EA50D1B1C8F

Certified LabVIEW Architect * LabVIEW Champion
Message 1 of 8
(6,617 Views)

Should have added [LV 2009]

 

Cheers

 

-JG

Certified LabVIEW Architect * LabVIEW Champion
0 Kudos
Message 2 of 8
(6,606 Views)

I agree it is a bug.  It seems to be present in LV8.6 and also LV2010.  I don't know if there is any reason NI would have intentionally defined those two clusters to be identical except for those two elements (#13, #14) to be swapped.  I'd say it is a failure on their part to define that cluster with a typedef.  In one VI the cluster is named data, and in the other it is Alarm.

 

I think the workaround for you would be to make a subVI that takes the cluster from one of them, unbundles the nodes, and rebundles them into a cluster using bundle by name and using a constant of the other type of cluster as the definition.

 

Based on what I'm seeing with the other VI's, the Alarm & Event query from the database palette is wrong, and the correct cluster is the one where the refnum element is the last element in the cluster.

Message 3 of 8
(6,589 Views)

This is yet another example of hwo DSC is the red-headed step child. I reported a simliar issue with historical trends in LV 8.2.

 

Can someone send a e-mail to SIngapore and teach them about type defs?

 

Ben

 

Ex-BridgeVIEW developer

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 4 of 8
(6,569 Views)

jgcode,


Good Find!

 

This was reported to R&D as CAR #245619 for further investigation.

 

I think Ravens Fan is on the right track with his workaround suggestion for the time being. I apologize for this bug and the trouble it may have caused!

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Ben Sisney
FlexRIO V&V Engineer
National Instruments
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Message 5 of 8
(6,554 Views)

Thanks guys, and thanks for the CAR Ben

 

Sad thing is I started out using the other cluster first - so when I came across this bug I did all my conversions the other way!

But I will take Ravens Fan advice and refactor it to go the other way to be safe 🙂

 

 

Certified LabVIEW Architect * LabVIEW Champion
0 Kudos
Message 6 of 8
(6,542 Views)

I decided to create the subVI.  I backsaved it all the way to LV 8.0 in case any older versions have a problem.  I put the the database URL and the error wire into this one wired through untouched so you can still access them without crazy wire bends.

 

One other discrepancy I found in the clusters besides the swapped elements is that the refnum in the Historical palette uses a U32 long integer, while the functions in the Alarms and Events palette use a U64 quad integer for the refnum.

 

 

Download All
Message 7 of 8
(6,533 Views)

Thanks for posting Ravens Fan

 

I re-jiggered my API to reverse my datatypes then applied changes to my application code.

It wasn't that painful to update. 

 

My current understanding is that this bug affects one VI, so I decided it was easier to wrap that VI with the bugfix.

Attached is my implementation if anyone wants it too.

 

Cheers

 

-JG

 

[LV 2009]

Certified LabVIEW Architect * LabVIEW Champion
0 Kudos
Message 8 of 8
(6,522 Views)