This is why I think the CodeSys based system are so much faster than the AB and Omron's that have been tested.The other thing that hasn't been mentioned is the quality of the compiler and whether the code gets compiled down to machine code or some sort of pseudo code that gets interpreted later.
I'm definitely interested in any platform being tested to compile a larger array of hardware comparisons.I am traveling until next week. I can try this on a recent Wago PLC when I get back if anyone is interested, CoDeSys programming.
FUNCTION fc1:VOID
VAR_TEMP
i:INT;
END_VAR
FOR i:=1 TO 16383 DO
"dbdata3".diData[i]:=REAL_TO_DINT("dbData1".rData[i] * "dbData2".rData[i]);
END_FOR;
end_function
A7d0: L #i
L 16383
<=I
JCN A7d1
L #i
ITD
L L#-1
+D
L L#32
*D
L L#0
+D
L #i
ITD
TAK
T LD 4
TAK
L L#-1
+D
L L#32
*D
L L#0
+D
L #i
ITD
TAK
T LD 8
TAK
L L#-1
+D
L L#32
*D
L L#0
+D
LAR1 LD 8
OPN "dbData1"
L DBD [AR1,P#0.0]
TAK
LAR1
TAK
OPN DI 2
L DID [AR1,P#0.0]
[B] *R [/B]
[B] RND [/B]
LAR1 LD 4
OPN "dbData3"
T DBD [AR1,P#0.0]
L #i
L 1
+I
T #i
JU A7d0
A7d1: CLR
Test Code in RSLogix Format
MathTest
FOR i:=0 TO 99999 DO
DINTResult:=(Real1*Real2);
END_FOR;
I got a Siemens 1214C I can run it on.
I had to alter the original test code because many of the controllers did not have the memory for 300,000 array elements.Archie-
This is from your website:
This version of code isn't doing the indexing into the arrays. Is this the way this was written or was it actually written with the arrays?
Keith