Jump to content

Data Logger Help


MWD

Recommended Posts

Hi,

I’m chasing my tail.  With a ladder, what is the most efficient logic to log a single table row with the state of 6 inputs and write a row with a 0 or 1 transition of any single input?  Can you point me to a sample that may help?  I know I need to set a flag but am having trouble getting it correct.

Thanks

Link to comment
Share on other sites

  • MVP 2023

If you don't have a program for Joe's ask.....

To me it looks like you are trying to find the way of triggering a write each time there is a change.

1   Set up a count that has 1 added to it with each input that is on.  No need to use rising pulses as we will reset this count every scan.

2  After the scan has gone past all the inputs that change, compare the count to the previous scan's count,  which has been moved into a "storage" MI at the start of the scan.

3  If the count is different then you have had a change somewhere so there is your trigger.

4  At the start of the next scan, first move the count to the "storage" MI, then reset it to 0.  The accumulation and compare process then proceeds each scan.

If you are trying to track inputs that are changing rapidly, you will fill your table very quickly!

cheers,

Aus

Link to comment
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
×
×
  • Create New...

Important Information

This site uses cookies. By clicking I accept, you agree to their use.