SLC 500 execution time suggestions

mordred

Member
Join Date
Mar 2004
Location
Red Deer
Posts
1,892
I've got a future project on a 537 rail system each rail uses 9 input and 4 output not including other I/O. This will end up being an extremely large program so scan cycles can become an issue. I've found several ways already to save on execution times such as uses extended loops instead of nested loops. Looking for other ideas on execution time savers. There is no specialy I/O modules and the app is all discrete I/O the only mathematics will involve counting per rail probably use indirect addressing for this to save on counters. Already have a copy of the SLC 500 reference manual and looking at different instructions and their execution lengths any other suggestions would be appreciated
 
Last edited:
Indirect addressing is expensive in terms of scan time. If scan time is a concern I would avoid indirect addressing.

All it takes is one false to make a branch false. As sooon as the logic engine determines that a branch is false it will stop evaluating other instructions. Think you logic through from that standpoint. Put the items most likely to be false to the left of a branch/rung. If, for example, you have 5 permissives that are usually true and one trigger condition, put the trigger to the left.

The CPT instruction is relatively expensive. If all you have to do is a simple operation, use the simple instruction.

Keith
 
your portion on the false is a strong consideration and I will definetely strive to do this looking at how the execution times work this certainly makes sense. One thing I should mention is no two rails will be operating at the same time in this the rails will be sequential. However memory to handle so many I/O points and keep track of how many products have been indexed on each rail may be more problems than its worth. I may simplify this by usage of a full rail switch rather than a count to save on the indirect addressing. I'm also considering panel view to reduce I/O counts this panel will eliminate the need for mechanical switches as to which rails are in service and can or cannot be used. However I will try to poll the panelview to PLC at a reduced rate
 
If you can group your I/O and rails so that you can look at an input card word to determine if a group of Rails is dormant and have that group in a subroutine that can be scanned or skipped according to the input configuration then you can make the program only scan the groups that are in use. Be sure to put in management to handle turning on/off outputs when the subroutine is being disabled.

I would set an active bit for the subroutine that goes false only when all outputs are properly handled in each subroutine.
 
I beleive that should be simple enough by placing the rail selector code on the left this will make the statement false following Kamenges advise. The grouping of the rails is also good advise as it not only aids in the scan times but also in the troubleshooting down the road. With the suggestions already provided its starting to sound like this will be easier to keep a good scan time that I first surmised
 
A corollary to kamenges' post above is: In a series of branches, place the conditions most likely to be TRUE in the top branch. The reason is that when the engine finds a true branch it 'knows' any remaining branches are irrelevant and skips them.
 

Similar Topics

I have a program that I've used 100 times. SQO settings: File N7:0, Mask 0FFFFh, Dest B3:1, Control R6:0, Length 8, Pos 2. Length & Position...
Replies
48
Views
943
Everyone, i am in the process of purchasing the Slc 500 version of software to support what we have and i have a question. Several of our...
Replies
9
Views
751
In a slc 500 plc I am trying to move data with out using a lot of moves. I want to move data from n7:1 to n7:2 and data that was in n7:2 to n7:3...
Replies
16
Views
1,348
Customer has a circa 2004 SLC-500 PLC. Fieldbus is a 1747-SDN DeviceNet scanner. Customer has SLC-500 file (.rss) with no comments. Has no *.dnt...
Replies
7
Views
549
After I tried wiring, I used computer program communication to read the PLC N value, but received a NAK signal. And the DL3500 CHA light keeps...
Replies
0
Views
419
Back
Top Bottom