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 11th, 2019, 10:17 AM   #46
JesperMP
Lifetime Supporting Member + Moderator
Denmark

JesperMP is offline
 
JesperMP's Avatar
 
Join Date: Feb 2003
Location: Copenhagen.
Posts: 13,737
Quote:
Originally Posted by kamenges View Post
You and I have somewhat different views on the quantity inferred by "slightly".
Probably. Since the numbers are there, people can draw their own conclusions.

Quote:
Originally Posted by kamenges View Post
The logic posted above is running at 103 msec in the L71. What are you seeing?
I have packed the PLC away for today. Maybe I get time to do it tomorrow.

edit: In S7, "TRUE" and "FALSE" are keywords.
__________________
Jesper
See my profile interests for Q&A
  Reply With Quote
Old June 11th, 2019, 06:18 PM   #47
Jmeadows7676
Member
United States

Jmeadows7676 is offline
 
Join Date: Oct 2013
Location: Alabama
Posts: 35
Math Test 293ms on AB 1769-L24ER
  Reply With Quote
Old June 11th, 2019, 07:34 PM   #48
Archie
Member
United States

Archie is offline
 
Join Date: May 2002
Location: Orangeburg, SC
Posts: 1,887
1756-L85E v28

MathTest : 6.0
IndexTest : 3.7
BitwiseTest : 2.6


Tried to attach the RSLogix file, but it was too big.
__________________
Expectations lead to disappointment. Appreciation leads to satisfaction.

AdvancedHMI - HMI Software without the license key hassles

Last edited by Archie; June 11th, 2019 at 07:59 PM.
  Reply With Quote
Old June 11th, 2019, 07:55 PM   #49
Archie
Member
United States

Archie is offline
 
Join Date: May 2002
Location: Orangeburg, SC
Posts: 1,887
Kunbus RevPi Connect+ / Codesys 3.5

MathTest : 2.5
IndexTest : 3.1
BitwiseTest : 1.8
BubbleSort : 33
Attached Files
File Type: zip RevPiPerfTest.zip (149.7 KB, 1 views)
__________________
Expectations lead to disappointment. Appreciation leads to satisfaction.

AdvancedHMI - HMI Software without the license key hassles

Last edited by Archie; June 11th, 2019 at 08:01 PM.
  Reply With Quote
Old June 11th, 2019, 08:45 PM   #50
Archie
Member
United States

Archie is offline
 
Join Date: May 2002
Location: Orangeburg, SC
Posts: 1,887
Revised numbers on updated tests for
1769-L18ER v24

MathTest : 348.0
IndexTest : 131
BitwiseTest : 148


I have to say that I was surprised the L24ER was faster. I was thinking the L18 and L24 had the same processor, only more memory and embedded IO.
Attached Files
File Type: zip RSLogixRoutines.zip (4.1 KB, 3 views)
__________________
Expectations lead to disappointment. Appreciation leads to satisfaction.

AdvancedHMI - HMI Software without the license key hassles

Last edited by Archie; June 11th, 2019 at 08:51 PM.
  Reply With Quote
Old June 11th, 2019, 11:17 PM   #51
chelton
Member
Australia

chelton is offline
 
Join Date: Jan 2012
Location: melbourne
Posts: 78
Quote:
Originally Posted by Archie View Post
After seeing the differences in indexing arrays and ANDing, I think the test should be revised:

Math Test stays the same:
Code:
FOR i:=0 TO 99999 DO
	DINTResult:=(Real1*Real2);
END_FOR;
@Archie
What values are you using defaulting Real1 and Real2 too?

Running Math Test on an NJ101
Real1 and Real2 set at 0
32ms
Real1 and Real2 non-zero
89ms
  Reply With Quote
