Welcome, Guest
Username: Password: Remember me

TOPIC: Communicate with Siemens S7-1200 PLC using Nodave

Communicate with Siemens S7-1200 PLC using Nodave 3 weeks 6 days ago #12278

  • claes
  • claes's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 3179
  • Thank you received: 502
  • Karma: 133
Hi Mika,

You shouldn't have to change anything in the source code. When 'pwre configure' is executed it looks for libnodave, and if it is found it's linked with ProviewR otherwise the dummy archive is used to avoid undefined references. So you should run 'pwre configure' when you have installed libnodave and check in the output that it's found. If it's not found you can look in src/tools/pwre/src/pwre_configure.sh where it's supposed to be.

/Claes
The administrator has disabled public write access.
The following user(s) said Thank You: Mikahi

Communicate with Siemens S7-1200 PLC using Nodave 3 weeks 5 days ago #12281

  • Mikahi
  • Mikahi's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 15
  • Karma: 0
Thanks Claes!

I'm sure I have missed or messed something. 'pwre configure' indicates yes on nodave. File nodave.h is located in /usr/include/ as expected. Maybe I made an error on first step. According to the information I found libnodave makefile should be:
CFLAGS=-m64 -Wall -Winline -DLINUX -DDAVE_LITTLE_ENDIAN -fPIC
CTFLAGS=-m64 -Wall -Winline -fPID -DLINUX -DDAVE_LITTLE_ENDIAN -fPIC
CPPFLAGS=-m64 -Wall -Winline -DLINUX -DDAVE_LITTLE_ENDIAN -fPIC

After that:
>make clean
>make
>cp libnodave.so /usr/lib64/
>cp nodave.h /usr/include
>ldconfig

I'm beginner with linux so bear with me :whistle:

Mika
The administrator has disabled public write access.

Communicate with Siemens S7-1200 PLC using Nodave 2 weeks 3 days ago #12282

  • Mikahi
  • Mikahi's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 15
  • Karma: 0
Hello!

I made a new installation of Ubuntu and latest version of Proview 6.1.3. Then installed libnodave and confirmed testISO_TCP reads and writes PLC. Permissions for files are:
pwrp@promo:/usr/lib$ ls -l libnodave.so
-rwxrwxrwx 1 root root 147712 huhti  16 10:26 libnodave.so
pwrp@promo:/usr/lib$ 
pwrp@promo:/usr/include$ ls -l nodave.h
-rwxrwxrwx 1 root root 49195 huhti  16 10:26 nodave.h
pwrp@promo:/usr/include$

I have set buildoptions object like this:

buildoptions.png


In a opt-file it looks like nodave is active as well:


Screenshotfrom2024-04-1612-32-12.png



No matter how I set nodave_PLC and nodave_Transaction, only thing I get is this:

Screenshotfrom2024-04-1612-29-22.png



Any more tips where I go wrong?

Mika
The administrator has disabled public write access.

Communicate with Siemens S7-1200 PLC using Nodave 2 weeks 3 days ago #12285

  • claes
  • claes's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 3179
  • Thank you received: 502
  • Karma: 133
Hi Mika,

V6.1.3 still doesn't contain support for libnodave so you still have to build ProviewR from sources. Check that libnodave is found by pwre_configure and also make sure that otherio/lib/rt/src/rt_io _m_nodate_plc.c and otherio/lib/rt/src/rt_io_m_nodave_transaction.c are compiled after libnodave is installed. You can check the date for these files with 'ar -tvf $pwr_lib/libpwr_rt.a | grep nodave'. If they are old you can touch these files to force a new compilation. After this you have to rebuild the node. Enter the root volume and save first to make sure the plc executable is rebuilt.

/Claes
The administrator has disabled public write access.
The following user(s) said Thank You: Mikahi

Communicate with Siemens S7-1200 PLC using Nodave 2 weeks 1 day ago #12288

  • Mikahi
  • Mikahi's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 15
  • Karma: 0
Hi!

Trying to build V6.1.3 from source with help from developers guide (2024-01-17). Mentioned packages are installed:

preparations.png


I managed to go through steps "pwre add", "pwre init", "pwre create all" and "pwre configure". First attempt to build all was stopped to errors related to wb_dbms.h and wb_dbms.cpp files. Both of them contained "my_bool" instead of "bool". Is that just a typing error, I donĀ“t know. Anyway I replaced them and took another attempt.

This time build process went much further but terminated eventually:
I 2024-04-18 10:39:19.00  build-wb, Compiling wb_cmd_gtk.cpp
I 2024-04-18 10:39:21.00  build-wb, Linking /home/pwrp/x666/rls/os_linux/hw_x86_64/wb/exe/wb_cmd_gtk
make: Nothing to be done for 'exe'.
I 2024-04-18 10:39:23.00  build-wb, Building Python c extension /home/pwrp/x666/rls/os_linux/hw_x86_64/wb/exe/pwrwb.so
Traceback (most recent call last):
  File "/home/pwrp/pv_sorsa/pwrsrc_6.1.3-1/wb/exp/pwrwb/src/setup_pwrwb.py", line 4, in <module>
    from setuptools import setup, Extension
ModuleNotFoundError: No module named 'setuptools'
mv: cannot stat '/home/pwrp/x666/rls/os_linux/hw_x86_64/bld/exp/pwrwb/lib.linux-x86_64*-3*/pwrwb.cpython-3*-linux-gnu.so': No such file or directory
Traceback (most recent call last):
  File "/home/pwrp/pv_sorsa/pwrsrc_6.1.3-1/wb/exp/pwrwb/src/setup_pwrwb.py", line 4, in <module>
    from setuptools import setup, Extension
ModuleNotFoundError: No module named 'setuptools'
make: *** [/home/pwrp/pv_sorsa/pwrsrc_6.1.3-1/wb/exp/pwrwb/src/makefile:38: /home/pwrp/x666/rls/os_linux/hw_x86_64/wb/exe/pwrwb.so] Error 1
F 2024-04-18 10:39:23.00  build-wb, Fatal error, build terminated
himBHs
pwrp@promo:~$

Perhaps rt module is built regardless of the error. Even if it is, how should I take it into use?

Excuse me for my ignorance :blink:

Mika
The administrator has disabled public write access.

Communicate with Siemens S7-1200 PLC using Nodave 2 weeks 1 day ago #12289

  • claes
  • claes's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 3179
  • Thank you received: 502
  • Karma: 133
Hi Mika,

You have to finish the build to get a complete release.
sudo apt-get install -y libgtk-3-dev doxygen gcc g++ make libasound2-dev \
	libdb5.3-dev libdb5.3++-dev openjdk-11-jdk libmariadb-dev \
	libsqlite3-dev libhdf5-openmpi-dev librabbitmq-dev libmosquitto-dev libusb-1.0.0-dev \
	librsvg2-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libpython3-dev libtirpc-dev \
	python3 python3-setuptools libcap-dev xfonts-100dpi

Seems as python3-setuptools is missing.

/Claes
The administrator has disabled public write access.
The following user(s) said Thank You: Mikahi
Time to create page: 7.489 seconds