Robst Posted July 9, 2008 Report Share Posted July 9, 2008 Hello: I´m trying to log User Defined Events to a Citadel Database. I've created a Citadel Database, some Shared Variables, and I've configured the Libraries to Log Alarm and Event data to the same database used for Data Logging. I thought that calling the "Set User Defined Event" VI would generate the event and log it to the database. However this doesn't happen, because I'm not able to log any event to the database. When I try to query the database using the "Alarm and Event Query" VI, I get an error message that says: "The given Citadel Database is not currently configured to log alarms to a relational database", but the database IS configured to log alarms (It's specified in the library properties). I can log data and see the traces in MAX/LabVIEW, but can't log alarm or event data. I've checked out the database directory and the files "mssql.ldf" and "mssql.mdf" are missing, but I don't know why. The default database that comes with DSC has both files, and when I query it I have no problems, but all the databases that I create via MAX or LabVIEW doesn't have that files. In further investigation I've found that this may be happening by a problem in SQL Server Express (the DB engine behind Citadel) so I uninstalled/reinstalled DSC (which includes SQL Server Express) but the problem is still there. I can see that the events are generated, because I can see them when I call the "Read Events" VI, but I can't log them to the database. This is driving me mad, no more ideas right now. Any help is appreciated. I'm using LabVIEW and DSC 8.2.1 Thanks in advance. Robst. Quote Link to comment
PaulL Posted July 9, 2008 Report Share Posted July 9, 2008 Robst, Are you configuring shared variable events and alarms or trying to log some other kinds of events? Did you configure the shared variables themselves for alarms and logging? Paul Quote Link to comment
Robst Posted July 9, 2008 Author Report Share Posted July 9, 2008 QUOTE (Paul_at_Lowell @ Jul 8 2008, 03:28 PM) Robst,Are you configuring shared variable events and alarms or trying to log some other kinds of events? Did you configure the shared variables themselves for alarms and logging? Paul Hello Paul: Thanks for answering, well, I'm trying to log shared variable events and alarms and also user defined events. I was trying to generate and log user defined events using the "Set User Defined Event" VI, but I haven't had success right now. Neither the shared variable event nor the user defined events are being logged. Right now I can't log alarms and events in any database, including the DSC Default_Database. And yes, I've enabled logging and alarming for each of the shared variables. Any ideas? Thanks in advance. Robst. Quote Link to comment
Robst Posted July 30, 2008 Author Report Share Posted July 30, 2008 Hello: This issue is already solved, but I post the solution in case somebody finds himself/herself in the same trouble. You can find the solution here: http://forums.ni.com/ni/board/message?boar...=340779#M340779 But it's in spanish =P, so I offer a description of the solution here. The problem was that you cannot log alarms and user events to a database before storing some data in a trace. Once you have data, now you can log the alarms and events. Also, I couldn't log any alarms and events because I was creating the database in a folder inside "C:\Program Files" and the DSC engine didn't have access to it, so it couldn't write the files mssql.ldf y mssql.mdf. You can modify the access permissions following the instructions in this document: http://digital.ni.com/public.nsf/allkb/7B8...F8?OpenDocument (In Windows XP, in order for the security tab to appear in the folder properties dialog, you have to reboot in safe mode) Hope this helps. Robst. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.