LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DSC Module Not connecting to Alarm and Events Database

Solved!
Go to solution

Working with the DSC Module and the SCADA demo project I have run into an issue

with alarm and event logging.
image.png

 

 

 

 

 

 

 

image.png 

 

 

 

 

 

 

 

 

When archiving, Archive Data.vi is unable to connect to the alarm and events database and throws an error.  I can confirm though that alarm and event logging is enabled for the variables that are generated by the Server. 

 

I can open the Historical Data browser in MAX and see the channel data, but I do not see any alarm events recorded there.  ( I cannot find any examples of what the recorded alarms in the historical browser are supposed to look like though )

 

I found this article here:

http://www.ni.com/white-paper/6579/en/

Logging Data with National Instruments Citadel. 

The article points out that Citadel is not used for alarm data, but MSSQL 2005 is.  Although I seem to have a reference to 2005, it appears that my PC is using 2008 R2 SP1.  image.png

 

 

image.png

 

 

 

 

 

 

 

 

 

Looking at the configuration for SQL server, it seems like maybe the wrong version was somehow installed, but I'm really not sure.

Is there a procedure for uninstalling and re-installing the MS SQL database that someone has had success with?

 

---------------------
Patrick Allen: FunctionalityUnlimited.ca
0 Kudos
Message 1 of 3
(2,858 Views)
Solution
Accepted by topic author pallen

If you're using a recent version of DSC it comes bundled with SQL Server 2008, so the version shouldn't be an issue.

 

The Alarms and Events appear as a separate item in MAX under Historical Data. You can create an Alarm and Event view by right-clicking on Citadel 5 Universe, then selecting New->Alarms/Events View. Select the target database, then after hitting OK, select the Display tab down the bottom to see an unfiltered list of all alarms and events. Hit the refresh button to update the alarm list.

 

A quick way to test everything is working is to start up the Distributed System Manager, then create a new process with logging and alarming enabled under localhost. Enter a database name, but your can leave the path blank and it'll log to the default database.

1_DSM_Process.PNG

 

Now create a variable under the new process, and on the Alarming page ensure alarm logging is enabled, and some alarm levels are checked. Also enable data logging on the Logging page.

2_DSM_Variable_Alarm.PNG

 

Set a new value for the variable, outside of the alarm range so you will see your variable go into alarm.

3_DSM_Alarm.PNG

 

Now if you fire up MAX and create an alarm view as I mentioned, you should see your new alarm appear in the alarm log.

4_MAX_A&E.PNG

 

It looks like you've verified the SQL service is running, but if you still have issues, try stopping and starting this service, along with the Citadel service and the NI Variable Engine service.

 

Good luck!

 




Certified LabVIEW Architect
Unless otherwise stated, all code snippets and examples provided
by me are "as is", and are free to use and modify without attribution.
Message 2 of 3
(2,832 Views)

This provided a key piece I was missing. 

 

I hadn't found anything on how to create the Alarm and Event view.  Once I had that, I was able sort out an issue and confirm that it's working. 

 

Thanks!

---------------------
Patrick Allen: FunctionalityUnlimited.ca
0 Kudos
Message 3 of 3
(2,825 Views)