For STL professionals?

Hi specialists,

So here I bring some interesting interview exercises that has to be done in STL (IL). I've been working with S7-300 but to be honest, I would have some problems to do that in STL. Any of you ready to take a challenge? Making these in Java (in my place) wasn't so difficult, but I would be grateful for any solutions in STL, just for curiosity.

[FONT=&quot]Exercise 1[/FONT]
[FONT=&quot]Perform adding two numbers of type STRING and get result as STRING type[/FONT]


[FONT=&quot]Exercise 2[/FONT]
[FONT=&quot]Split a 3-digit number into 3 single numbers that will be placed in 3 consecutive bytes. Then perform reverse action and build a 3 digit number from three consecutive bytes.[/FONT]
[FONT=&quot]
[/FONT]

[FONT=&quot]Exercise 3[/FONT]
[FONT=&quot]Execute „circling 1” in one Word, but the place where you shift a bit is specified by POINTER[/FONT][FONT=&quot][/FONT]
 
Homework ?

Hints:

1. You can call other blocks in STL. Even blocks from the standard library.

2. BCD is your friend.

3. If you shift or rotate the bits in a word, then all bits are shifted/rotated not just one bit. So this one is unanswerable.
 

Similar Topics

Hi, I am trying to make a small code which is checking on the status of a bit struct which has 32 bits DB602.DBD72. It want to flag if any of...
16
Replies
701
Views
HI CALL "CONCAT" IN1 :=P# L 2.0 IN2 := P# L 22.0 RET_VAL:= P# L28.0 error
14
Replies
658
Views
Hello everyone, I’m working with Siemens SIMATIC Manager STEP 7 V5.6 (S7-300) and need help converting barcode data into a STRING. I have a...
5
Replies
721
Views
Looking for opinions on the best resource for STL programming. Books, videos, courses…etc
11
Replies
1,063
Views
We can convert the value entered from the HMI to time with the division operation and the T_Conv function as we did in Ladder, but does anyone...
18
Replies
2,510
Views
Top