Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: Some questions

Some questions 5 years 1 month ago #10194

  • Avispao
  • Avispao's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 9
  • Karma: 0
Hi,

This last weeks I've been fighting my unknowledge in Proview and I haven't discovered some things, neither in the manuals nor in the forum or internet.

1.- I've been having the same problem (I think) as Denis here. I tested some things and I discovered something.
The problem is that the plc process doesn't work. I think it needs some libraries to run so you can't test it out of the proview runtime, but when you try to run it outside the runtime, it produces a segmentation fault,... soooo it could be a crosscompiling error. I tried to compile a "helloworld" program in the dev station and run it on the runtime station, and... voila! It doesn't work. I compiled it with settings to make a static executable with the crosscompiler ( gcc­6­arm­linux­gnueabihf ), for armv6z (raspi zero w) with vfd as hardfloat... etc. It compiles, but it doesn't work at the raspi. Then I tried to use the old toolchain to crosscompile for raspberry (github.com/raspberrypi/tools) and I was able to compile in the dev station and run in the raspi,.... buuut after changing the parameters to use this toolchain (custom build executables), I can't (force) make the volume to distribute to the raspberry, there are errors.

Setting base /usr/pwr56
Warning! CoLog::log could not open log file $pwrp_db/wb_history.log
Open horno
args: horno pwrp pwrp  
-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
Welcome to
horno           V5.6    

