Archie
Member
This is a bit of an academic exercise and more so a curiosity, but I created a couple quick program tests to see how program processing time varied amongst different PLCs. My test was very simple. I loaded a small intensive program into the PLC, then checked the program scan time. It is a very basic test and doesn't give the whole picture of a PLC, but gives a comparison from one aspect.
The first program was a math test that multiplied 2 Real numbers, then converted to Dint. It was done for 100,000 elements. This is the code in AB format
The second test was a worst case bubble sort of 1000 elements.
The main reason I am posting here was to see if I could interest anyone in testing on different platforms and posting the scan time result. Since I do not have access to every PLC and platform, I would like to see if anyone would be willing to run these tests and posting their results. Just to list a few platforms I cannot test:
Siemens
Newer Omron
AutomationDirect
B&R
The first program was a math test that multiplied 2 Real numbers, then converted to Dint. It was done for 100,000 elements. This is the code in AB format
Code:
FOR i:=0 TO 99999 DO
DINTResult[i]:=(REAL1[i]*REAL2[i]);
END_FOR;
The second test was a worst case bubble sort of 1000 elements.
Code:
Result[0]:=2;
Result[999]:=-1;
REPEAT
swapped:=0;
FOR i:=1 TO 999 DO
IF (Result[i-1]>Result[i]) THEN
Temp:=Result[i];
Result[i]:=Result[i-1];
Result[i-1]:=Temp;
swapped:=1;
END_IF;
END_FOR;
UNTIL (NOT swapped)
END_REPEAT;
The main reason I am posting here was to see if I could interest anyone in testing on different platforms and posting the scan time result. Since I do not have access to every PLC and platform, I would like to see if anyone would be willing to run these tests and posting their results. Just to list a few platforms I cannot test:
Siemens
Newer Omron
AutomationDirect
B&R