LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Int16 alarm value

I am trying to read a discrete alarm condition from a PLC which sends this through an Int16 data type shared variable. Problem is I can't get it to work. All of my other shared variables trigger alarms when in alarm condition: dbls, bools, etc. I only have alarm HiHi active in the Int16 data type to alarm on a HiHi value of 1. I force feed an alarm at the PLC, I see the value of 1 but get no alarm in my DSC code. Am I missing something? Thank you in advance.

PaulG.

LabVIEW versions 5.0 - 2023

“All programmers are optimists”
― Frederick P. Brooks Jr.
0 Kudos
Message 1 of 8
(3,647 Views)

Paul-

 

You will need to give us more information to really troubleshoot what's going on. First, check in the Distributed System Manager to see if the alarm shows up in there. You can view this by going to your start menu and go to National Instruments->Distributed System Manager. Once that is up, browse to your OPC server and check your library and choose the specific tag you are trying to read from. Please attach a screen shot of that when you are trying to force an alarm. That will let us know if it's your code, or the system all together. Thanks,

National Instruments
Applications Engineer
0 Kudos
Message 2 of 8
(3,607 Views)

I see the integer variables in the Distributed System Manager. I see the values change but they do not alarm there, either.

 

This is a scaled-down version of what I have. The PLC would be in the top loop. Everything is working in this vi, including all of my alarms except for the integers.

 

The alarm conditions for both Int 1 and Int 2 are HiHi enabled (everything else not enabled), value of 1. If I set Int 1 or Int2  to a value of 1 they will not alarm, but they will alarm I set either of them to 2. 

 Int Alarm Problem.png

PaulG.

LabVIEW versions 5.0 - 2023

“All programmers are optimists”
― Frederick P. Brooks Jr.
0 Kudos
Message 3 of 8
(3,591 Views)

Try setting the alarm level of to to Hi as well as HiHi and see what affect that has. Also, it may be helpful to delete your int shared variable from the project and recreate it. After trying those two things, let me know what the results are. thanks,

National Instruments
Applications Engineer
0 Kudos
Message 4 of 8
(3,569 Views)

I did what you said and no effect. It gets "better".

 

I created another shared variable, INT16. I enabled and set alarm Hi to 1. Running my code and manually setting the value of the shared variable to 1 I get no alarm. If I go to a value of 2 I get the alarm. If I go back to a value of 1 and try to acknowledge it will not acknowledge. If I go back to 0 it will acknowledge. Same behavior if I set the HiHi to 2 and Hi to 1. It will Hi alarm at 2 and HiHi alarm at 3. And will not acknowledge until the values are 2 less than alarm value.

 

Alarms only work if SV value is one greater than set alarm condition. Alarms only acknowledge when the SV value is 2 less than the value that caused the alarm.

 

I tried I8, I16, I32 and I64. All exhibit the same behavior.

PaulG.

LabVIEW versions 5.0 - 2023

“All programmers are optimists”
― Frederick P. Brooks Jr.
0 Kudos
Message 5 of 8
(3,557 Views)

Paul-

 

It sounds like you may have an issue with the installation of DSC, possibly a library that has been corrupted. You may want to try uninstalling DSC and reinstalling it. Give that a try while I look into this a little bit further.

National Instruments
Applications Engineer
0 Kudos
Message 6 of 8
(3,532 Views)

My problems and symptoms are getting worse. I started losing all of my SV's and started getting a tagsrv.exe error. So I did a complete uninstall and re-install of LV2009 and the DSC module. Still not working.

PaulG.

LabVIEW versions 5.0 - 2023

“All programmers are optimists”
― Frederick P. Brooks Jr.
0 Kudos
Message 7 of 8
(3,493 Views)

Hi Paul, 

 

The behavior that you are seeing with the alarms not being set until you get a value of 2 is the expected behavior.  When you set the value for an alarm, the alarm is not set until you pass the value.  Once the alarm is set, it is not released until you drop below the alarm level minus the deadband level. 

 

As far as your other issues go, are you still seeing them after your reinstall, or were your comments in regards to the alarming level?  

 

Brandon Treece

Applications Engineer

National Instruments

0 Kudos
Message 8 of 8
(3,459 Views)