STL Shell sorting algorithm

Aleksandra

Member
Join Date
May 2018
Location
Belgrade
Posts
35
Hello,


I need to implement sorting algorithm in STL. I was thinking about using Shell sort, but I don't know how to do this with such a low programming language. Has anybody done something similar?


It doesn't have to be Shell, but since I have an array of 100 structs, it has to be fast.


Have in mind that I don't have much experience in programming with STL.


Any ideas?



Thanks in advance :)
 
I have SCL, but the project demands are such that it has to be done in STL (unfortunately :()


I understand how the algorithm works, but I have no idea how to write this in STL...


Thanks for the reply :)
 
Btw, I would program it as an FB, with the data to be sorted as part of the declared STAT variables.
This because the access to the data will be much faster if it is local instance data, and not by refence, i.e. by pointer.
 
I have SCL, but the project demands are such that it has to be done in STL (unfortunately :()

Is the customer internal? Is this on Step7 Classic or TIA Portal? Step7 Classic doesn't come with SCL by default, it's a separate bit you need to get license for I believe.
That is not the case for TIA Portal.
 
Btw, I would program it as an FB, with the data to be sorted as part of the declared STAT variables.
This because the access to the data will be much faster if it is local instance data, and not by refence, i.e. by pointer.

I have made an FB where the sorting will be implemented, and at the beginning of the program I copy DB which I need to sort into the instance DB of that FB.
 

Similar Topics

Hello everyone, can anyone help me with covert the STL code to ladder. Iam using plc s71200. A %DB1.DBX33.7 // angel of vaccum...
Replies
2
Views
175
Hello nice to meet you, im new in here, I'm currently trying to convert code written in STL for a S7-400 to SCL for an S7-1500, because when i run...
Replies
5
Views
268
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...
Replies
6
Views
330
Hi Siemens Experts, I am hoping someone can shed some light on my issue. I have uploaded the code from a S7-300 (317-2PN/DP) using Step 7...
Replies
9
Views
592
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
500
Back
Top Bottom