PLC logging I/O changes

I am looking for a way to log every I/O change in a PLC for troubleshooting. I have come us with a solution but would like to know if anyone else is doing this or has ideas.

What I am trying to do is record in a database (like SQL server or Access) ever change of real world I/O. I can used Visual Basis to communicate with the PLC and record values. What I have come up with is to look at 16 I/O points as a word. When this changes in any way write it to a register in the PLC, also record the date/time in another register. The register tables will be quite large. So the list will grow, then when it gets to the end start back at the beginning, a circular buffer. The VB program will look at these registers and then write then to a database, I will have some handshaking to make sure that I only record new records. Also I will have a pointer to tell which I/O word they are looking at, and VB will record it in the DB as a binary number so each point can be seen. If Access is used I will make a new DB every day. Then if there was problem we can go back and look to see what happened. There could be up to 160 words or 1600 I/O points.

This is what I have come up with so far, any ideas?

Reply to
wg
Loading thread data ...

I may have reinvented the wheel but I have not found a wheel so I have to start somewhere.

handshaking

Reply to
Wade Greene

If it needs inventing, then invent it. You've done pretty well so far. One other alternative is to have your PLC send only the point number(s) which changed and the time it changed. That would do better to determine sequencing.

Reply to
Herman Family

Thought about that, but I am looking at 1600 points, that is a ton of logic and db space.

communicate

Reply to
wg

Well you can do it effectivelly if you have enough registers in plc. One approach is to make a simple logic which compares registers representing current I/O with the stored values representing values at the end of previous scann. If there is difference send it to logger plc. After this is done move current values to "memory register". This will take some cpu time from PLC. The other approach is to have logger pc retrieve i/o state data from plc in predefined interval and do the previous logic on pc. If your plc uses separate processor for communication this might be the solution for you, otherwise the first is better. How much data will that be? If changes happens 10times/second storing data for 1600 points will generate a file of 86400s*10sps*1600pts/16ptspw+ts =~ 100 MB, to record on this speed your plc should be able to do data transmition of 33KB/S and be able to process logic.

Reply to
hot_sosage

PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.