Sign in to follow this  
Followers 0
callelundin

Citect and Database connection

4 posts in this topic

Hey there! Im pretty new on Citect and i have a question, or some questions that i hope that you guys/gals can help me with. Im using Citect to collect Integer Values, and now i vould like to log them into a database. When reading helpfiles and manuals im getting a bit confused, this it what i have done so far. I have made a database called log.dbf and its located in c:\db\log.dbf, it contains 2 colums first Name,C,8 and second Value,C,8. This is done by Open Office Calc. In the ODBC setup of Windows controlpanel i have 3 datasources "dBASE Files, Excel Files and MS Access Database". There i have done a setup on dBASE Files and pointed the Name of source to c:\db\ This is the tricky part, in citect i've done a "Device" Name log Format {Name,8}{Value,8} Header Name File Name c:\db\log.dbf Type dBASE_DEV Comment Logfile (dBASE) And thats about it, im not sure im on the right track here, do i miss something for the connection? Im very "new" to this. Maybe somebody out there can point me in the right direction! Thanks people! :)

Share this post


Link to post
Share on other sites
I think you should use OPC for this. You can leverage the OPC Server in Citect and ODBC Client for OPC to implement what you are trying to do easier: Install this client and connect it to your Citect OPC Server, and then you will be able to transfer data points from Citect to the DB and vis versus: http://www.matrikonopc.com/products/opc-ar...t-for-odbc.aspx Hope this should help Wassim Daoud Global Solutions Architect www.MatrikonOPC.com Edited by Wassim

Share this post


Link to post
Share on other sites
You actually have a number of options - of course the Matrikon guy would recommend a Matrikon solution ~grin~ (which ought to work fine, of course) However, you also have the option of using CitectHistorian, which will transfer the tag data to MS-SQL and is free for up to 10 tags. In addition, the Process Analyst will permit you to export trended data to Excel and from there you can do anything you want. We also have the ActiveX tool 'DatabaseExchange' which will also permit the transfer of data to and from a SQL source, but I'm not sure whether this can be automated. All of these options are extensively covered in our training courses which are conducted around the world. David Heath Senior Instructional Specialist Schneider Electric

Share this post


Link to post
Share on other sites
Hey all! Like you all say, there is a lot of ways! I needed it to only use CiCode and i need it to be in an excel or similar dbase. This is how i made it work. Every time i activate the Write_log() i will get my two tags in a new row on a *.dbf file that citects create. Now i have it in a dbase and can add a timestamp to it if i whant to. :) Thanks for your suggestions and support!:) FUNCTION Write_log() INT hDev; STRING Name, Value; // Open the dbase device hDev = DevOpen("log"); //Write data DevWrite(hDev,Name); DevWrite(hDev,Value); //Close the dbase device DevClose(hDev); END

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0