Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » 4DIAC - Framework for Distributed Industrial Automation and Control » Experiments with Raspberry Pi 3B+ #1
Experiments with Raspberry Pi 3B+ #1 [message #1816366] Mon, 28 October 2019 13:16 Go to next message
Mike Wazowski is currently offline Mike WazowskiFriend
Messages: 23
Registered: October 2019
Junior Member
All of projects were launched on Raspberry Pi 3B+.

I set sleepThread equal 0 ms - CThread::sleepThread(0) in FORTE source project into files: sysfsprocint.cpp and io_controller.cpp. After I made cross-compilation and launched on Raspberry Pi.

IDE version is 1.11.0
FORTE version is 1.11.0

[Updated on: Tue, 29 October 2019 14:21]

Report message to a moderator

Re: Experiments with Raspberry Pi #1 [message #1816370 is a reply to message #1816366] Mon, 28 October 2019 13:37 Go to previous messageGo to next message
Mike Wazowski is currently offline Mike WazowskiFriend
Messages: 23
Registered: October 2019
Junior Member
Project #1

Goal:
measure delay between the input and the output of Raspberry Pi (Fig. ProjectMap #1).

Project build:
project consists of two blocks - IX and QX (Fig. IDE #1), system configuration (Fig. Configuration #1).

Results:
(For signal with frequency 250Hz)

1) wrote to console chrt -f -p 99 `pidof forte`
after 1 million measurements I got next statistics (Fig. Result_1 #1):
- average delay time = 59.206 microseconds;
- minimal delay time = 16 microseconds;
- maximal delay time = 1.4024 milliseconds;
- standard deviation = 26.357 microsecond.

2) wrote to console chrt -r -a -p 99 `pidof forte`
after 750 thousands measurements I got next statistics (Fig. Result_2 #1):
- average delay time = 24.366 microseconds;
- minimal delay time = 13.4 microseconds;
- maximal delay time = 117.8 microseconds;
- standard deviation = 4.6014 microsecond.

[Updated on: Mon, 28 October 2019 14:17]

Report message to a moderator

Re: Experiments with Raspberry Pi #1 [message #1816383 is a reply to message #1816370] Mon, 28 October 2019 19:48 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1556
Registered: January 2014
Senior Member

Hi,

for me these data sounds very good, or I'm misunderstanding anything? I assume you already complied 4diac FORTE with the -O3 compiler option. If not this could give you a few more microseconds.
Re: Experiments with Raspberry Pi #1 [message #1816431 is a reply to message #1816383] Tue, 29 October 2019 12:50 Go to previous messageGo to next message
Mike Wazowski is currently offline Mike WazowskiFriend
Messages: 23
Registered: October 2019
Junior Member
No, you aren't :) These results are much better than its were.
I will try this compiler option in the next experiments series.

I want to post other experiments here. You can write your opinion for each experiment, for example, what needs to be to improved, what need s to be changed, etc.
Re: Experiments with Raspberry Pi #1 [message #1816437 is a reply to message #1816370] Tue, 29 October 2019 13:43 Go to previous messageGo to next message
Mike Wazowski is currently offline Mike WazowskiFriend
Messages: 23
Registered: October 2019
Junior Member
Project #2

Goal:
to form for each input signal its own delay (2ms, 4ms, 6ms, 8ms, 10ms) (Fig. ProjectMap #2).

Project build:
project consists of IX (five inputs), E_SWITCH (to go to events manage), E_DELAY (to form delay), E_RS (create output signal) and QX (five outputs) (Fig. IDE #2), system configuration (Fig. Configuration #2).

Results:
(For signal with frequency 40 Hz and duty 20%)

wrote to console chrt -r -a -p 99 `pidof forte`
1 oscillograph channel was installed on the input signal (yellow)
3 oscillograph channels were installed on the first, third and fifth outputs (green, blue, magenta)
statistics were amounted for the first and fifth outputs

after 500 thousands measurements I got next statistics (Fig. Result #2):
**********************************************************************************
- average delay time first output = 1.5694 milliseconds (instead of 2 milliseconds, which was set at the project);
- minimal delay time first output = 36.8 microseconds;
- maximal delay time first output = 2.2280 milliseconds;
- standard deviation first output = 313.08 microsecond;
**********************************************************************************
- average delay time fifth output = 9.5607 milliseconds (instead of 10 milliseconds, which was set at the project);
- minimal delay time fifth output = 8.1104 milliseconds ;
- maximal delay time fifth output = 10.378 milliseconds;
- standard deviation fifth output = 436.37 microsecond.

Conclusion:
the circuit, consisting of IX, E_SWITCH, E_DELAY, E_RS and QX blocks, has a delay range from the set value of about 2.2 milliseconds; the average delay time differs from the set value by 0.5 milliseconds.

[Updated on: Thu, 31 October 2019 08:15]

Report message to a moderator

Re: Experiments with Raspberry Pi #1 [message #1816550 is a reply to message #1816437] Thu, 31 October 2019 08:31 Go to previous messageGo to next message
Mike Wazowski is currently offline Mike WazowskiFriend
Messages: 23
Registered: October 2019
Junior Member
Project #3

Goal:
to form for each a input signal with frequency 50 Hz and duty 20% a output signal with active state duration 10 milliseconds (Fig. ProjectMap #3).

Project build:
a IDE project consists of IX (five inputs), E_SWITCH (to go to events manage), E_DELAY (to form active state output signal), E_RS (create output signal) and QX (five outputs) (Fig. IDE #3), system configuration (Fig. Configuration #3).

Results:
(for signal with frequency 50 Hz and duty 20%)

wrote to console chrt -f -a -p 99 `pidof forte`
2 oscillograph channels were installed on the input signal (yellow and green)
2 oscillograph channels were installed on the first, third and fifth outputs (blue, magenta)
statistics were amounted for the first and fifth outputs

after 50 thousands measurements I got next statistics (Fig. Result #3):
**********************************************************************************
- average delay time first output = 92.184 microseconds;
- minimal delay time first output = 26.4 microseconds;
- maximal delay time first output = 189.6 microseconds ;
- standard deviation first output = 23.585 microsecond;
- average active state duration first output = 9.5513 milliseconds (instead of 10 milliseconds, which was set at the project);
- minimal active state duration first output = 8.112 milliseconds;
- maximal active state duration first output = 10.270 milliseconds;
**********************************************************************************
- average delay time fifth output = 107.88 microseconds;
- minimal delay time fifth output = 19.2 microseconds;
- maximal delay time fifth output = 271.2 microseconds ;
- standard deviation fifth output = 37.053 microsecond;
- average active state duration fifth output = 9.5589 milliseconds (instead of 10 milliseconds, which was set at the project);
- minimal active state duration fifth output = 8.113 milliseconds;
- maximal active state duration fifth output = 10.302 milliseconds;

Conclusion:
the circuit, consisting of IX, E_SWITCH, E_DELAY, E_RS and QX blocks, has a active state duration range from the set value of about 1.2 milliseconds; the average delay time differs from the set value by 0.45 milliseconds.

[Updated on: Fri, 01 November 2019 05:27]

Report message to a moderator

Re: Experiments with Raspberry Pi #1 [message #1816590 is a reply to message #1816550] Fri, 01 November 2019 03:07 Go to previous messageGo to next message
joy woo is currently offline joy wooFriend
Messages: 198
Registered: May 2019
Senior Member
Good post, i expect the author to continue with this post, i also have several questions, which i am confused with,
1. which version of OS are you using, original raspbian or with the real time kernal package?
2. comparing Single-Chip Microcomputer, the os provide powerful functionalities, but that also means many unnecessay processes, that will interrupt forte, should we need to cut the os according to the minimize requirement, or increasing the priority of forte process is enough?
3. comparing small business PLC, are there anything that the 3b+ doesn't have? Can also talking about the industry hardware and design for industry.
4. when we use softplc instead of traditional plc, which points we should pay attention to?
5. 3b+ is just for testing or the possibility for industry using?
Re: Experiments with Raspberry Pi #1 [message #1816599 is a reply to message #1816370] Fri, 01 November 2019 07:40 Go to previous messageGo to next message
Vishnu Easwaran E is currently offline Vishnu Easwaran EFriend
Messages: 19
Registered: August 2017
Junior Member
Great!! hope to see more of these.
Re: Experiments with Raspberry Pi #1 [message #1816612 is a reply to message #1816590] Fri, 01 November 2019 14:26 Go to previous messageGo to next message
Mike Wazowski is currently offline Mike WazowskiFriend
Messages: 23
Registered: October 2019
Junior Member
Thanks. Glad to hear that.

Answers on your questions:
1) Realtime Pi https://guysoft.wordpress.com/2017/10/09/realtimepi/
But after upgrading flags "PREEMPT" and "RT" gone.
uname -a : Linux realtimepi 4.19.80-v7+ #1275 SMP
lsb_release -a : Raspbian GNU/Linux 9.11 (stretch)
2) Difficult to answer, but I'm trying to isolate two of four CPUs for Forte. And this shows better behavior because the kernel schedule does not affect Forte.
3) I don't know. I tested BeagleBone before Raspberry Pi 3B+. So my awareness on this issue is modest.
4) What are "softplc" and "tradition plc"?
5) Maybe 3B+ will be implemented in a equipment of a company where I work. Therefore it is for both of testing and industry use.

[Updated on: Fri, 01 November 2019 14:28]

Report message to a moderator

Re: Experiments with Raspberry Pi #1 [message #1816613 is a reply to message #1816599] Fri, 01 November 2019 14:28 Go to previous messageGo to next message
Mike Wazowski is currently offline Mike WazowskiFriend
Messages: 23
Registered: October 2019
Junior Member
Thanks. There will be more experiments, I guess.
Re: Experiments with Raspberry Pi #1 [message #1816619 is a reply to message #1816550] Fri, 01 November 2019 14:59 Go to previous messageGo to next message
Mike Wazowski is currently offline Mike WazowskiFriend
Messages: 23
Registered: October 2019
Junior Member
Project #4

Goal:
to create project which will transfer from a input on a output signals with duration more than a set value (Fig. ProjectMap #4).

Project build:
a IDE project consists of IX (input), E_SWITCH (to go to events manage), E_DELAY determines whether to transmit a input signal to the output), E_RS (create output signal) and QX (output) (Fig. IDE #4), system configuration (Fig. Configuration #4);

C program on Raspberry Pi generated input signal with different duration (File: Cprogramm#4);

compiling: gcc -o Cprogram Cprogram#4.c -lwiringPi

Results:
(for signal with frequency 40 Hz)

wrote to console chrt -r -a -p 99 `pidof forte`
1 oscillograph channel was installed on the input signal (yellow)
1 oscillograph channel was installed on the output (green)

after 700 thousands measurements I got next statistics (Fig. Result #4):
**********************************************************************************
- average delay time = 4.5263 milliseconds (instead of 5 millisecond, which I expected);
- minimal delay time = 3.0560 milliseconds;
- maximal delay time = 9.7064 milliseconds;
- standard deviation = 343.28 microseconds.

Conclusion:
the circuit does not transmit short impulses with duration less 1 milliseconds, but signal delay range from the expected value is about 6.65 millisecond (3.0560 - 9.7064 milliseconds); the average delay time differs from the expected value by 0.47 milliseconds.
Re: Experiments with Raspberry Pi #1 [message #1816641 is a reply to message #1816619] Sun, 03 November 2019 02:40 Go to previous message
joy woo is currently offline joy wooFriend
Messages: 198
Registered: May 2019
Senior Member
soft plc is a software delevoped by standard c/c++ which is running in os, such as forte, codesys, softservo,MULTIPROG.
traditional plc: the runtime is as a firmware in single-chip microcomputer, which is not portable, not like forte can copy anywhere.
that's my understanding.
Do you have any suggestion on i2c extension shield for driving industry motor/servo, the adafruit's PCA9685 seems to be for model making.

[Updated on: Sun, 03 November 2019 02:47]

Report message to a moderator

Previous Topic:HMI with 4diac FORTE on raspberryPI using scadaBR
Next Topic:Improved OPC UA support for 4diac
Goto Forum:
  


Current Time: Tue Mar 19 03:17:38 GMT 2024

Powered by FUDForum. Page generated in 0.02292 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top