Help - Search - Members - Calendar
Full Version: Data Logging with MicroLogix 1500
Forums.MrPLC.com > PLCs and Supporting Devices > Allen Bradley
kilolima
I am new to PLC, and I am using MicroLogix 1500 with RSLogix 500. I want to log the analog input every fixed time interval (e.g. 0.1sec). The DLG block does a data log every time when the rung goes from false-to-true. So, I am trying to build a clock signal to toggle that rung using TON timer but without success.

My attempt is as follows:
1) B3:0/0 is used to turn on/off the TON timer rung and the DLG rung.
2) When the timer reaches the preset time (i.e. T4:0/EN becomes true), I reset the B3:0/0 so that timer and DLG rungs will be turned off.
3) I have another rung that has XIO on T4:0/EN so that when the timer is not enabled, I would set B3:0/0 to turn on the timer.

The last step 3) is supposed to be my looping mechanism to keep the toggling going. But I think I am missing something. It is toggling freely and continuous, not at the set time interval.

Is my approach wrong? Is there another way or more conventional way to do data logging? My ultimate goal is to log an analog input signal (via the analog input module) every 0.1sec for a duration of 90sec and preform an integration of this signal. This signal is proportional to a gas flow. The integration with time will give me the total gas volume which is what I am trying to determine.

I will appreciate any suggestion or pointer. Thanks a lot!

Edit:
Here is a screen shot!

IPB Image
BobLfoot
QUOTE(kilolima @ Sep 28 2006, 06:48 PM) [snapback]40964[/snapback]

I want to log the analog input every fixed time interval (e.g. 0.1sec).

This is an excellent program description for the simple task you are trying to achieve.

QUOTE(kilolima @ Sep 28 2006, 06:48 PM) [snapback]40964[/snapback]

So, I am trying to build a clock signal to toggle that rung using TON timer but without success.

Building a clock signal to trigger the sample is an excellent approach

QUOTE(kilolima @ Sep 28 2006, 06:48 PM) [snapback]40964[/snapback]

Is my approach wrong?

Your approach is not wrong, but you missapplied your premise partially.

QUOTE(kilolima @ Sep 28 2006, 06:48 PM) [snapback]40964[/snapback]

Is there another way or more conventional way to do data logging?

A timer to trigger the sample is probably the most simple approach.

QUOTE(kilolima @ Sep 28 2006, 06:48 PM) [snapback]40964[/snapback]

I will appreciate any suggestion or pointer. Thanks a lot!

Before I give you a pointer let me try and explain where you went wrong. To do that lets play computer.
SCAN 1 Rung 0 - B3:0/0 is false and Timer does not enable or time.
SCAN 1 Rung 1 - T4:0/DN is False so B3:0 is not cleared.
SCAN 1 Rung 2 - T4:0/EN is False so B3:0/0 is turned on.
SCAN 1 Rung 3 - B3:0/0 is True so DLG executes.

SCAN 2 Rung 0 - B3:0/0 is true and Timer does enable and time.
SCAN 2 Rung 1 - T4:0/DN is False so B3:0 is not cleared.
SCAN 2 Rung 2 - T4:0/EN is True so B3:0/0 is turned off.
SCAN 2 Rung 3 - B3:0/0 is False so DLG does not execute.

SCANS 3,5,7, ... Match SCAN1

SCANS 4,6,8, ... Match SCAN2

The fix is really quite simple change the OTE in Rung 2 to an OTL instruction. That way B3:0/0 stays on until cleared by Rung 1 which will not occur till the Timer is done. This should give you your expected result.

Post again if this does not work or you have more questions. Also post and let us know you succeeded.

kilolima
Thank you very much for your detailed explanation. Now, I see the difference of OTE and OTL. I got it to work with OTL and OTU instead of simple OTE and CLR just as you suggested. (I changed to OTU as well because CLR has no effect when the bit was set with OTL. It has to be unlatched by OTU.) Here is a screen shot of the working ladder logic:

IPB Image

Thank you so much again. That was extremely helpful. Greatly appreciated it!!
Mickey
This would have been the normal way to do it. But whatever works.



This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.