Sort functionality on 800xa

Hi.. I have seen you in this forum suggesting someone about sorting functionality. Do you have any custom library made for sorting ? If so, please share as i have that requirement and time is limited. Thanks in advance.

By JuergenV on 2/12/2018 | Like (0) | Report

Sorry, I don't have a library for this. But there are lots of good examples for sorting in the www, that can easily be adapted to work in Structured Text. You should provide some more details: The number of values to sort and the type of the values. Maybe also the purpose of sorting..


By kinnu369 on 2/12/2018 | Like (0) | Report

It's basically for priority selection of containers which are 4 in number. there are 2 inputs which can be given by the operator. 1. container number (1,2,3,4) and time for which they have to be filled.
Based on the least time, the sort function should give me an output in ascending order.


By JuergenV on 2/12/2018 | Like (0) | Report

A small extension to the solution proposed in the other thread should do:
Use a second array for the container numbers. Whenever the values for the times are swapped in the first array, swap the container numbers in the second array too.


Add New Comment


kinnu369   

asked 9 days ago



Answers

0

Hello,

sorting what and where in 800xA, controller, graphic display ?

/Ronny

Ronny Lindström   

answered 9 days ago


 


By kinnu369 on 2/13/2018 | Like (0) | Report

It's basically for priority selection of containers which are 4 in number. there are 2 inputs which can be given by the operator. 1. container number (1,2,3,4) and time for which they have to be filled.
Based on the least time, the sort function should give me an output in ascending order.


Add New Comment


0

double post

Rob Lyon   

answered 8 days ago


 


Add New Comment


1

> "It's basically for priority selection of containers"


A simple bubble sort works just fine for this. You only have 4 inputs so you can do this quickly with a for next loop in a single program execution.



https://en.wikipedia.org/wiki/Bubble_sort


You only have 4 items so a bubble sort is pretty quick for this.


Also remember, that you are already looping, so you dont really need a repeat/until or for/next loop as long as you dont need the answer immediately. The sort will allways execute in n-1 program scans or better.

Rob Lyon   

answered 8 days ago


 


Add New Comment



Get weekly AKS updates


Partner Exclusive Webinars

 

> – Login to the partner portal to register



Points Redemption Program - Redeem your points for ABB training, Bluetooth speakers and mugs. Terms and conditions >


Earn points when you refer a friend
AKS Referral Program is "Live" - Learn more



AKS Experts


avatar
Ask Rob Lyon   

Rank: 2

info@lymac.co.nz I'm an independent DCS software and commissioning engineer with extensive experience in 800xA and other ABB products. I've worked in almost every corner of the world and still haven't seen it all.


avatar
Ask Harsha.D   

Rank: 7

Tech.Support,software and commisioning engineer with Proficient knowledge in 800xA and its products, RNRP,Networking in general.


avatar
Ask Govindaraj   

Rank: 10

Working in ABB India Operation Center. Have Project engineering and commissioning experience in ABB 800xA, Freelance, AC500.


avatar
Ask MMM   

Rank: 5

ABB PA CT Technical Support


avatar
Ask kstoilov   

Rank: 11

Control System Engineer: 800xA, Compact 800, AC500, AC31-50, Advant Master, Simatic, AC&DC Drives 11 years worked for ABB - Control Systems


avatar
Ask Flavio Mussolin   

Rank: 4

ABB AVP, Senior Electronic and Automation Engineer with over 30 years of experience in the field of process automation automotive, pharmaceutical, hollow glass, steel and rolling.


avatar
Ask nikismith   

Rank: 255

I have been a part of the Recording & Control Factory team for 17 years in total, having spent a number of years as a repairs technician withi the manufacturing department, but being in my current role for 9 years now.


avatar
Ask Ronny Lindström   

Rank: 18

ABB Service Engineer


avatar
Ask Stefan Stromqvist   

Rank: 1

I joined ABB in the year of 1994 and has since 1999 been working as a Service & Support Engineer at BU Control Technologies in Västerås, Sweden. My areas of expertise are: 800xA Base, 800xA for Advant Master, Information Management, operating systems, RNRP and Ethernet comms/networking in general.


avatar
Ask Sumit Gargav   

Rank: 3

I have worked with Freelance in majority, with 800xA FD and Melody system partly. Also had opportunity to work with Protocols - HART,Profibus,FF & Modbus.


avatar
Ask Dieter Henkel   

Rank: 21


avatar
Ask WvanWees   

Rank: 6

I'm a senior service engineer working for ABB in The Netherlands.