cadomanis Posted November 15, 2007 Report Posted November 15, 2007 I am finding a increasing need to log both faults and actions in my projects. I have typically done this ( at least for faults) by creating a latched copy of the fault, and then executing a logging subrouting whenever that latched version turns off. I also used the latched version of the faults throughout my code to control other actions/functions. When there are upwards of hundreds of these simple latching rungs, it can become a big mainteance drag / memory hog. I have come up with a new idea using a for-next loop strucuture to make things easier, but I am unsure about a few things. 1) Are the latched bits going to stay maintained from one execution of the subroutine to another. 2) Is the for/next strucutre going to prove very processor intensive and bog down my scan. I have attached a PDF of the code in questions. There is a singel example of the old method, as well as the new subroutine. Any feedbak would be greatly appreciated. Compeltey differnet ideas and solutions are of course also welcome. thanks, C- Fault_Logging_Ladder.pdf
Sergei Troizky Posted November 15, 2007 Report Posted November 15, 2007 (edited) Without deep study of the ladder attached: 1. Latched bit maintain its status until another action in the software alters it. Even power/PLC restarts and program downloads do not affect it. 2. It is unclear how long P3 will execute. If it is comparable with P2, 10-pass loop should not increase the scantime significantly. Avoid though increasing number of passes or the loop size, if scantime is critical. 3. As far as I know, You CANNOT index bits in FX-series (except FX3U). Edited November 15, 2007 by Sergei Troizky
cadomanis Posted November 16, 2007 Author Report Posted November 16, 2007 Thanks for the feedback. Couple of questions/points. 1. These are "latched" bits becuase I have latched them on in code. Not necessary latched in the battery backed sense of the word. I relaise in my example that they are in fact in that range, but do you think it works even if they are in the non backed up region. 2. I would think P3 should only execute each time it is called. IE any time a log request is made. 3. Maybe this is a change but I have confirmed in the manual that you can index bits ( as well as X,Y,etc) in the FX3U series. Thanks -c
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now