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.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

dsc Shared Vatiable

Hi all

I created tye priject with Shared Vatiable.

When I run my project I see the old data on alarms.

then I created new VI the part of my project.

The data was remained.

Where was stored this data?

How  can I clear this Shared Vatiable from old data?

Best regards

Iskanser

 

0 Kudos
Message 1 of 7
(2,364 Views)

Hi Iskander,

 

I'm not sure I fully understand your question, but it sounds like when you run your project, the data on the shared variables remains the same as it was the last time you ran the program.

 

One thing I could suggest is putting a sequence structure either at the beginning or end of your VI and set the shared variables to an initial value.  For instance, you could set all your variables to zero at the end of the program so that next time you run it, they will be set to zero as well.

Regards,
Austin S.

National Instruments
Academic Field Engineer
0 Kudos
Message 2 of 7
(2,351 Views)

Hi Austin S.

Thanks for the help

I did this.

But it don't work how I want.

I don't see in the table "Alarms"  messages which I assigned in the While Loop: "Alarming.Hi.Level",... 

Although I see its in 3 fields.

Where is my ERROR?

Best regards

Iskander

 

 

0 Kudos
Message 3 of 7
(2,340 Views)

Hello Iskander,

 

Have you considered looking at a shipping example to serve as a template to implement your alarm functionality. One such example can be found in the NI Example Finder and its called DSC Alarms Demo. It might be beneficial to look through how the alarm data is displayed in this project and then modify your code to implement this logic. 

 

To the note that Austin referred to earlier and looking at the code you posted, it seems as though you might not be clearing your alarm data following termination of the while loop. As Austin mentioned, you can do this by wrapping the while loop in a sequence structure and then subsequently writing values to the shared variables in the next frame to "reset" the shared variables to a desired state.

 

Best,

Blayne Kettlewell

0 Kudos
Message 4 of 7
(2,328 Views)

Thanks all

I found my Errors

I must clear User and Clear Time.

But I don't know How do its?

Respect

Iskander

 

0 Kudos
Message 5 of 7
(2,316 Views)

Hello Iskander,

 

Have you attempted to clear the alarm VI via the Clear User Define Alarm.vi? Additionally, are you seeing persisting values in your multicolumn listbox? Because all you would need to do to remove that is to add in a property node with Item Names selected. From there all you would need to input is an initialized 2D array with no input strings and wire that into the Item Names input. If you place this at the start of your program it will clear the listbox each time you run the VI. 

 

Regards,

Blayne Kettlewell

0 Kudos
Message 6 of 7
(2,299 Views)

Hi Blayne Kettlewell

Thanks for the attention and help

Best regards

Iskander

 

0 Kudos
Message 7 of 7
(2,277 Views)