Jump to content
OMRON Forums

Dan.Allard

Members
  • Posts

    23
  • Joined

  • Last visited

Dan.Allard's Achievements

Explorer

Explorer (4/14)

  • First Post
  • Collaborator Rare
  • Week One Done
  • One Month Later
  • One Year In

Recent Badges

0

Reputation

  1. I think you want to use GetResponceFile in gplib.h. I haven't done this myself on a power pmac but I believe this is the function call you will need to use.
  2. Thanks, I can look at the position feedback. I am running virtual motors that were provided for setting up web server on the PP. I just didn't know if the PP could be configured to always be on a full count. I have always worked with the turbo pmac product line in the past and don't remember ever seeing a position which wasn't configured for subcounts.
  3. The motor[x].ActPos and motor[x].ActVel don't seem to be returning floating point values on my system. The motor[x].PosError is returning what I would expect. Below is what I get when I type these commands into the terminal window. Is there a setting to correct this? The software reference doesn't mention anything. motor[1].ActPos Motor[1].ActPos=5722118563 motor[1].ActVel Motor[1].ActVel=14 motor[1].PosError Motor[1].PosError=14.0083770751953125 from software refrence Motor[x].ActPos Description: Motor outer-loop feedback position Range: Floating-point Units: Motor units Motor[x].ActPos contains the present servo cycle’s net feedback position value for the outer servo loop. It is derived from the measured position in Motor[x].Pos with corrections such as those from position-table compensation and backlash compensation. It is scaled in the motor units and referenced to the power-up position. It will be subtracted from Motor[x].DesPos to obtain the following error value in Motor[x].PosError. To calculate the position relative to the motor zero position, subtract the value of Motor[x].HomePos.
  4. I removed the following two lines from lighttpd.conf allowing lighttpd to run as root. This has corrected the issue and my index.cgi file will run correctly now. # change uid to (default: don't care) #server.username = "www-data" ## change uid to (default: don't care) #server.groupname = "www-data"
  5. I am building a c++ gci website on a pp. When I compile and link my source code with the linking command below I can run the output program from the command line without any issues. I will see the HTML code on my screen with the correct data from the PP. however when I try to access the webpage I get the error message below about binding failed in the lighttpd error log. I quick google search got me the link below which leads me to believe that this is an issue with the group rights for www-data. But I am not sure what I need to do to add the lighttpd web server to the correct group to access the xenomai library required by libppmac. If I remove all references to the PP libraries and compile my program without linking to the PP libraries lighttpd will serve up my index.cgi webpage without any issues so the only problem I am dealing with at the moment is that lighttpd isn't able to run a program which uses the xenomai library. g++ -L /opt/ppmac/libppmac -L/usr/local/xenomai/lib -g -Wall main.o HTML_elementBase.o body.o a.o img.o -o /var/www/cgi-bin/index.cgi -l:libppmac.so \ -l:librtdk.so -l:libpthread_rt.so -l:librtdm.so -l:libxenomai.so Xenomai: binding failed: Operation not permitted. http://www.xenomai.org/pipermail/xenomai/2012-May/025831.html
  6. Hi Dave, You had a good idea. I did some more research on the web and figured out the linker errors is a missing link to the exnomai library which is used by libppmac.so. There are a few shared libraries in the exnomai directory so through trial and error I determined which ones I need to get a simple program with just a library open and close function call to compile and run. the calls below from my makefile worked to produce an output file which will run. As an fyi this approach is not for the faint of heart. Several times the program compiled but something else was going off into left field when it would run until I got to the minimum list of included library files I got an error message when the program ran which which I have no idea what it meant. Until I hear otherwise I am going to assume the solution which compiles and runs must be acceptable. It would be nice to know what the error message below is all about. Also it would be good to know that just linking the libraries in with the compiler flags below is sufficient. I don't know if there are any special flags that should be used with the libraries. My hope is that any special flags would only have been needed when the libraries were compiled not at linking. My reasoning for this is simply that the linking is really just linking calls to functions with binary function code. error message which showed up when the program ran until I eliminated all the unneeded library links. Xenomai: uitron skin or CONFIG_XENO_OPT_PERVASIVE disabled. (modprobe xeno_uitron?) make: *** [default] Error 1 working makefile run make g++ -g -Wall -c -I /opt/ppmac/libppmac/ -I /opt/ppmac/rtpmac main.cpp g++ -g -Wall -c libHTML/HTML_elementBase.cpp g++ -g -Wall -c libHTML/body.cpp g++ -g -Wall -c libHTML/a.cpp g++ -g -Wall -c libHTML/img.cpp g++ -L /opt/ppmac/libppmac -L/usr/local/xenomai-2.5.6/lib -g -Wall main.o HTML_elementBase.o body.o a.o img.o -o index.cgi -l:libppmac.so -l:librtdk.so -l:libpthread_rt.so -l:librtdm.so -l:libxenomai.so
  7. Just to complete the set here are the results from the /var/ftp directory. I will do some reading on the linker options and see if maybe i am missing something there. make g++ -g -Wall -c -I /var/ftp/ppmaclibs/libppmac -I /var/ftp/ppmaclibs/rtpmac main.cpp g++ -g -Wall -c libHTML/HTML_elementBase.cpp g++ -g -Wall -c libHTML/body.cpp g++ -g -Wall -c libHTML/a.cpp g++ -g -Wall -c libHTML/img.cpp g++ -g -Wall -L /var/ftp/ppmaclibs/libppmac -o index.cgi main.o HTML_elementBase.o body.o a.o img.o -l:libppmac.so /var/ftp/ppmaclibs/libppmac/libppmac.so: undefined reference to `__wrap_shm_open' /var/ftp/ppmaclibs/libppmac/libppmac.so: undefined reference to `__wrap_pthread_mutexattr_init' /var/ftp/ppmaclibs/libppmac/libppmac.so: undefined reference to `__wrap_pthread_create' /var/ftp/ppmaclibs/libppmac/libppmac.so: undefined reference to `__wrap_setsockopt' /var/ftp/ppmaclibs/libppmac/libppmac.so: undefined reference to `__wrap_bind' /var/ftp/ppmaclibs/libppmac/libppmac.so: undefined reference to `__wrap_sem_post' /var/ftp/ppmaclibs/libppmac/libppmac.so: undefined reference to `__wrap_shutdown' /var/ftp/ppmaclibs/libppmac/libppmac.so: undefined reference to `__wrap_recv' /var/ftp/ppmaclibs/libppmac/libppmac.so: undefined reference to `__wrap_ftruncate' /var/ftp/ppmaclibs/libppmac/libppmac.so: undefined reference to `__wrap_select' /var/ftp/ppmaclibs/libppmac/libppmac.so: undefined reference to `__wrap_sem_open' /var/ftp/ppmaclibs/libppmac/libppmac.so: undefined reference to `__wrap_pthread_setschedparam' /var/ftp/ppmaclibs/libppmac/libppmac.so: undefined reference to `__wrap_ioctl' /var/ftp/ppmaclibs/libppmac/libppmac.so: undefined reference to `__wrap_nanosleep' /var/ftp/ppmaclibs/libppmac/libppmac.so: undefined reference to `__wrap_sem_wait' /var/ftp/ppmaclibs/libppmac/libppmac.so: undefined reference to `__wrap_read' /var/ftp/ppmaclibs/libppmac/libppmac.so: undefined reference to `__wrap_sem_close' /var/ftp/ppmaclibs/libppmac/libppmac.so: undefined reference to `__wrap_socket' /var/ftp/ppmaclibs/libppmac/libppmac.so: undefined reference to `__wrap_pthread_mutex_unlock' /var/ftp/ppmaclibs/libppmac/libppmac.so: undefined reference to `__wrap_pthread_mutexattr_settype' /var/ftp/ppmaclibs/libppmac/libppmac.so: undefined reference to `__wrap_sem_unlink' /var/ftp/ppmaclibs/libppmac/libppmac.so: undefined reference to `__wrap_munmap' /var/ftp/ppmaclibs/libppmac/libppmac.so: undefined reference to `__wrap_pthread_mutex_lock' /var/ftp/ppmaclibs/libppmac/libppmac.so: undefined reference to `__wrap_pthread_mutex_destroy' /var/ftp/ppmaclibs/libppmac/libppmac.so: undefined reference to `__wrap_pthread_mutex_init' /var/ftp/ppmaclibs/libppmac/libppmac.so: undefined reference to `__wrap_listen' /var/ftp/ppmaclibs/libppmac/libppmac.so: undefined reference to `__wrap_pthread_mutexattr_destroy' /var/ftp/ppmaclibs/libppmac/libppmac.so: undefined reference to `__wrap_close' /var/ftp/ppmaclibs/libppmac/libppmac.so: undefined reference to `__wrap_sched_yield' /var/ftp/ppmaclibs/libppmac/libppmac.so: undefined reference to `__wrap_send' /var/ftp/ppmaclibs/libppmac/libppmac.so: undefined reference to `__wrap_mmap' /var/ftp/ppmaclibs/libppmac/libppmac.so: undefined reference to `__wrap_connect' /var/ftp/ppmaclibs/libppmac/libppmac.so: undefined reference to `__wrap_open' collect2: ld returned 1 exit status make: *** [index.cgi] Error 1
  8. I tried linking to the library files in the other directory names this morning and got a very similar result but with slightly different error messages. make g++ -g -Wall -c -I /opt/ppmac/ppmac/libppmac -I /opt/ppmac/ppmac/rtpmac main.cpp g++ -g -Wall -c libHTML/HTML_elementBase.cpp g++ -g -Wall -c libHTML/body.cpp g++ -g -Wall -c libHTML/a.cpp g++ -g -Wall -c libHTML/img.cpp g++ -g -Wall -L /opt/ppmac/ppmac/libppmac -o index.cgi main.o HTML_elementBase.o body.o a.o img.o -l:libppmac.so /usr/local/xenomai/lib/libpthread_rt.so.1: undefined reference to `shm_open' /usr/local/xenomai/lib/libpthread_rt.so.1: undefined reference to `xnarch_tsc_to_ns' /usr/local/xenomai/lib/libpthread_rt.so.1: undefined reference to `xeno_fault_stack' /usr/local/xenomai/lib/libpthread_rt.so.1: undefined reference to `xeno_current_mode_key' /usr/local/xenomai/lib/libpthread_rt.so.1: undefined reference to `xeno_init_current_mode' /usr/local/xenomai/lib/libpthread_rt.so.1: undefined reference to `xeno_slow_get_current' /usr/local/xenomai/lib/libpthread_rt.so.1: undefined reference to `shm_unlink' /usr/local/xenomai/lib/libpthread_rt.so.1: undefined reference to `xeno_handle_mlock_alert' /usr/local/xenomai/lib/libpthread_rt.so.1: undefined reference to `xeno_set_current' /usr/local/xenomai/lib/libpthread_rt.so.1: undefined reference to `xeno_bind_skin_opt' /usr/local/xenomai/lib/libpthread_rt.so.1: undefined reference to `xeno_slow_get_current_mode' /usr/local/xenomai/lib/libpthread_rt.so.1: undefined reference to `xnarch_divrem_billion' /usr/local/xenomai/lib/libpthread_rt.so.1: undefined reference to `xeno_sem_heap' /usr/local/xenomai/lib/libpthread_rt.so.1: undefined reference to `__xnsig_dispatch' /usr/local/xenomai/lib/libpthread_rt.so.1: undefined reference to `xeno_sigshadow_install_once' /usr/local/xenomai/lib/libpthread_rt.so.1: undefined reference to `xeno_current_key' collect2: ld returned 1 exit status
  9. I found two versions of the headers files which match but I think I have something wrong with the link to the shared library in my make files because it gives me a list of undefined reference to errors when it links. This is my first time building make files by hand. At this point I think it is a problem with the g++ command line but I can't see what is wrong. make g++ -g -Wall -c -I /opt/ppmac/libppmac -I /opt/ppmac/rtpmac main.cpp g++ -g -Wall -c libHTML/HTML_elementBase.cpp g++ -g -Wall -c libHTML/body.cpp g++ -g -Wall -c libHTML/a.cpp g++ -g -Wall -c libHTML/img.cpp g++ -g -Wall -L /opt/ppmac/libppmac -o index.cgi main.o HTML_elementBase.o body.o a.o img.o -l:libppmac.so /opt/ppmac/libppmac/libppmac.so: undefined reference to `__wrap_shm_open' /opt/ppmac/libppmac/libppmac.so: undefined reference to `__wrap_pthread_mutexattr_init' /opt/ppmac/libppmac/libppmac.so: undefined reference to `__wrap_pthread_create' /opt/ppmac/libppmac/libppmac.so: undefined reference to `__wrap_setsockopt' /opt/ppmac/libppmac/libppmac.so: undefined reference to `__wrap_bind' /opt/ppmac/libppmac/libppmac.so: undefined reference to `__wrap_sem_post' /opt/ppmac/libppmac/libppmac.so: undefined reference to `__wrap_shutdown' /opt/ppmac/libppmac/libppmac.so: undefined reference to `__wrap_recv' /opt/ppmac/libppmac/libppmac.so: undefined reference to `__wrap_ftruncate' /opt/ppmac/libppmac/libppmac.so: undefined reference to `__wrap_select' /opt/ppmac/libppmac/libppmac.so: undefined reference to `__wrap_sem_open' /opt/ppmac/libppmac/libppmac.so: undefined reference to `__wrap_pthread_setschedparam' /opt/ppmac/libppmac/libppmac.so: undefined reference to `__wrap_ioctl' /opt/ppmac/libppmac/libppmac.so: undefined reference to `__wrap_nanosleep' /opt/ppmac/libppmac/libppmac.so: undefined reference to `__wrap_sem_wait' /opt/ppmac/libppmac/libppmac.so: undefined reference to `__wrap_read' /opt/ppmac/libppmac/libppmac.so: undefined reference to `__wrap_sem_close' /opt/ppmac/libppmac/libppmac.so: undefined reference to `__wrap_socket' /opt/ppmac/libppmac/libppmac.so: undefined reference to `__wrap_pthread_mutex_unlock' /opt/ppmac/libppmac/libppmac.so: undefined reference to `__wrap_pthread_mutexattr_settype' /opt/ppmac/libppmac/libppmac.so: undefined reference to `__wrap_sem_unlink' /opt/ppmac/libppmac/libppmac.so: undefined reference to `__wrap_munmap' /opt/ppmac/libppmac/libppmac.so: undefined reference to `__wrap_pthread_mutex_lock' /opt/ppmac/libppmac/libppmac.so: undefined reference to `__wrap_pthread_mutex_destroy' /opt/ppmac/libppmac/libppmac.so: undefined reference to `__wrap_pthread_mutex_init' /opt/ppmac/libppmac/libppmac.so: undefined reference to `__wrap_listen' /opt/ppmac/libppmac/libppmac.so: undefined reference to `__wrap_pthread_mutexattr_destroy' /opt/ppmac/libppmac/libppmac.so: undefined reference to `__wrap_close' /opt/ppmac/libppmac/libppmac.so: undefined reference to `__wrap_sched_yield' /opt/ppmac/libppmac/libppmac.so: undefined reference to `__wrap_send' /opt/ppmac/libppmac/libppmac.so: undefined reference to `__wrap_mmap' /opt/ppmac/libppmac/libppmac.so: undefined reference to `__wrap_connect' /opt/ppmac/libppmac/libppmac.so: undefined reference to `__wrap_open' collect2: ld returned 1 exit status
  10. I was just thinking there are a few of both header files on my system maybe I have the wrong pair? Which directory should I be linking to? 192.168.0.40:/# find -name gplib.h ./opt/ppmac/libppmac/gplib.h ./opt/ppmac/ppmac/libppmac/gplib.h ./var/ftp/ppmaclibs/libppmac/gplib.h ./.readonly/var/ftp/ppmaclibs/libppmac/gplib.h ./.readonly/var-tmpfs-mirror/ftp/ppmaclibs/libppmac/gplib.h root@192.168.0.200 192.168.0.40:/# find -name RtGpShm.h ./opt/ppmac/rtpmac/RtGpShm.h ./opt/ppmac/ppmac/rtpmac/RtGpShm.h ./var/ftp/ppmaclibs/rtpmac/RtGpShm.h ./.readonly/var/ftp/ppmaclibs/rtpmac/RtGpShm.h ./.readonly/var-tmpfs-mirror/ftp/ppmaclibs/rtpmac/RtGpShm.h root@192.168.0.200 192.168.0.40:/# find -name libppmac.so ./opt/ppmac/libppmac/libppmac.so ./opt/ppmac/ppmac/libppmac/libppmac.so ./var/ftp/ppmaclibs/libppmac/libppmac.so ./.readonly/var/ftp/ppmaclibs/libppmac/libppmac.so ./.readonly/var-tmpfs-mirror/ftp/ppmaclibs/libppmac/libppmac.so
  11. Getting closer but the compiler isn't happy. It looks like I am missing another include file. I will dig into the manual and IDE help tomorrow and see what I can come up with. This is the code from main.cpp extern "C" { #include } int main(int argc, const char * argv[]) { // opens the deltatau lib InitLibrary() This is what I got when my makefile ran showing the g++ flags and the result. g++ -g -Wall -c -I /opt/ppmac/libppmac/ -I /opt/ppmac/ppmac/rtpmac/ main.cpp In file included from /opt/ppmac/ppmac/rtpmac/RtGpShm.h:2250, from /opt/ppmac/libppmac/gplib.h:31, from main.cpp:14: /opt/ppmac/libppmac/rtpmacapi.h:404: error: use of enum ‘macrocomtype’ without previous declaration /opt/ppmac/libppmac/rtpmacapi.h:457: error: use of enum ‘macrostationtype’ without previous declaration /opt/ppmac/libppmac/rtpmacapi.h:472: error: use of enum ‘macrocomtype’ without previous declaration /opt/ppmac/libppmac/rtpmacapi.h:487: error: use of enum ‘macrocomtype’ without previous declaration /opt/ppmac/libppmac/rtpmacapi.h:513: error: use of enum ‘macrocomtype’ without previous declaration /opt/ppmac/libppmac/rtpmacapi.h:530: error: use of enum ‘macrocomtype’ without previous declaration /opt/ppmac/libppmac/rtpmacapi.h:554: error: use of enum ‘macrocomtype’ without previous declaration /opt/ppmac/libppmac/rtpmacapi.h:568: error: use of enum ‘macrocomtype’ without previous declaration In file included from /opt/ppmac/libppmac/gplib.h:43, from main.cpp:14: /opt/ppmac/libppmac/cmdprocessor.h:48: error: ‘MAX_MBSOCKETS’ was not declared in this scope
  12. Thanks. For some reason the files don't seem to be on the path for the g++ compiler. I had to include the full path. The extern C is because I am programming in C++. extern "C" { #include "/opt/ppmac/ppmac/libppmac/gplib.h" } There is also a typo in the other file name above it should be. /opt/ppmac/libppmac/libppmac.so
  13. How do I access the gplib library from linux? I am writing a program which will run in linux and be compiled by gcc on the PP in linux. I have looked at the software reference the users manual and at the help in the IDE but I can't seem to find any reference which shows an example of programming directly in linux on the PP. I have searched the PP directory structure some and haven't found any header files. I could run gpascii in the background but I would prefer to link to a dynamic library instead. It would be more efficient than running another program in the background.
  14. Is there any way to mount an external files system over ethernet with the PP? I can use sshfs to mount the DT as an external file system onto my mac but as far as i can tell the driver for SSHFS only works with fuse which requires you not be root and also require a kernel level driver. All the shared file systems I looked recently looked as though they needed kernel level support. It would be really handy for a few reasons if I could mount a filesystem on my mac from the pp. It would make a very easy way to share data out of the PP plus it would also provide a means of extending the storage space available to the pp. Right now with SSHFS I can get my mac to see the pp filesystem but i can't get the pp to see the mac filesystem.
  15. I tried compiling the GCC 6.1.0 to get gain C++11 support but I am unable to get the mpfr library to compile. I set the make flag to ignore errors just to see if there are any other issues. As far as I could tell all the errors are related to that one library. When you try to compile the mpfr library there is an error in the make script something about now rule for AUTHORS which is just a text file listing the authors there is also an issue with the patches but if you make a directory patches that error will go away. the authors error I couldn't clear and I don't know make files well enough to edit it or to make a make file to replace it with. If anyone knows how to resolve this issue I would be grateful as I have a lot of C++11 code which I will otherwise have to back rev to C++98.
×
×
  • Create New...