Sign in to follow this  
Followers 0
kilolima

Data Logging with MicroLogix 1500

4 posts in this topic

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! Edited by kilolima

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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: Thank you so much again. That was extremely helpful. Greatly appreciated it!! Edited by kilolima

Share this post


Link to post
Share on other sites
This would have been the normal way to do it. But whatever works.

Share this post


Link to post
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
Sign in to follow this  
Followers 0