stl in s7-300

Kceaglesfan

Member
Join Date
Jan 2021
Location
Kansas
Posts
6
First off thank you in advance. Second I am very new to STL.

I am trying to build a counter that has one count up and 23 count down options. Am I doing this correctly?
A "SYSTEM STARTED"
L C#0
S C 5
A "PE-289 @ 2:1 MERGE"
CU C 5
A "415TRANSFER UP 1/2"
CD C 5
A "415TRANSFER UP 3/4"
CD C 5
A "415TRANSFER UP 5/6"
CD C 5
A "415TRANSFER UP 7/8"
CD C 5
A "415TRANSFER UP 9/10"
CD C 5
A "415TRANSFER UP 11/12"
CD C 5
A "415TRANSFER UP 13/14"
CD C 5
A "415TRANSFER UP 15/16"
CD C 5
A "SOL CT418-1"
CD C 5
A "SOL CT422-1"
CD C 5
A "SOL CT422-2"
CD C 5
A "SOL CT422-3"
CD C 5
A "SOL CT422-4"
CD C 5
A "SOL CT422-5"
CD C 5
A "SOL CT422-6"
CD C 5
A "SOL CT422-7"
CD C 5
A "SOL CT422-8"
CD C 5
A "SOL CT422-9"
CD C 5
A "SOL CT422-10"
CD C 5
A "SOL CT422-11"
CD C 5
A "SOL CT422-12"
CD C 5
A "SOL CT422-13"
CD C 5
A "SOL CT422-14"
CD C 5
A "RESET COUN"
R C 5
A C 5
= "COUNT FLAG"
L C 5
A C 5
T "C5 TOTAL"
 
I tried with just a normal cu/cd but I could not compensate for 2 or more outputs going high at the same time. Which was causing me to end up with a higher count than objects there. Co- worker suggested STL.
 
You will need to write your own custom counter to achieve the functionality required. Cut down example attached using a function block.
 

Similar Topics

Hi.Can I convert the block written in stl mode below to ladder mode? L #InOctet SLD 3 L #InBit OW T...
Replies
2
Views
560
Another STL question. In the attached screen shot the line with = #sf.S01_Dryer_ON dose not have the RLO on. But if we look lower in the logic...
Replies
4
Views
1,228
Hello, I am still new to STL. But from what I understand is the JC mnemonic should jump if RLO = 1. If we review both pictures the M0bf RLO = 1...
Replies
5
Views
1,058
Hi, I am useless at STL and not fortunate enough to have SCL. I am trying to do the following; MW1 := 6 MW2 := 400 DB100.DBW[MW1] := MW2 So store...
Replies
3
Views
1,661
I'm not used to program in STL and I have some issues in set (S) and reset (R) instructions in the following commands: ====================...
Replies
5
Views
2,956
Back
Top Bottom