Welcome, Guest
Username: Password: Remember me

TOPIC: Re:Proview as HMI to Siemens S7?

Re:Proview as HMI to Siemens S7? 12 years 1 month ago #3401

  • HTRasmus
  • HTRasmus's Avatar
  • OFFLINE
  • Gold Boarder
  • Posts: 182
  • Karma: 0
I Had the same thoughts but after reading the help class for the build option i noticed that path only should be given if the path to the script file is not in /usr/lib/ so i did not give any path.

i think the plc thread is not recognising the pid from the libnodave or what ever. but i cant figure out how to investigate.

does the plc thread give any hidden output?
The administrator has disabled public write access.

Re:Proview as HMI to Siemens S7? 12 years 1 month ago #3403

  • claes
  • claes's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 3178
  • Thank you received: 502
  • Karma: 133
The only thing that is needed is the /usr/lib/libnodave.so file. As it resides on the standard archive directory no path has to be specified. -lnodave in the opt file should be enough.

If the IO methods for the Nodave_PLC is called there should be some error mesages in the log file (System/System message in rt_xtt or log-file on $pwrp_log).

What should happen is that the IO handling in Proview finds all IO objects and calls the init methods for them. The init method for Nodave_PLC and Nodave_Transaction calls the nodave API. They are already compiled as a part of the Proview release in the $pwr_lib/libpwr_rt.a archive. The init method for Nodave_PLC opens a socket and creates a dave interface and if any of these calls goes wrong they are logged in the log file.

/Claes
The administrator has disabled public write access.

Re:Proview as HMI to Siemens S7? 12 years 1 month ago #3405

  • HTRasmus
  • HTRasmus's Avatar
  • OFFLINE
  • Gold Boarder
  • Posts: 182
  • Karma: 0
Hi claes and frans..

It seems to me that it lies in an open socket error. which i can if the plc-thread is not run by root and the socket we are trying to open is 102. correct me if i am wrong.

next step. how to open the socket with the right privileges
The administrator has disabled public write access.

Re:Proview as HMI to Siemens S7? 12 years 1 month ago #3406

  • claes
  • claes's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 3178
  • Thank you received: 502
  • Karma: 133
Set owner of the plc executable to root, and the s-bit. This is normally done by the distributor but as you are running on the development station you have to do it by hand.

> sudo chown root $pwrp_exe/plc...
> sudo chmod u+s $pwrp_exe/plc...

You have to replace $pwrp_exe with the actual path. Note that this has to be done everytime you build the node.

/Claes
The administrator has disabled public write access.

Re:Proview as HMI to Siemens S7? 12 years 1 month ago #3407

  • HTRasmus
  • HTRasmus's Avatar
  • OFFLINE
  • Gold Boarder
  • Posts: 182
  • Karma: 0
thanks claes i tried your suggestion but still the same error in the log.

just checked and i chowned and chmoded all plc files in my project but does not seem to do the trick for me. :S

I will try to investigate a bit further and let you know my results
The administrator has disabled public write access.

Re:Proview as HMI to Siemens S7? 12 years 1 month ago #3408

  • HTRasmus
  • HTRasmus's Avatar
  • OFFLINE
  • Gold Boarder
  • Posts: 182
  • Karma: 0
HHm cant seem to figure out where this goes wrong..

when we install libnodave does the extracted folder needs to have a specific location or is all that is needed included in proview.?

when i call libnodave seperately i get the right readouts from my plc without having to call the testISO_TCP with root privileges.

i notice the opensocket.c and opensocket.h files. does proview look for these anywhere?

Update

I tried creating a new project from scratch and now is see this line in the plc***.opt file

$pwrb_root/os_linux/hw_x86/exp/obj/rt_io_user.o -lpwr_rt -lpwr_pnak_dummy -lpwr_cifx_dummy -lpwr_usb_dummy -lpwr_usbio_dummy -lpwr_nodave_dummy

this does not looklike the last opt. file i was generating when building my node
Last Edit: 12 years 1 month ago by HTRasmus.
The administrator has disabled public write access.
Time to create page: 8.627 seconds