adccommunitymod (AutomationDirect) asked a question.

Is there a good way to log discrete functions?

Created Date: November 25,2008

Created By: dieselvette

**** This post has been imported from our legacy forum. Information in this post may be outdated and links contained in the post may no longer work.****

Hi all, I am fairly familiar with the Cmore panels and how to utilize the line trend graphs, log numeric data to USB, etc. What I haven't figured out is a simple way to log when PLC I/O's are simply on or off. Without that it's really hard to tell what went wrong when unattended machinery has problems. Does anyone have any good ideas for this?


  • adccommunitymod (AutomationDirect)

    Created Date: November 26,2008

    Created by: Kristjan H

    How about using the respective I/O as a condition to load different values to a V-memory when on or off and then log that V-mem?

    For example, when Y0 is on then load K80 into V2500 and when Y0 is off then load K20 into V2500. Log V2500. This would show well in a trend graph that has range 0-100.

  • adccommunitymod (AutomationDirect)

    Created Date: November 26,2008

    Created by: dieselvette

    That's a good idea, it had crossed my mind. It just seems like there should be a simpler way that requires less programming.

  • adccommunitymod (AutomationDirect)

    Created Date: November 26,2008

    Created by: sparky13

    Along the same lines, you could capture the V-memory locations for your I/O (ie. V40400 ~ X0-X17) on a time base or event base. You couldn't view this like a trend graph, but you could log it and evaluate your machine conditions from it...

  • adccommunitymod (AutomationDirect)

    Created Date: December 06,2008

    Created by: dieselvette

    I don't quite understand how I would capture & log any memory location without the line-trend graph. Is there another logging function I'm not aware of? The info must be stored locally, on the USB memory, so I don't see how any "Event " could take care of that.

    Along the lines of Sparky13's idea - I can log V40400 as a decimal number, then use Excel to convert the decimal to a binary number.

    With a little more Excel programming I could probably parse the binary digits out to individual cells and essentially have a matrix of 1s and 0s, one column for each bit, and be able to visually see when each input was on or off.

    This method seems a bit cumbersome, the technology is there to make it much easier but apparently it's not present in the C-more or I can't find it. All I want to do is log about 40-50 bits of information, just simple 1s and 0s would do.

    The big hangup with this "solution " is that Excel will only go up to 10 bits, only converts numbers between -512 and +511 to binary. I obviously need 16 bit, so I would need to find a way around that.

    Expand Post
  • adccommunitymod (AutomationDirect)

    Created Date: December 06,2008

    Created by: dieselvette

    How about using the respective I/O as a condition to load different values to a V-memory when on or off and then log that V-mem?

    For example, when Y0 is on then load K80 into V2500 and when Y0 is off then load K20 into V2500. Log V2500. This would show well in a trend graph that has range 0-100.

    This is a good idea but I would consider it a last resort - I don't have remote access to the DL06 so any editing of the PLC program would be a bit "hairy " - If anything went wrong that would present a huge problem.

    I'm not afraid to play around with the HMI program because the PLC could operate the equipment independent of the HMI, so if the customer screws up the upload or the program isn't right it isn't an urgent problem. Also I could probably upload the program from our office without too much trouble (assuming the net works at the site that day).

    Expand Post
  • adccommunitymod (AutomationDirect)

    Created Date: December 06,2008

    Created by: Kristjan H

    I actually think that my idea is very simple and safe. The only thing you need to add to your ladder code is:

    Y0

    --| |------------|LD K80

    |OUT V2500

    Y0

    --| / |------------|LD K20

    |OUT V2500

    And then you use the line trend graph to log V2500 which represents the status of your output.

    But if you don't have access to the PLC or ladder code at all, then the solution is probably a lot more complicated.

    Expand Post
  • adccommunitymod (AutomationDirect)

    Created Date: December 06,2008

    Created by: dieselvette

    Our solution is this:

    Log V40400 (or respective location) as a decimal number using a line trend graph.

    This is very efficient in terms of disk space because the only recorded data is the date/time stamp and 1 decimal number. The csv file is simply 2 columns. Paste the 2 columns into an Excel spreadsheet & apply some formulas & conditional formatting to get a very intuitive display of which I/O's were on/off and when (see image).

    In this example there are only 4 inputs that are changing, of course there's room for 16 to accommodate the 16 bits in the v-mem location.

    I intend to log each V-mem on it's own chart to simplify the cut & paste, but you could use one chart and save even more disk space.

    Expand Post
  • adccommunitymod (AutomationDirect)

    Created Date: December 13,2008

    Created by: bmil

    Formulas & formatting?

    Can you assist me in formatting the data to get the resulting file you show in the screen shot? I have my BCD data for 40400 & 40500 in the files and imported into Excel spreadsheets. Although this is not a C-More or PLC question directly, if you can point me in the right direction with the formulas &/or formatting I would be grateful.

    Expand Post
  • adccommunitymod (AutomationDirect)

    Created Date: March 13,2009

    Created by: JArriola

    What I do is to actually log the unsigned int 32 data for 40400 and 40500. Then use a parse program to convert the integers into binary giving me set or reset bits. Then we insert those bits into a db table with a row for each individual in/out. I use the 32 so that I can get all 20 inputs. Works great.

  • adccommunitymod (AutomationDirect)

    Created Date: March 13,2009

    Created by: tdecant

    Using Events

    You could have an event for each on/off transition of your discrete value (Event Type = Tag) to write to internal integer tags (an integer representing each input and output) and then use the internal integer tags (Action = Tag) as a pen in your trend graph. Problem with this is lots of events in the database depending on how many points you want to record. Also, since each trend graph allows only 16 pens, you may need multiple trends. There is no PLC programming involved, however and little spreadsheet manipulating. All is in the C-More.

    Expand Post
10 of 12