Sign in to follow this  
Followers 0
Emach

New stages

5 posts in this topic

First a little about me: I am a newbie in the controls arena, previously working in systems level engineering and display hardware development. I changed careers back in February and went to work for a company manufacturing automotive components. I am 1 of 2 EE's at this facility and have an entire testing lab, approximately 10 or so machines assigned all to me. The other EE works on keeping the manufacturing lines running and hasn’t played with AD PLCs in several years. Onto the problem at hand, I have a older testing machine running a DL405-440 processor and was recently tasked with implementing some new functionality. The new test relies on the PLC seeing a 4-20mA speed coming from a Yokogawa 800 plus meter reading quadrature. When the PLC sees the speed fall below a certain set point it energizes an output. My issue is even after stripping the program down to its minimum (140 rows compared to over 230) and removing references to now nonexistent stages, I am really missing my speed setpoint. Using some math and product data sheets my delay from the Yokogawa meter seeing the speed to the output energizing should be 180 ms total. The PLC's loop is 85 ms of that delay... It should be getting new readings from the meter every 40ms (10 ms gate time and 30 ms to set the new mA value). A separate high speed data acquisition system (a NI cDAQ) watches the speed from the same sensor, but off of a separate output and not through the meter, and the target output. This is how I know I am really missing my speed setpoint. Assuming the 180 ms delay is the real delay I see in the system I should be activating that output at a much higher speed but I am not. My guess is that I am getting caught in other program loops and thereby artificially inflating that loop time. So my question is any pointers for how to get the PLC to call the stage with the speed check and output after every stage? I tried simply adding jumps to my output stage at the end of each stage all I managed to do was to break my program flow. Any help would be greatly appreciated. Regards, Emach

Share this post


Link to post
Share on other sites
1. 85 ms seems like quite a long scan time in my experience but it may be reasonable in yours. I typically shoot for 10 ms or less. 2. Place the testing in a subroutine. Call the subroutine (GTS) as often as you need. If, in the subroutine, you need to turn on the output use an OUTI (Out Immediate) command. 3. Setting a stage bit does not call a stage at that point, it merely marks it for execution when the scan gets to that point in the program. Good luck Edited by b_carlton
1 person likes this

Share this post


Link to post
Share on other sites
Thank you for your quick reply. The system has a Ethernet/IP card on it, a serial I/O card for interfacing with a Quick Panel, a 4 pt analog in, a 4 pt analog out, a 8ch? thermocouple card, 8 point Triac output, 16 pt 24V input and a 8 pt relay output card on it... Is this a lot of I/O for a 440? Even after removing my added code and moving it to the subroutine, scan time only dropped 2 ms. I tried the subroutine and jumped only to necessary stages to optimize my scan time and surprisingly the speed at which it actuated decreased! :/ I did implement the OUTI and did notice an improvement in the non-subroutine version of the program. Now I am thinking of reorganizing my program to have my test as a stage immediately after I acquire and calculate the speed. When I hit the test start button, it will reset all non-essential stages and only set the speed data acquisition and test stages.... One other quick question. If I use variables or contacts in the high range i.e. C1770 or V10050 does this require the PLC to set aside the other variables/contacts even if I am not using them?? Could this be the culprit for my slow scan time?? Edited by Emach

Share this post


Link to post
Share on other sites
No - the memory space is fixed and using a given area should not change the scan time.
1 person likes this

Share this post


Link to post
Share on other sites
Ok that's good news, I do not have to reassign those high value variables and contacts then. Thank you sir for your assistance.

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