Joined on 09-23-2008
Event Logging to MySQL
I am infinitely close to purchasing the Snap Pac Learning Center and the OptoDataLink software. My initial goal is simply perform a proof of concept, and to raise some excitement within management to invest into a project involving data acquisition using the opto22 gear. I would like to be certain that the software and hardware is capable of the desired end result, which is:
Log to a database only when an event occurs. The event will be detectable using a solidstate relay. The event will only happen about three times withing a 24 hour period.
After looking into the literature I can see that the Opto DataLink software is capable of datalogging to a database. But datalogging usual is set to occur on time intervals and not an triggered event. In the literature I can also see that one can set a condition, “depending on”, and I assume that this funtion can be used for my needs.
Any thoughts are greatly welcomed.
Report 10-23-2008, 11:57 AM
Joined on 12-08-2004
Re: Event Logging to MySQL
Yes, it sounds like it will suit your application. Once you select the drop down box ‘depending on’, you get the choice of ‘always’, ‘opto 22 device’, ‘database’, or ‘combination’.
Once you select ‘opto 22 device’, you then have the option to select what condition on the controller, a variable, or I/O point for example. When you select a data type, you then get the option to continually log data while that data is true (and stopping when false), or you can log just once, or, you can log once and then have OptoDataLink set the data back to false.
So, depending on how much data you need, you could have a strategy (chart) read the point and set a variable true which would start OptoDataLink logging the data you select. It could log it once, or just keep going until you chose to set that variable false, or have OptoDataLink set it false once it has one sample of data. Your chart could see that variable go false and it could then know that the data has been logged.
Of course just having the data logged while ever the solid state relay is on is an option as well.