Old June 12th, 2019, 04:51 AM   #52
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,690
Results + code for S7-1517F
Code:
CASE "TestType" OF
    1:  //indexed multiply with non-zero data - 19ms
        FOR #diIndex := 0 TO 99999 DO
            "dbResult".arData[#diIndex] := REAL_TO_DINT("dbData1".arData[#diIndex] * "dbData2".arData[#diIndex]);
        END_FOR;
        
    2:  //non indexed multiply with non-zero data - 14.5ms
        #rData1 := 100.0;
        #rData2 := 1000.0;
        FOR #diIndex := 0 TO 99999 DO
            #diResult := REAL_TO_DINT(#rData1 * #rData2 );
        END_FOR;
        
    3:  // some trig functions - 13.5ms
        #rData1 := 0.1;
        #rData2 := 0.2;
        FOR #diIndex := 0 TO 99999 DO
            #diResult := REAL_TO_DINT(TAN(#rData1) * TAN(#rData2));
        END_FOR;
        
    4:  //non indexed multiply with non-zero data, more calcs, for loop smaller - 14.2ms
        #rData1 := 1000.0;
        #rData2 := 100.0;
        FOR #diIndex := 0 TO 9999 DO
            #diResult := REAL_TO_DINT(#rData1 * #rData2);
            #diResult := REAL_TO_DINT(#rData1 * #rData2);
            #diResult := REAL_TO_DINT(#rData1 * #rData2);
            #diResult := REAL_TO_DINT(#rData1 * #rData2);
            #diResult := REAL_TO_DINT(#rData1 * #rData2);
            #diResult := REAL_TO_DINT(#rData1 * #rData2);
            #diResult := REAL_TO_DINT(#rData1 * #rData2);
            #diResult := REAL_TO_DINT(#rData1 * #rData2);
            #diResult := REAL_TO_DINT(#rData1 * #rData2);
            #diResult := REAL_TO_DINT(#rData1 * #rData2);
        END_FOR;
        
    5:  //non indexed divide with non-zero data - 14.9ms
        #rData1 := 1000.0;
        #rData2 := 100.0;
        FOR #diIndex := 0 TO 99999 DO
            #diResult := REAL_TO_DINT(#rData1 / #rData2);
        END_FOR;
        
    6:  //non indexed multiply with zero data - 7.5ms
        #rData1 := 0.0;
        #rData2 := 0.0;
        FOR #diIndex := 0 TO 99999 DO
            #diResult := REAL_TO_DINT(#rData1 * #rData2);
        END_FOR;
        
    7:  //Boolean logic - 1ms    
        FOR #diIndex := 0 TO 99999 DO
            #boolvar_1 := (#boolvar_2 AND #boolvar_3) OR (#boolvar_4 AND #boolvar_5); // logic --(=)
            IF (#boolvar_6 AND #boolvar_7) THEN
                #boolvar_10 := TRUE; // logic --(S)
            END_IF;
            IF (#boolvar_8 OR #boolvar_9) THEN
                #boolvar_10 := FALSE; // logic --(R)
            END_IF;
        END_FOR;
        
    8:  //Bitwise operation - 1ms
        FOR #diIndex:=0 TO 99999 DO
            #diResult := #diIndex AND 2730; //* Every other bit FOR 12 bits
        END_FOR;
        
    9: //bubble sort - 26ms
        #Result[0] := 2;
        #Result[999] := -1;
        
        REPEAT
            #swapped := 0;
            FOR #diIndex := 1 TO 999 DO
                IF (#Result[#diIndex - 1] > #Result[#diIndex]) THEN
                    #Temp := #Result[#diIndex];
                    #Result[#diIndex] := #Result[#diIndex - 1];
                    #Result[#diIndex - 1] := #Temp;
                    #swapped := 1;
                END_IF;
            END_FOR;
        UNTIL (NOT #swapped)
        END_REPEAT;
        
    10:  //initialise array of data to non-zero values
        FOR #diIndex := 0 TO 99999 DO
            "dbData1".arData[#diIndex] := DINT_TO_REAL(#diIndex) / 100.0;
            "dbData2".arData[#diIndex] := DINT_TO_REAL(#diIndex) / 50.0;
        END_FOR;
        
        
END_CASE;
__________________
S7-300 to 1500 conversions done - email to s7conversions@hotmail.com
  Reply With Quote
Old June 12th, 2019, 05:52 AM   #53
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,690
Results + code for S7-319F


Code:
FUNCTION fc1:VOID
VAR_TEMP
    i:INT;
    iIndex:INT;
    diIndex:DINT;
    diResult:DINT;
    TestType, temp:INT;
    rData1,rData2:REAL;
    swapped:BOOL;
    boolvar_1:BOOL;
    boolvar_2:BOOL;
    boolvar_3:BOOL;
    boolvar_4:BOOL;
    boolvar_5:BOOL;
    boolvar_6:BOOL;
    boolvar_7:BOOL;
    boolvar_8:BOOL;
    boolvar_9:BOOL;
    boolvar_10:BOOL;
    Result:ARRAY[0..999] OF INT;
    
END_VAR
testType:=9;
CASE TestType OF
    1:  //indexed multiply with non-zero data - 85ms
        FOR iIndex := 0 TO 9999 DO
            FOR i:=0 TO 9 do
             "dbResult".diData[iIndex] := REAL_TO_DINT("dbData1".arData[iIndex] * "dbData2".arData[iIndex]);
            end_For;
        END_FOR;
        
    2:  //non indexed multiply with non-zero data - 21ms
        rData1 := 100.0;
        rData2 := 1000.0;
        FOR diIndex := 0 TO 99999 DO
            diResult := REAL_TO_DINT(rData1 * rData2 );
        END_FOR;
        
    3:  // some trig functions - 160ms
        rData1 := 0.1;
        rData2 := 0.2;
        FOR diIndex := 0 TO 99999 DO
            diResult := REAL_TO_DINT(TAN(rData1) * TAN(rData2));
        END_FOR;
        
    4:  //non indexed multiply with non-zero data, more calcs, for loop smaller - 14.0ms
        rData1 := 1000.0;
        rData2 := 100.0;
        FOR diIndex := 0 TO 9999 DO
            diResult := REAL_TO_DINT(rData1 * rData2);
            diResult := REAL_TO_DINT(rData1 * rData2);
            diResult := REAL_TO_DINT(rData1 * rData2);
            diResult := REAL_TO_DINT(rData1 * rData2);
            diResult := REAL_TO_DINT(rData1 * rData2);
            diResult := REAL_TO_DINT(rData1 * rData2);
            diResult := REAL_TO_DINT(rData1 * rData2);
            diResult := REAL_TO_DINT(rData1 * rData2);
            diResult := REAL_TO_DINT(rData1 * rData2);
            diResult := REAL_TO_DINT(rData1 * rData2);
        END_FOR;
        
    5:  //non indexed divide with non-zero data - 25ms
        rData1 := 1000.0;
        rData2 := 100.0;
        FOR diIndex := 0 TO 99999 DO
            diResult := REAL_TO_DINT(rData1 / rData2);
        END_FOR;
        
    6:  //non indexed multiply with zero data - 21ms
        rData1 := 0.0;
        rData2 := 0.0;
        FOR diIndex := 0 TO 99999 DO
            diResult := REAL_TO_DINT(rData1 * rData2);
        END_FOR;
        
    7:  //Boolean logic - 20ms    
        FOR diIndex := 0 TO 99999 DO
            boolvar_1 := (boolvar_2 AND boolvar_3) OR (boolvar_4 AND boolvar_5); // logic --(=)
            IF (boolvar_6 AND boolvar_7) THEN
                boolvar_10 := TRUE; // logic --(S)
            END_IF;
            IF (boolvar_8 OR boolvar_9) THEN
                boolvar_10 := FALSE; // logic --(R)
            END_IF;
        END_FOR;
        
    8:  //Bitwise operation - 18ms
        FOR diIndex:=0 TO 99999 DO
            diResult := DWORD_TO_DINT(DINT_TO_DWORD(diIndex) AND dw#16#aaa); //* Every other bit FOR 12 bits
        END_FOR;
        
    9: //bubble sort - 456ms
        Result[0] := 2;
        Result[999] := -1;
        
        REPEAT
            swapped := 0;
            FOR diIndex := 1 TO 999 DO
                IF (Result[diIndex - 1] > Result[diIndex]) THEN
                    Temp := Result[diIndex];
                    Result[diIndex] := Result[diIndex - 1];
                    Result[diIndex - 1] := Temp;
                    swapped := 1;
                END_IF;
            END_FOR;
        UNTIL (NOT swapped)
        END_REPEAT;
        
    10:  //initialise array of data to non-zero values
        FOR diIndex := 0 TO 9999 DO
            "dbData1".arData[diIndex] := DINT_TO_REAL(diIndex) / 100.0;
            "dbData2".arData[diIndex] := DINT_TO_REAL(diIndex) / 50.0;
        END_FOR;
        
        
END_CASE;
end_function
__________________
S7-300 to 1500 conversions done - email to s7conversions@hotmail.com
  Reply With Quote
Old June 12th, 2019, 06:01 AM   #54
Archie
Member
United States

Archie is offline
 
Join Date: May 2002
Location: Orangeburg, SC
Posts: 1,887
Quote:
Originally Posted by chelton View Post
@Archie
What values are you using defaulting Real1 and Real2 too?

Running Math Test on an NJ101
Real1 and Real2 set at 0
32ms
Real1 and Real2 non-zero
89ms
That's an interesting finding I never would have expected. I was testing with values at 0. I will revise the math test and run my tests again.
__________________
Expectations lead to disappointment. Appreciation leads to satisfaction.

AdvancedHMI - HMI Software without the license key hassles
  Reply With Quote
Old June 12th, 2019, 07:34 AM   #55
JesperMP
Lifetime Supporting Member + Moderator
Denmark

JesperMP is offline
 
JesperMP's Avatar
 
Join Date: Feb 2003
Location: Copenhagen.
Posts: 13,737
LD, I will use your code for performing my further tests.

Btw, looks like a 1517 easily beats a 319, except for boolean logic !
Have you tested with optimized or non-optimized blocks ?
__________________
Jesper
See my profile interests for Q&A
  Reply With Quote
Old June 12th, 2019, 07:48 AM   #56
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,690
Optimised.
__________________
S7-300 to 1500 conversions done - email to s7conversions@hotmail.com
  Reply With Quote
Old June 12th, 2019, 07:53 AM   #57
Archie
Member
United States

Archie is offline
 
Join Date: May 2002
Location: Orangeburg, SC
Posts: 1,887
LD..... Can you post a complete part number or a link to the PLC you tested with. I'm interested in checking out the specs. It looks like quite a fast PLC.
__________________
Expectations lead to disappointment. Appreciation leads to satisfaction.

AdvancedHMI - HMI Software without the license key hassles
  Reply With Quote
Old June 12th, 2019, 08:04 AM   #58
geniusintraining
Lifetime Supporting Member + Moderator
United States

geniusintraining is offline
 
geniusintraining's Avatar
 
Join Date: Jun 2005
Location: SC
Posts: 6,272
Quote:
Originally Posted by Archie View Post
LD..... Can you post a complete part number or a link to the PLC you tested with. I'm interested in checking out the specs. It looks like quite a fast PLC.
So I was looking them up

https://mall.industry.siemens.com/ma...ducts/10041975

The strange thing is the 319f has a part number of a 318

Here is the 1517f https://mall.industry.siemens.com/ma...517-3FP00-0AB0
__________________
www.PLCCable.com PLC Communication Cables, PLC Trainers, Fluke Meters, MicroLogix, ControlLogix, Siemens, Allen Bradley and more... all your automation needs... ((NEW)) After Market 1784-U2DHP Allen Bradley USB to DH+ and Gateways
  Reply With Quote
Old June 12th, 2019, 08:13 AM   #59
JesperMP
Lifetime Supporting Member + Moderator
Denmark

JesperMP is offline
 
JesperMP's Avatar
 
Join Date: Feb 2003
Location: Copenhagen.
Posts: 13,737
Quote:
Originally Posted by geniusintraining View Post
The strange thing is the 319f has a part number of a 318
Indeed that is strange. But that is how it is (was). My guess is they planned for a CPU above 319, but then they would run out of numbers since there are only 3 available digits in their system. The PLC above 319 never became reality. Just my (conspiracy) theory.

For your information, list price for the 319F is approx 5700 €, and 1517F is approx 5300 €.
__________________
Jesper
See my profile interests for Q&A
  Reply With Quote
Old June 12th, 2019, 09:21 AM   #60
kamenges
Member
United States

kamenges is offline
 
kamenges's Avatar
 
Join Date: Nov 2002
Location: Brillion, WI
Posts: 3,776
I only reran the non-indexed math test with non-zero numbers. That came in at 298 msec on the L71. This compares with roughly 280 msec for the same test with zero values. Since they were that close in total time I didn't try any of the other variants.

Rockwell is obviously not performing an optimization that other manufacturers are. The S7-1517 shows a 2:1 difference in scan time for zero versus non-zero values.

Keith
  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 08:44 PM.


.