You are not registered yet. Please click here to register!


 
 
plc storereviewsdownloads
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc.
 
Try our online PLC Simulator- FREE.  Click here now to try it.

---------->>>>>Get FREE PLC Programming Tips

New Here? Please read this important info!!!


Go Back   PLCS.net - Interactive Q & A > PLCS.net - Interactive Q & A > LIVE PLC Questions And Answers

PLC training tools sale

Reply
 
Thread Tools Display Modes
Old June 7th, 2019, 08:06 PM   #16
Archie
Member
United States

Archie is offline
 
Join Date: May 2002
Location: Orangeburg, SC
Posts: 1,908
Kunbus RevPi Connect

My final test was with CodeSys 3.5 on a Kunbus RevPi

MathTest : 2.5ms
Bubble Sort : 30ms

If anyone is interested in any of these programs I used for testing, let me know and I can send them to anyone.
__________________
Expectations lead to disappointment. Appreciation leads to satisfaction.

AdvancedHMI - HMI Software without the license key hassles
  Reply With Quote
Old June 8th, 2019, 11:33 AM   #17
kallileo
Member
Greece

kallileo is offline
 
Join Date: Jun 2008
Location: Thessaloniki, Macedonia, Hellas
Posts: 209
Tested it on Codesys RasPi 3 model B+.
It runs executes the code really fast but after one minute overheats and the internal protection overheat kick in and disables the CPU or something like that. Then it needs to be restarted.

FOR i:=0 TO 99999 DO
DintResult[i]:=REAL_TO_DINT((REAL1[i]*REAL2[i]));
END_FOR;
Attached Images
File Type: png RasPi Bench 1.png (7.1 KB, 218 views)
__________________
automationofthings.blogspot.com
  Reply With Quote
Old June 8th, 2019, 11:55 AM   #18
Archie
Member
United States

Archie is offline
 
Join Date: May 2002
Location: Orangeburg, SC
Posts: 1,908
I set up my Kunbus RevPi which is based on the Rasberry Pi compute Module and let it run for longer. So far it has been running for 15 minutes with no issue. I will let it run all day to see if it over heats.


I also set my task to Free Wheeling to put a bit more load on the CPU.


After 1 hour the CPU temperature is holding steady at 50.5degC and the CodeSys process is using 50.5% CPU
Attached Images
File Type: png RevPiScan.png (6.1 KB, 217 views)
__________________
Expectations lead to disappointment. Appreciation leads to satisfaction.

AdvancedHMI - HMI Software without the license key hassles

Last edited by Archie; June 8th, 2019 at 12:24 PM.
  Reply With Quote
Old June 8th, 2019, 01:38 PM   #19
kallileo
Member
Greece

kallileo is offline
 
Join Date: Jun 2008
Location: Thessaloniki, Macedonia, Hellas
Posts: 209
My mistake.
I checked the CPU temp and it stays around 60 degC. Core load is under 80%.
It doesn't overheat but for some reason I lose connection with Runtime from Codesys IDE.

Since RevPi has a Real time patch there seems to be a huge difference in jitter.
__________________
automationofthings.blogspot.com

Last edited by kallileo; June 8th, 2019 at 01:40 PM.
  Reply With Quote
Old June 8th, 2019, 01:54 PM   #20
Peter Nachtwey
Member
United States

Peter Nachtwey is offline
 
Peter Nachtwey's Avatar
 
Join Date: Apr 2002
Location: Vancouver, WA, US
Posts: 6,939
I think that a less memory intensive test is required for small computers.
Also, there need to be 3 different tests. One for bit twiddling, one for integers and one for floats. Some smaller computers may not have a FPU and must handle the floats in software but their bit twiddling and integer math may be just as good as CPU with FPUs.
A lot of the early or cheap ARM CPUs did not have FPUs but they for many applications that don't require floating point because they are low power.

Measuring the temperature is good. It reflects on the quality of the design.

I would use two prime number tests. I would use one that uses the sieve method but I would make each element a bit. This would reduce the amount of memory by using bits instead of whole registers. That one test may be good enough for testing bits twiddling and integers. For floats I would NOT use a simple multiply. Many CPUs may have the ability to do multiplies, adds and subtracts but not divisions.
Divisions are a killer.
Some CPUs have divisions but few can do neat things like pow(x,y).

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.
__________________
"Living is easy with eyes closed, misunderstanding all you see...." Strawberry Fields Forever, John Lennon
  Reply With Quote
Old June 8th, 2019, 03:07 PM   #21
Archie
Member
United States

Archie is offline
 
Join Date: May 2002
Location: Orangeburg, SC
Posts: 1,908
Quote:
Originally Posted by kallileo View Post
Since RevPi has a Real time patch there seems to be a huge difference in jitter.
I also changed to CodeSys service to run at a NICE value of -20 so it would have the highest priority. I also found that by setting the task's CPU core to floating, it keeps a lower jitter.
__________________
Expectations lead to disappointment. Appreciation leads to satisfaction.

AdvancedHMI - HMI Software without the license key hassles
  Reply With Quote
Old June 8th, 2019, 04:18 PM   #22
Toine
Member
Netherlands

Toine is offline
 
Join Date: Nov 2016
Location: NL
Posts: 261
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.
  Reply With Quote
