top of page

WELCOME
Search


Using arrays of variable length as FC/FB arguments
Suppose you have an array of integers that has to be sorted. How would you implement a function that sorts it? The function should be able to take arrays of any length right? How do you express this in SCL? Typically arguments are type checked before calling the function. In SCL the array length is part of the type. This means that Array[1..10] of BYTE and Array[1..15] of BYTE are actually two different types. In other words - the lengths of the argument / actual argument a
Ivaylo Fiziev
2 days ago2 min read
Â
Â
Â


Practical use case: Sorting arrays
How do you arrange the elements of an array in ascending/descending order? This trivial problem has an even more trivial solution - you...
Ivaylo Fiziev
May 30, 20252 min read
Â
Â
Â


Practical use case: Distance sensor (PoC)
How do we check if the position of a 3D point is above or below a given 3D plane? This is a classic math problem and it has a well known...
Ivaylo Fiziev
Dec 9, 20244 min read
Â
Â
Â


Recursive vs. iterative SCL code
There are two approaches to solving a problem in computing that requires visiting a lot of states. Iterative and recursive. The iterative...
Ivaylo Fiziev
Mar 20, 20242 min read
Â
Â
Â
CONTACT

bottom of page
