11-13-2008 04:06 PM
I have just set up an OPC server to communicate with an SLC 5/05. I can successfully pull individual points with the 'Datasocket Read' tool.
In a discussion with an NI support person, they suggested that I have the tags sync with the Citadel database and then use the data with Read Trace and the other DSC tools.
My issues are:
- how do I administrate the Citadel database? My standard SQL tools are not able to connect. I can't see the databases and I cannot set security.
- how do I set up the OPC server to sync tags into the Citadel?
- what will be the database name once the tags are in?
Thanks,
Dave
11-17-2008 08:49 AM
Hi David,
The easiest way to setup the OPC server to "sync" with the citadel database is to create a SV for each tag that you need to sync. Then you can turn on datalogging (which will write to the Citadel) and bind them to the tag. The way I've done it in the past (there may be a better way) is to use RSLinx as the OPC Server (I've also used Kepware) and then the SV are bound to the OPC item in the Server through an IO Server. Once the OPC Server is setup you can create a IO Server in Labview to connect to the OPC Server. Then it's easy to bind SV through the IO Server to the OPC Server.
This does require the DSC module which creates other problems if you need to distribute this to a client without LabVIEW, But it's by far the easiest way as you can have you system setup in a half hour if you don't have very many tags!
Good Luck,
Matt
11-18-2008 08:33 AM
Thanks for the response Matt but I have discovered I have a deeper problem.
I cannot connect to the Citadel database with the SQL 2005 Management Studio Express. I believe that this is my own fault ... I had to transfer my original install to a virtual machine. I had to re-activate all of my licenses so it obviously wasn't a seemless move.
I suspect I have broken the Citadel database (or at least the security for it).
So my new question is: How can I blow away the Citadel database and get a clean one set up? There is no data in the database to be concerned about.
Thanks,
Dave
11-18-2008 10:26 AM
Update: It turns out that it was SQL Server 2005 that was messed up. I have blown it away and installed a clean copy of SQL Server 2005 Express.
Anyone know how to rebuild the Citadel instance?
Dave
11-18-2008 10:15 PM
Hello Dave,
Could you elaborate on how you are writing to the database? Are you using the DSC Module?
11-19-2008 10:14 AM
Hi Dave,
If all you want to do is remove Citadel, and reinstall it, simply uninstall the LabVIEW DSC Module, then reinstall it. In Windows just go to add/remove programs, then select National Instruments software. This will give you a list of all NI software, where you can choose just the DSC Module to uninstall.
Regards,
11-19-2008 10:21 AM
Thanks Brian .... this will at least get me back to square one with a working database.
I will post a clarification to my question above once I have this up and running and see what it looks like.
Dave
11-19-2008 04:22 PM - edited 11-19-2008 04:23 PM
Thanks to Brian, my Citadel is up and running.
So here is my question:
First some background: I am new to Labview DSC and OPC stuff and fairly new to Labview. I am an experienced programmer and an SQL SA
My current state:
- I have an OPC server set up talking to an Allen Bradly SLC 5/05 PLC
- I have successfully tested it with the OPC Quick Client and with Labview's DataSocket Read tool ... I can get data from the PLC
I could write code to access every tag individually with the DS Read tool but that seems like it is the hard way and it seems like it would hammer the PLC with a lot of traffic.
In talking with an NI support person, they said that I can get the OPC server to sync tags with the Citadel database and then I can use ReadTrace to pull my data. I may have this wrong but this is how I understood what she was saying.
So my question is: How do I get the OPC server to sync tags with Citadel? I have no idea where I would go to set this up.
Regards,
Dave
11-20-2008 01:57 PM
Hi Dave,
The easiest way to do this is to create shared variables in LabVIEW that are bound to OPC tags, and enable logging in their properties. Once these variables are deployed, data will be logged to Citadel. You can find a lot more inormation here, and in the LabVIEW DSC Help. The DSC Module also comes with examples. Check out Help>>Find Examples... in LabVIEW, then browse to Toolkits and Modules>>Datalogging and Supervisory Control.
11-20-2008 03:48 PM