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
Â
Â
Â


A DSL for high level robotic tasks
The purpose of any Domain Specific Language (DSL) is to make your life easier when working in a specific domain. Robotic languages are no exception. Each of them is already a DSL specific for the given robot vendor. They simplify your life with high level move and IO instructions for example. What they allow you to do is express your intent, not the details behind it. You state what needs to be done, not how it should be done. If you take this idea a little further and imple
Ivaylo Fiziev
3 days ago4 min read
Â
Â
Â


Using regular UI to write code. A hoax or a marvel?
What is a programming language? Simply said it is a formal, unambiguous way to express logic. The logic is expressed as a sequence of instructions known as statements. Behind each statement there is a state machine defined by the language grammar. Language grammar is recursive by nature. This means that the state machine is complex. Depending on the statement's type the state machine can contain branches and/or loops involving the state machine of other statements. Statem
Ivaylo Fiziev
Jan 95 min read
Â
Â
Â


Distance sensor (Release)
The distance sensor prototyped here ( Practical use case: Distance sensor (PoC) ) is about to be released in version 2606 EAP. The concept stays the same. It calculates the dot product of the sensor's normal vector and the minimal distance vector from the part to the sensor. The dot product is then used to check if the part is located in front of the sensor and if the part lays within the sensor's field of view. If both conditions are met the minimal distance to the part is
Ivaylo Fiziev
Dec 18, 20253 min read
Â
Â
Â


SCL editor update
The text editor for SCL has been problematic since the very beginning. Major pain points are: The code completion window pops up inappropriately. There is a dual selection for the candidates which is frustrating. Code validation is limited due to the inability of the control to underline random characters. Highlighting is there but problematic for us to support. Inserting/Removing text is sometimes awkward. New lines are inserted for no reason. Special characters (Alt Gr) can
Ivaylo Fiziev
Dec 4, 20252 min read
Â
Â
Â


Modifying the SCL search path
By design SCL scripts, referenced by the main FB are loaded from the SCL vault. This is a folder underneath the Process Simulate installation folder (Scripting\SCL\Vault). For us the vault allows distributing out of the box scripts. Users are also expected to update the vault with their own scripts before using them in the SCL editor. This is done via the 'Import SCL block' command or by simply copying the scripts there. Q: What is the problem with this approach? A: Depend
Ivaylo Fiziev
Nov 27, 20252 min read
Â
Â
Â


Practical use case: Counting operation runs
This post is inspired by a recent question in the Siemens community forum ( https://community.sw.siemens.com/s/question/0D5Vb00000rlev1KAA/help-with-counter-triggered-by-operation-end-signal-in-process-simulate ). It seems generic enough to be mentioned here. It is actually pretty simple but can be really useful in many situations. So how do you count how many times an operation has been executed? You just increment a counter on each pulse of the operation's end signal. A
Ivaylo Fiziev
Nov 21, 20251 min read
Â
Â
Â


Practical use case: Volume sensor (PoC)
This should be a device that detects a substance within a specified volume of space. Usually used in security systems this kind of sensor is also known as a volumetric motion detector. It detects changes in the volume it covers by filling it with energy patterns and recognizing disturbances in the patterns caused by any moving object. In our case it works by simply looking for interference between the geometry of volume itself and the geometry of any part appearance. As you
Ivaylo Fiziev
Nov 7, 20251 min read
Â
Â
Â


Visualizing the RFID sensor range
Sensors implemented with SCL are nice to have but we currently cannot show any graphical indication of their detection range or field of view. This would help us understand better how they work. The LiDAR sensor does it already but the logic there is not reusable. What if we could manipulate some primitive geometrical shapes straight out from the SCL code? Imagine that we can render a sphere indicating the RFID sensor range for example. Also we can render a cone indicating t
Ivaylo Fiziev
Nov 4, 20252 min read
Â
Â
Â


How to use the SCL debugger
I've never done a post related to how the SCL debugger is meant to be used. Here it is - following some recent questions from colleagues. You can imagine the SCL debugger as a simplified version of the debugger you have in Visual Studio. It only covers the basics. As you might happen to know Visual Studio works in its own process and attaches to the process running your code when you debug. Usually you pick the process from a list and then select the debug engine (native, m
Ivaylo Fiziev
Oct 26, 20256 min read
Â
Â
Â


Goto statement
The unconditional jump instruction is here. It is strange to announce such a trivial thing but it was a real challenge to implement. What makes it hard? It is intended to work on a flattened program tree. Flattening the program tree is the actual problem. In version 2512 we have it working with some limitations. But lets start with a short introduction. 'Goto' is a statement that is often avoided since it tends to make the code unreadable/unmaintainable if overused. Typ
Ivaylo Fiziev
Oct 22, 20252 min read
Â
Â
Â


Visualizing study logic
When we are faced with complex data we always feel lost, aren't we? We don't know anything about the essence of it but still we need to...
Ivaylo Fiziev
Oct 8, 20252 min read
Â
Â
Â


Practical use case: RFID sensor (PoC)
From the theory: Radio Frequency Identification (RFID) is a wireless technology that uses radio waves to automatically identify and track...
Ivaylo Fiziev
Sep 12, 20253 min read
Â
Â
Â


Declaring arrays in the SCL editor
For quite long time we were missing the ability to declare arrays in the SCL editor. Although arrays are not widely used in Process...
Ivaylo Fiziev
Sep 5, 20252 min read
Â
Â
Â


Using external connections from a SCL script
There is something interesting that I have not mentioned before. It was introduced along with the Time critical scripts but can be used...
Ivaylo Fiziev
Sep 3, 20253 min read
Â
Â
Â


Working with VARIANTs
VARIANT is yet another data type that you can use in your functions / function blocks. Usually it comes in handy when defining the...
Ivaylo Fiziev
Aug 26, 20253 min read
Â
Â
Â


String handling
When working with strings, often there is a need of doing string processing. e.g. searching, replacing, extracting substrings. SCL offers...
Ivaylo Fiziev
Aug 13, 20252 min read
Â
Â
Â


Escape sequences
These are special symbols, often having specific syntax, used in programming and text formats to represent characters that are difficult...
Ivaylo Fiziev
Aug 1, 20252 min read
Â
Â
Â


Debugging in Hex
Some time ago a customer asked if we can display numbers in hexadecimal format. It was a question related to the simulation panel in...
Ivaylo Fiziev
Jun 30, 20251 min read
Â
Â
Â


Attaching/Detaching appearances based on state
Recently we are seeing issues with the classic material flow. In particular the attach event is not working although it is properly...
Ivaylo Fiziev
Jun 13, 20253 min read
Â
Â
Â
CONTACT

bottom of page