Old June 8th, 2019, 05:25 PM   #23
Archie
Member
United States

Archie is offline
 
Join Date: May 2002
Location: Orangeburg, SC
Posts: 1,908
Quote:
Originally Posted by Peter Nachtwey View Post
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.
This is why I think the CodeSys based system are so much faster than the AB and Omron's that have been tested.

Quote:
Originally Posted by Toine View Post
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.
I'm definitely interested in any platform being tested to compile a larger array of hardware comparisons.
__________________
Expectations lead to disappointment. Appreciation leads to satisfaction.

AdvancedHMI - HMI Software without the license key hassles
  Reply With Quote
Old June 8th, 2019, 05:54 PM   #24
Thomas_v2
Member
Germany

Thomas_v2 is offline
 
Join Date: Apr 2009
Location: Ger
Posts: 410
Maybe some compilers will remove the array multplication and replace the result with a constant value generated by the compiler at compile-time. It all depends of the memory area you get the values from.
If you want to compare the CPU performances, you need to make sure that the memory areas which are accessed are "volatile", thus the compiler is forced to generate the code which does the multiplication. For bubble sort it's not as ease to optimize, but I think if you program a bubble sort on a PC with a C compiler where the compiler knows at compile time the values which are to be sorted, it will remove the sorting code completely.
  Reply With Quote
Old June 9th, 2019, 05:05 AM   #25
L D[AR2,P#0.0]
Lifetime Supporting Member
United Kingdom

L D[AR2,P#0.0] is offline
 
Join Date: Nov 2006
Location: UK
Posts: 5,730
I've created the following SCL using Siemens S7 Classic.
The size of the data arrays is limited to the data block size.



Code:
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
__________________
S7-300 to 1500 conversions done - email to s7conversions@hotmail.com
  Reply With Quote
Old June 9th, 2019, 05:10 AM   #26
L D[AR2,P#0.0]
Lifetime Supporting Member
United Kingdom

L D[AR2,P#0.0] is offline
 
Join Date: Nov 2006
Location: UK
Posts: 5,730
The compiler produces the following code, of which there are 2 floating point intructions, the rest are for the for loop, array indexing and data access. (I've not checked the option where array bounds are verified either).



Code:
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]
      *R    
      RND   
      LAR1  LD     4
      OPN   "dbData3"
      T     DBD [AR1,P#0.0]
      L     #i
      L     1
      +I    
      T     #i
      JU    A7d0
A7d1: CLR
__________________
S7-300 to 1500 conversions done - email to s7conversions@hotmail.com
  Reply With Quote
Old June 10th, 2019, 10:26 AM   #27
Archie
Member
United States

Archie is offline
 
Join Date: May 2002
Location: Orangeburg, SC
Posts: 1,908
I ran the math test on an Automation Direct P2-550

MathTest : 264.2ms

For anyone interested, I consolidated the results into a table and posted the results here:

https://www.advancedhmi.com/forum/in...14631#msg14631

If anyone posts any test results, I can add them to that consolidated list.
__________________
Expectations lead to disappointment. Appreciation leads to satisfaction.

AdvancedHMI - HMI Software without the license key hassles
  Reply With Quote
Old June 10th, 2019, 01:15 PM   #28
kamenges
Member
United States

kamenges is offline
 
kamenges's Avatar
 
Join Date: Nov 2002
Location: Brillion, WI
Posts: 3,872
Archie-

This is from your website:
Quote:
Test Code in RSLogix Format

MathTest


FOR i:=0 TO 99999 DO
DINTResult:=(Real1*Real2);
END_FOR;
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
  Reply With Quote
Old June 10th, 2019, 01:21 PM   #29
WalterNusbaum
Member
United Kingdom

WalterNusbaum is offline
 
Join Date: Jun 2019
Location: newport
Posts: 1
Quote:
Originally Posted by boneless View Post
I got a Siemens 1214C I can run it on.

**


I got Siemens too but mine was bit slow but later it got fine.
  Reply With Quote
Old June 10th, 2019, 01:42 PM   #30
Archie
Member
United States

Archie is offline
 
Join Date: May 2002
Location: Orangeburg, SC
Posts: 1,908
Quote:
Originally Posted by kamenges View Post
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
I had to alter the original test code because many of the controllers did not have the memory for 300,000 array elements.
__________________
Expectations lead to disappointment. Appreciation leads to satisfaction.

AdvancedHMI - HMI Software without the license key hassles
  Reply With Quote
Reply
Jump to Live PLC Question and Answer Forum

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Topics
Thread Thread Starter Forum Replies Last Post
Mitsubishi PLC died. Twice. JRoss LIVE PLC Questions And Answers 11 January 29th, 2019 09:35 PM
More questions about RSemulator, PLC network, and career path... timcph2008 LIVE PLC Questions And Answers 0 March 8th, 2018 11:04 AM
PLC Update - Back Issues Collection Now Available! Phil Melore LIVE PLC Questions And Answers 11 October 22nd, 2015 02:17 AM
Siemens PLC won't auto-run after power-up Lamboom LIVE PLC Questions And Answers 5 August 19th, 2014 04:32 PM
PC to PLC Protocol TheRixta LIVE PLC Questions And Answers 13 December 17th, 2008 12:56 PM


All times are GMT -5. The time now is 05:47 PM.


.