|
Re: How calculate time scan softPLC [message #1735262 is a reply to message #1735119] |
Thu, 16 June 2016 16:35 |
|
Hi,
could you be more specific what you mean with time scan? Would you like to cyclically trigger the scanning of inputs? For this you can use the E_CYCLE function block.
If you need to get the elapsed time you can use the function TIME() in an algorithm which will give you the time elapsed since the FORTE was started. By taking the TIME at different points in your program you can use this to calculate the elapsed time. Please be aware that currently this gives you in the default setup roughly an accuracy in the ms range. If you need higher accuracy a better approach would be to write an function block which is reading the system time from the operating system and translates it into a TIME_OF_DAY date type. Also for this data type we offer functions and function blocks to do calculations with. For this it would be interesting on which operating system you plan to run FORTE on.
BR,
Alois
|
|
|
Re: How calculate time scan softPLC [message #1735263 is a reply to message #1735119] |
Thu, 16 June 2016 16:36 |
|
Hi,
could you be more specific what you mean with time scan? Would you like to cyclically trigger the scanning of inputs? For this you can use the E_CYCLE function block.
If you need to get the elapsed time you can use the function TIME() in an algorithm which will give you the time elapsed since the FORTE was started. By taking the TIME at different points in your program you can use this to calculate the elapsed time. Please be aware that currently this gives you in the default setup roughly an accuracy in the ms range. If you need higher accuracy a better approach would be to write an function block which is reading the system time from the operating system and translates it into a TIME_OF_DAY date type. Also for this data type we offer functions and function blocks to do calculations with. For this it would be interesting on which operating system you plan to run FORTE on.
BR,
Alois
|
|
|
Re: How calculate time scan softPLC [message #1735276 is a reply to message #1735263] |
Thu, 16 June 2016 21:03 |
|
Today on my way home from work I spent some more thoughts on your question. I found out that we should have some FBs in 4DIAC which allow you to get some time information based on events. I came with the two FBs you can see in the attached figure:
- E_TimeStamp gives you a time stamp value every time you trigger the EI input event.
- E_StopWatch gives you the time duration that has elapsed between receiving a START and a STOP event
Would such FBs be helpfull in for your work?
I even think these are FBs that should be suggested for the upcoming IEC 61499 update.
Cheers,
Alois
|
|
|
Re: How calculate time scan softPLC [message #1735306 is a reply to message #1735262] |
Fri, 17 June 2016 09:06 |
Michele Citro Messages: 29 Registered: June 2016 |
Junior Member |
|
|
Good morning Alois Zoitl,
and thanks for the precious answers.
I mean the time scan in the PLC's processing cycle (sush as it indicate in photo).
Particurarly,I would calculate time scan of my program, decentralized on more machine (pc desktop and portable, sush as in photo), to understand what are the time game and to compare it with the response time that I expect.
In short, I would do an analysis of this type.
Quote:
If you need to get the elapsed time you can use the function TIME() in an algorithm which will give you the time elapsed since the FORTE was started.
How is this function? I don't find it in typelibrary of 4DIAC.
Quote:
If you need higher accuracy a better approach would be to write an function block which is reading the system time from the operating system and translates it into a TIME_OF_DAY date type.
For the second approach, more accurate, I would use Windows 7 64bit to run FORTE (on both systems).
Furthermore, I see the FB E_TimeStamp and E_StopWatch. I think that this second FB can help me,in particular, for my work.
But, I ask advises to you all
Best regards,
Michele
[Updated on: Fri, 17 June 2016 09:21] Report message to a moderator
|
|
|
Re: How calculate time scan softPLC [message #1735449 is a reply to message #1735306] |
Sun, 19 June 2016 20:51 |
|
Hi,
thanks for your figures this helped my to better understand your application. But before going into detail for your questions I have two remarks:
- Although you can implement a pure scan-based architecture also in IEC 61499 you will loose a lot of the advantages you can get with events. Do you really need to do it in a scanned based way or wouldn't an event driven IEC 61499 approach bring you more benefits. En example for a potential architecture/deign pattern that can help you is presented in [1]. Especially in warehouse and intraprocess logistics (e.g., conveyor belts) most actions are event triggered (e.g., rising or falling edge of a sensor, command from higher level system).
- Please note that when you want to measure time delays across different devices you need to apply some time synchronization means so that you can compare the time stamps.
Regarding the TIME() function: this is an function you can call in an algorithm. Therefore you will not find it in the type library. But you could use it for implementing your own stopwatch FB as basic FB. you can do this by having two algorithms: START, STOP:
Algorithm START in ST:
startTime := TIME();
where startTime would be an internal variable.
Algorithm STOP in ST:
DT := TIME() - startTime;
I hope this helps.
Cheers,
Alois
[1] http://ieeexplore.ieee.org/xpl/articleDetails.jsp?arnumber=6389773
|
|
|
Re: How calculate time scan softPLC [message #1735640 is a reply to message #1735449] |
Tue, 21 June 2016 14:18 |
Michele Citro Messages: 29 Registered: June 2016 |
Junior Member |
|
|
Hi,
thanks as always.
I know the advantages of this standard and I don't want to lose them surely.
Infact, my application wants to work with them.
In the end of my project, I have to present and show the reasons of this choice.
Now I can't see the article, but I read it soon possible.
Leaving scan-based architecture, I'm trying to understand how to calculate the times in my decentralized application.
How are the steps I need to do? How should I think?
Is the first time that I'm in front this problems and I'm in difficult.
I wouldn't forget nothing.
Best regards
Michele
[Updated on: Tue, 21 June 2016 15:02] Report message to a moderator
|
|
|
Re: How calculate time scan softPLC [message #1735667 is a reply to message #1735640] |
Tue, 21 June 2016 18:41 |
|
The question would be is are the events for starting and stopping occurring on the same device. In this case you wouldn't need to bother with the different timescales and times on the two devices. It would be the measurement of the roundtrip time. and maybe even more closely comparable to a classic PLC.
If start and stop are on different devices you need to get the absolute times on both devices and need to ensure that the devices are time synced. For Linux based devices you could have a look on the PTPd for high precision time syncing based on IEEE 1588 or maybe an NTP would be sufficent for your task. Depends on what accuracy you are needing.
|
|
|
|
|
Re: How calculate time scan softPLC [message #1738827 is a reply to message #1738824] |
Mon, 25 July 2016 09:33 |
|
Hi,
RMT_FRAME devices utilize the FBRT provided by Holobloc Inc [1]. FBRT is implemented in Java. So in order to have also an E_StopWatch you need to implement it using the FBDK tool and adjust the generated Java code.
Alois
[1] www.holobloc.com
|
|
|
|
Powered by
FUDForum. Page generated in 0.05883 seconds