Author Topic: Data Logging  (Read 4049 times)

DavidSr

  • Full Member
  • ***
  • Posts: 170
    • View Profile
Data Logging
« on: January 01, 2019, 10:18:24 PM »
I have what I think is a simple thing to implement and I have searched the forum but have not found detailed information on how to set up  logging.

For getting started, I have a couple Inputs I am monitoring that I want to keep a log of when the inputs go true and record the day and time to the second or at least the minute. ( later i want to log some values but I want to get the basics working first.)

I have started by creating a basic data logger and the text file was created, I set the plc address to a bit but no data is being recorded so I am sure I need to do more configuring.

Could someone point me to some clear instructions that are already out there somewhere for me to read on how to set this up? Is the basic logger what I want?,  or should I be using something else?

Thank you!

David
David

Phrog30

  • Guest
Re: Data Logging
« Reply #1 on: January 01, 2019, 10:55:23 PM »
I think there is a demo/sample project here:
https://sourceforge.net/projects/advancedhmi/files/advancedhmi/3.5/SampleProjects/

At this stage, are you wanting a text file or database?  I suggest you lean towards a database.  A little more complex, but I think worth it in the end.  The app(s) I reference in this thread https://www.advancedhmi.com/forum/index.php?topic=1813.15 have auditing, which will log to a local database (SQLLite - Xcopy install).  You can look through and see what I did.

James

DavidSr

  • Full Member
  • ***
  • Posts: 170
    • View Profile
Re: Data Logging
« Reply #2 on: January 02, 2019, 07:30:59 AM »
Hello Phrog, thank you for your time.

All I want is a flat file, No database. I will load it into OpenOffice Calc to do some analysis.  I looked at the list of samples but I really cannot tell by the names of the files if any have what I want. I downloaded "SaveDataTableAndRestoreCLX.zip" and looked at the files and it did not seem to be what I want.   As much as I appreciate your time I would rather not go through each of the files and load them up .

Since I see what I did so far created the "TXT" file for the data but it is not getting any data written to it. What do I need to do to get ADVHMI to populate it? Do I need to write some code?

Here is what I have done so far. ( Not Much but I do not know how to go forward.)

I tried a different values in Maximum points and no results. I don't know what that or some of the other settings mean.

I am using a PLC 5/20 with RS-Logix and RS Linx Lite. DF1 serial to communicate with ADVHMI

If I could just get a few instructions as to what steps I need to take to do this it would be much simpler. If you dont have time that's fine I will plow through it.

Thank you!
« Last Edit: January 02, 2019, 07:32:43 AM by DavidSr »
David

Phrog30

  • Guest
Re: Data Logging
« Reply #3 on: January 02, 2019, 08:04:13 AM »
Drag a basic label on the form and use that to test your comms with the PLC. I'm guessing you have something wrong in the driver setup. 

DavidSr

  • Full Member
  • ***
  • Posts: 170
    • View Profile
Re: Data Logging
« Reply #4 on: January 02, 2019, 08:47:41 AM »
Thank you for your reply,

No Comm problems, I have many data points being monitored / Integer, floating point etc. including temperatures and I/O controlled with no communication issues

Did you look at the image? Do I have it configured properly? What is Maximum Points setting for?

I should also mention, I can see the alarm triggering on the HMI, its just not logging it.
« Last Edit: January 02, 2019, 09:10:07 AM by DavidSr »
David

Phrog30

  • Guest
Re: Data Logging
« Reply #5 on: January 02, 2019, 09:53:57 AM »
I've never used this component, see if this thread will help.  Typically, when I have issues getting something to work in AHMI, I just look in the code to either see how it's supposed to work, or I change it so it works the way I think it should.  I don't have VS right now so I can't look.  Archie/Godra may be able to help further.

https://www.advancedhmi.com/forum/index.php?topic=2027.msg13153#msg13153

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Data Logging
« Reply #6 on: January 02, 2019, 12:03:19 PM »
Try changing the LogTriggerType to one of the other options. The WriteOnBitTrue works slightly different in different versions, so you may have an version that doesn't work as expected.

Also since you are using a serial driver, do you have RSLinx completely shut down so AdvancedHMI can get access to the serial port?

DavidSr

  • Full Member
  • ***
  • Posts: 170
    • View Profile
Re: Data Logging
« Reply #7 on: January 02, 2019, 12:29:19 PM »
"Try changing the LogTriggerType to one of the other options."

I will try that, but as far as serial communication. everything is working, I have other items communicating and I am able to turn things on and off and read data.
                      I am using DH+ plus to access the logic not df1

Thanks Archie  -- Oh I am using version 3.99x so is that an issue?
David

DavidSr

  • Full Member
  • ***
  • Posts: 170
    • View Profile
Re: Data Logging
« Reply #8 on: January 02, 2019, 12:39:04 PM »
OK Archie I changed the trigger to "DataChange" and that works but obviosly it is logging both states and I would rather it only logged when the bit is true so is there anything else I can do.

Also. Could you tell me what the other settings do./ What I should set them for?

Maximum Points
Log Interval
Poll Rate

Thank you!

Try changing the LogTriggerType to one of the other options. The WriteOnBitTrue works slightly different in different versions, so you may have an version that doesn't work as expected.

Also since you are using a serial driver, do you have RSLinx completely shut down so AdvancedHMI can get access to the serial port?
David

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Data Logging
« Reply #9 on: January 02, 2019, 01:39:46 PM »
Maximum Points - Limits the file size by stopping the logging at maximum points
Log Interval - Sampling time when LogTriggerType is set to TimeInterval
Poll Rate - does nothing

3.99x is the latest stable, 3.99y is a beta version

There is a control that was developed to indicate the time a bit went True and I think it logged it. I will have to do some digging to see if I can find it. Maybe it is in the Additional Components of this forum.


DavidSr

  • Full Member
  • ***
  • Posts: 170
    • View Profile
Re: Data Logging
« Reply #10 on: January 02, 2019, 03:20:09 PM »
Thanks Archie,

Is there a way to have it start a new file at a per-determined time?    Such as: 00:00:01
David

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Data Logging
« Reply #11 on: January 02, 2019, 03:24:46 PM »
In version 3.99y there is a property CreateNewLogFileDaily

There are also some modifications posted by Godra on the forum that shows how to add this functionality

DavidSr

  • Full Member
  • ***
  • Posts: 170
    • View Profile
Re: Data Logging
« Reply #12 on: January 02, 2019, 03:27:55 PM »
I guess you are going to post when it is stable? Out of Beta??
David

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Data Logging
« Reply #13 on: January 02, 2019, 03:45:01 PM »
I guess you are going to post when it is stable? Out of Beta??
It's fairly stable now only a known issue with the MicroLogix driver and an Omron issue being investigated. You can try it:

https://www.advancedhmi.com/forum/index.php?topic=2058.15

You may even be able to take the BasicDataLogger from it and put it in 3.99x

DavidSr

  • Full Member
  • ***
  • Posts: 170
    • View Profile
Re: Data Logging
« Reply #14 on: January 02, 2019, 07:20:08 PM »
Thank you, Is there much to do when upgrading a solution to a new version? Thinking of paying you to do it but if it is not much I might do it myself. In the mean time I might try just taking the data logger from it.
David