Revision history
2019-01-30      pwrp    Project created
-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
-- Processing line: 82
-- Building volume directory
-- Opening volume 'VolHorno'
-- Build node horno
-- Plc window generated            Planta-PrgPlc-W
-- Plc window compiled for arm_linux optimized -O3 Planta-PrgPlc-W
%GSX-I-CCSUCC, Window compiled           Planta-PrgPlc-W
-- Plc plcpgm compiled for arm_linux optimized -O3 Planta-PrgPlc
-- Building archive for volume: 000_001_001_001
-- Archive built for volume: 000_001_001_001
-- Working with load file volume 'VolHorno'...
-- Open file...
-- Successfully created load file for volume 'VolHorno'
-- 92 objects with a total body size of 74744 bytes were written to new file.
-- Creating bootfile for node mephisto
-- Plc thread generated priority 22, scantime   0.10000 s, 1 plcpgm's 
-- Plc process compiled for arm_linux optimized -O3 -
** Plc program link errors for arm_linux node plc_mephisto_0001_plc
/usr/pwr56/os_linux/hw_arm/exp/lib/libpwr_rt.a(rt_pn_gsdml_data.o): In function `GsdmlDeviceData::read(char const*, int)':
/data0/x5-6-1/pwr/profibus/lib/rt/src/os_linux/.hw_arm/../../rt_pn_gsdml_data.cpp:200: undefined reference to `operator delete(void*, unsigned int)'
/data0/x5-6-1/pwr/profibus/lib/rt/src/os_linux/.hw_arm/../../rt_pn_gsdml_data.cpp:195: undefined reference to `operator delete(void*, unsigned int)'
/data0/x5-6-1/pwr/profibus/lib/rt/src/os_linux/.hw_arm/../../rt_pn_gsdml_data.cpp:196: undefined reference to `operator delete(void*, unsigned int)'
/usr/pwr56/os_linux/hw_arm/exp/lib/libpwr_rt.a(rt_pn_gsdml_data.o): In function `GsdmlDeviceData::copy_slot(unsigned int)':
/data0/x5-6-1/pwr/profibus/lib/rt/src/os_linux/.hw_arm/../../rt_pn_gsdml_data.cpp:212: undefined reference to `operator delete(void*, unsigned int)'
/data0/x5-6-1/pwr/profibus/lib/rt/src/os_linux/.hw_arm/../../rt_pn_gsdml_data.cpp:214: undefined reference to `operator delete(void*, unsigned int)'
/usr/pwr56/os_linux/hw_arm/exp/lib/libpwr_rt.a(rt_pn_gsdml_data.o):/data0/x5-6-1/pwr/profibus/lib/rt/src/os_linux/.hw_arm/../../rt_pn_gsdml_data.cpp:228: more undefined references to `operator delete(void*, unsigned int)' follow
/usr/pwr56/os_linux/hw_arm/exp/lib/libpwr_co.a(co_xml_parser.o): In function `co_xml_parser::next_token()':
/data0/x5-6-1/pwr/src/lib/co/src/os_linux/.hw_arm/../../co_xml_parser.cpp:121: undefined reference to `std::basic_ios<char, std::char_traits<char> >::operator bool() const'
/data0/x5-6-1/pwr/src/lib/co/src/os_linux/.hw_arm/../../co_xml_parser.cpp:125: undefined reference to `std::basic_ios<char, std::char_traits<char> >::operator bool() const'
/data0/x5-6-1/pwr/src/lib/co/src/os_linux/.hw_arm/../../co_xml_parser.cpp:127: undefined reference to `std::basic_ios<char, std::char_traits<char> >::operator bool() const'
/data0/x5-6-1/pwr/src/lib/co/src/os_linux/.hw_arm/../../co_xml_parser.cpp:130: undefined reference to `std::basic_ios<char, std::char_traits<char> >::operator bool() const'
collect2: error: ld returned 1 exit status
%GSX-F-CCERROR, Error from c compiler or linker

This first question is: how can I reliably compile for my raspi zero w? Do I have to change any compiler/linker settings? Where do I have to introduce the changes?


2.- Where does the "pwr_prio" has gone in v5.6? The errors I have at pwr_start's log in the runtime station are produced by the substitute or the lack of this program? Which are the file's owner for this "nice"-like process in order to setuid work?


Thank you very much for your help.
The administrator has disabled public write access.

Some questions 5 years 1 month ago #10195

  • Avispao
  • Avispao's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 9
  • Karma: 0
Please, ignore part of first question, as I have just re-tried to to compile a hello world, and now I'm able to run it on destination...

I'm starting to get mad!!
The administrator has disabled public write access.

Some questions 5 years 1 month ago #10196

  • marc
  • marc's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 710
  • Thank you received: 70
  • Karma: 24
Hi Avispao,

It looks like you are fighting against a bug in pwrrpi56.
The path settings /data0/... is wrong.

By the way I think Denis compiled his project on the Raspberry it self.

I am not sure if the Pi Zero is compatible with the standard build (Raspberry 3 (?)).
A couple of months ago I compiled Proview (5.6.1-1) from source for Ubuntu 14.04/32bit.
What I can remember I created a build for pwrrpi56 as well.


/Marc
Please, use the Wiki if you succeeded your project or solved your problem. Share your work, so we can learn from each other.
The administrator has disabled public write access.
The following user(s) said Thank You: Avispao

Some questions 5 years 1 month ago #10203

  • claes
  • claes's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 3170
  • Thank you received: 497
  • Karma: 133
Hi Avispao,

To enable the priority setting add this to /etc/security/limits.conf and restart the system
@pwrp hard rtprio 99
@pwrp soft rtprio 99

/Claes
The administrator has disabled public write access.

Some questions 5 years 1 month ago #10205

  • marc
  • marc's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 710
  • Thank you received: 70
  • Karma: 24
Hi Avispao,

I cross compiled a project on pwr56 and distributed it to pwrrt_5.6.1-1 (running strech) on a RPI3.
This works fine. I switched the micro sd to a RPI2 and runs as well.
But on a Pi Zero and an old RPI_B there is a problem with rt_io.
The plcthread is not running. When I start (in a terminal) "rt_plc_core" it seems to work.
No idea why....

/Marc
Please, use the Wiki if you succeeded your project or solved your problem. Share your work, so we can learn from each other.
Last Edit: 5 years 3 weeks ago by marc.
The administrator has disabled public write access.
  • Page:
  • 1
Time to create page: 8.423 seconds