[Beremiz-devel] FB TON to test benchmark

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

[Beremiz-devel] FB TON to test benchmark

Beremiz-Devel mailing list
Hi,
Now i want to test the benchmark of beremiz,using the function block of TON
The test method as follows:
(1)start the TON
(2)excute several lines code
(3)get the real time of TON
But,when i go to get the real time by closing the TON, the time I get is
always zero
That's why
else is there other method that can test the benchmark of beremiz
Thanks a lot!



--
Sent from: http://beremiz-devel.2374573.n4.nabble.com/

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Beremiz-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/beremiz-devel
Reply | Threaded
Open this post in threaded view
|

Re: [Beremiz-devel] FB TON to test benchmark

Beremiz-Devel mailing list
On 18-01-19 00:21, [hidden email] wrote:

> Hi,
> Now i want to test the benchmark of beremiz,using the function block of TON
> The test method as follows:
> (1)start the TON
> (2)excute several lines code
> (3)get the real time of TON
> But,when i go to get the real time by closing the TON, the time I get is
> always zero
> That's why
> else is there other method that can test the benchmark of beremiz
> Thanks a lot!
>
Sorry, don't understand exactly what you are doing. Could you show us
the code?


--
Best regards,
Andrey Skvortsov

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Beremiz-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/beremiz-devel

signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [Beremiz-devel] FB TON to test benchmark

Beremiz-Devel mailing list

 Hi,

 Could you clarify a little further?

On Friday, January 19, 2018 10:32:34 [hidden email]
wrote:
> On 18-01-19 00:21, [hidden email] wrote:
> > Hi,
> > Now i want to test the benchmark of beremiz,using the function block of
> > TON
> > The test method as follows:
> > (1)start the TON
> > (2)excute several lines code
> > (3)get the real time of TON

 Would this be the ET output of TON, or something else?

> > But,when i go to get the real time by closing the TON,

 "closing the TON"

 How are you closing the TON? What does this mean?


  Cheers,

       Mario

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Beremiz-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/beremiz-devel
Reply | Threaded
Open this post in threaded view
|

Re: [Beremiz-devel] FB TON to test benchmark

Beremiz-Devel mailing list
Hi,
Thanks you reply!
I really want to get the value of ET by disable the TON's INPUT pin
and when the IN pin is FALSE, the TON will be closed

refer to the attachment
<http://beremiz-devel.2374573.n4.nabble.com/file/t13/TON.png>
<http://beremiz-devel.2374573.n4.nabble.com/file/t13/test.png>



--
Sent from: http://beremiz-devel.2374573.n4.nabble.com/

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Beremiz-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/beremiz-devel
Reply | Threaded
Open this post in threaded view
|

Re: [Beremiz-devel] FB TON to test benchmark

Beremiz-Devel mailing list
On 18-01-21 17:44, [hidden email] wrote:
> Hi,
> Thanks you reply!
> I really want to get the value of ET by disable the TON's INPUT pin
> and when the IN pin is FALSE, the TON will be closed
>
> refer to the attachment
> <http://beremiz-devel.2374573.n4.nabble.com/file/t13/TON.png>
> <http://beremiz-devel.2374573.n4.nabble.com/file/t13/test.png>

First, TON's ET output is reset to 0 if you set input IN to FALSE.
Second, TON function block uses internal variable __CURRENT_TIME that
is updated between PLC cycles, as it's done for PLC input and output.

You need synchronous read of current time from your OS in your PLC program, for
this you may use 'C pragma' in ST code. But it depends on the target
platform. I've attached example for GNU/Linux system. Here I created
user PLC function GetTimeSync() for that.

By the way, you trying to benchmark Beremiz.
matiec generates plain C code for PLC program.
Then this C program is compiled into native code by C compiler
(usually this is GNU C compiler, gcc). As a result performance may heavily depend
on what level of optimization is selected and which version of
gcc is used.

For example, here is comparison of different C compilers and different
levels of optimization. If you care about performance, you may want to
tune something there.

1. https://www.phoronix.com/scan.php?page=article&item=gcc_47_optimizations&num=1
2. https://www.phoronix.com/scan.php?page=article&item=gcc-clang-eoy2017

--
Best regards,
Andrey Skvortsov

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Beremiz-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/beremiz-devel

PerformanceTest.tar.xz (1K) Download Attachment
signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [Beremiz-devel] FB TON to test benchmark

Beremiz-Devel mailing list
Hi,
Thanks verymuch!
Yours method works very well.
Referencing your testcode , I changed my testcode as fowllows inset image,
and it works well.
<http://beremiz-devel.2374573.n4.nabble.com/file/t13/TIM%E6%88%AA%E5%9B%BE20180123132112.png>



--
Sent from: http://beremiz-devel.2374573.n4.nabble.com/

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Beremiz-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/beremiz-devel