Jump to content
OMRON Forums

dennisg

Members
  • Posts

    37
  • Joined

  • Last visited

Everything posted by dennisg

  1. I am trying to figure out how to access IO space from inside a PLC script. I would like to just read it into P values. It will be a 26 bit value at piom + $A00000 (lower 24 bits), and piom + $A00004 (upper 8 bits). What is the syntax to accomplish this ?
  2. Still learning the Delta Tau architecture. I would like to begin to understand how to set things up so the PPMAC comes up and runs our application and servo routines at power up. Pointers on where to read up on doing this would be appreciated.
  3. Not breaking in an interrupt context makes perfect sense, had not thought of it that way. Right now I am just trying to become familiar with the Delta Tau architecture and environment. Quite a bit different from embedded controls programming I have done in the past. Thanks
  4. Thanks Sina, I am also trying to debug this user servo routine but I don't think the breakpoints are working or I am using the debugger incorrectly. I entered it in the servo table and I know it's running because I can set a watchpoint on a Motor variable that I am incrementing inside of it.
  5. I am now on the learning curve for C coding on the PPMAC. I would like to access I/O memory that I believe the ACC84E occupies. Mainly the raw data coming in from a Renishaw BiSS encoder. In script this is defined as Sys.piom + $A00000; // address of lower 24 bit Sys.piom + $A00004; // address of upper 8 bits How can I access these using C ?
  6. I think you are right. I'm running old inherited code that may have never actually compiled. I will start with a fresh solution and go from there.
  7. Thanks, that gets it to "compile" now. A whole bunch of errors though. All functions in usercode.c are currently empty so not sure what is causing all these errors. I must not have environment variables set correctly or something. I'm running 1.4.0.62 of the IDE, the PPMAC has the Sept 2011 firmware on it. The error dump is below: ------------------------------------------------------ Please wait while mapping Power PMAC variables. End of syncing the database. PMAC variables are mapped successfully. Build Process For usralgo.ko has ended. Build Process For capp1.out has started. Build Process For usralgo.so has started. C:\Users\dennis.gabler\Documents\PowerPmacSuite\NewAMS2Solution\NewAMS2Solution\C Language\Realtime Routines\/usr/local/bin/../lib/gcc/powerpc-405-linux-gnu/4.2.2/../../../../powerpc-405-linux-gnu/sys-include/linux/sched.h(16,0): Warning : in file included from /usr/local/bin/../lib/gcc/powerpc-405-linux-gnu/4.2.2/../../../../powerpc-405-linux-gnu/sys-include/linux/sched.h C:\Users\dennis.gabler\Documents\PowerPmacSuite\NewAMS2Solution\NewAMS2Solution\C Language\Realtime Routines\/usr/local/bin/../lib/gcc/powerpc-405-linux-gnu/4.2.2/../../../../powerpc-405-linux-gnu/sys-include/linux/module.h(9,0): Warning : in file included from /usr/local/bin/../lib/gcc/powerpc-405-linux-gnu/4.2.2/../../../../powerpc-405-linux-gnu/sys-include/linux/module.h C:\Users\dennis.gabler\Documents\PowerPmacSuite\NewAMS2Solution\NewAMS2Solution\C Language\Realtime Routines\usrcode.h(1,0): Warning : in file included from usrcode.h C:\Users\dennis.gabler\Documents\PowerPmacSuite\NewAMS2Solution\NewAMS2Solution\C Language\Realtime Routines\usrcode.c(26,0): Warning : in file included from usrcode.c C:\Users\dennis.gabler\Documents\PowerPmacSuite\NewAMS2Solution\NewAMS2Solution\C Language\Realtime Routines\/usr/local/bin/../lib/gcc/powerpc-405-linux-gnu/4.2.2/../../../../powerpc-405-linux-gnu/sys-include/linux/signal.h(2,0): Warning : #warning "You should include . This time I will do it for you." C:\Users\dennis.gabler\Documents\PowerPmacSuite\NewAMS2Solution\NewAMS2Solution\C Language\Realtime Routines\/usr/local/bin/../lib/gcc/powerpc-405-linux-gnu/4.2.2/../../../../powerpc-405-linux-gnu/sys-include/linux/sched.h(79,0): Warning : in file included from /usr/local/bin/../lib/gcc/powerpc-405-linux-gnu/4.2.2/../../../../powerpc-405-linux-gnu/sys-include/linux/sched.h C:\Users\dennis.gabler\Documents\PowerPmacSuite\NewAMS2Solution\NewAMS2Solution\C Language\Realtime Routines\/usr/local/bin/../lib/gcc/powerpc-405-linux-gnu/4.2.2/../../../../powerpc-405-linux-gnu/sys-include/linux/module.h(9,0): Warning : in file included from /usr/local/bin/../lib/gcc/powerpc-405-linux-gnu/4.2.2/../../../../powerpc-405-linux-gnu/sys-include/linux/module.h C:\Users\dennis.gabler\Documents\PowerPmacSuite\NewAMS2Solution\NewAMS2Solution\C Language\Realtime Routines\usrcode.h(1,0): Warning : in file included from usrcode.h C:\Users\dennis.gabler\Documents\PowerPmacSuite\NewAMS2Solution\NewAMS2Solution\C Language\Realtime Routines\usrcode.c(26,0): Warning : in file included from usrcode.c C:\Users\dennis.gabler\Documents\PowerPmacSuite\NewAMS2Solution\NewAMS2Solution\C Language\Realtime Routines\/usr/local/bin/../lib/gcc/powerpc-405-linux-gnu/4.2.2/../../../../powerpc-405-linux-gnu/sys-include/linux/resource.h(2,0): Warning : #warning "You should include . This time I will do it for you." C:\Users\dennis.gabler\Documents\PowerPmacSuite\NewAMS2Solution\NewAMS2Solution\C Language\Realtime Routines\/usr/local/bin/../lib/gcc/powerpc-405-linux-gnu/4.2.2/../../../../powerpc-405-linux-gnu/sys-include/linux/sched.h(10,0): Warning : in file included from /usr/local/bin/../lib/gcc/powerpc-405-linux-gnu/4.2.2/../../../../powerpc-405-linux-gnu/sys-include/linux/sched.h C:\Users\dennis.gabler\Documents\PowerPmacSuite\NewAMS2Solution\NewAMS2Solution\C Language\Realtime Routines\/usr/local/bin/../lib/gcc/powerpc-405-linux-gnu/4.2.2/../../../../powerpc-405-linux-gnu/sys-include/linux/module.h(9,0): Warning : in file included from /usr/local/bin/../lib/gcc/powerpc-405-linux-gnu/4.2.2/../../../../powerpc-405-linux-gnu/sys-include/linux/module.h C:\Users\dennis.gabler\Documents\PowerPmacSuite\NewAMS2Solution\NewAMS2Solution\C Language\Realtime Routines\usrcode.h(1,0): Warning : in file included from usrcode.h C:\Users\dennis.gabler\Documents\PowerPmacSuite\NewAMS2Solution\NewAMS2Solution\C Language\Realtime Routines\usrcode.c(26,0): Warning : in file included from usrcode.c C:\Users\dennis.gabler\Documents\PowerPmacSuite\NewAMS2Solution\NewAMS2Solution\C Language\Realtime Routines\/usr/local/bin/../lib/gcc/powerpc-405-linux-gnu/4.2.2/../../../../powerpc-405-linux-gnu/sys-include/linux/rbtree.h(128,0): Error : expected ',' or '...' before 'new' C:\Users\dennis.gabler\Documents\PowerPmacSuite\NewAMS2Solution\NewAMS2Solution\C Language\Realtime Routines\usrcode.h(1,0): Warning : in file included from usrcode.h C:\Users\dennis.gabler\Documents\PowerPmacSuite\NewAMS2Solution\NewAMS2Solution\C Language\Realtime Routines\usrcode.c(26,0): Warning : in file included from usrcode.c C:\Users\dennis.gabler\Documents\PowerPmacSuite\NewAMS2Solution\NewAMS2Solution\C Language\Realtime Routines\/usr/local/bin/../lib/gcc/powerpc-405-linux-gnu/4.2.2/../../../../powerpc-405-linux-gnu/sys-include/linux/module.h(41,0): Error : field 'attr' has incomplete type C:\Users\dennis.gabler\Documents\PowerPmacSuite\NewAMS2Solution\NewAMS2Solution\C Language\Realtime Routines\/usr/local/bin/../lib/gcc/powerpc-405-linux-gnu/4.2.2/../../../../powerpc-405-linux-gnu/sys-include/linux/module.h(49,0): Error : field 'kobj' has incomplete type C:\Users\dennis.gabler\Documents\PowerPmacSuite\NewAMS2Solution\NewAMS2Solution\C Language\Realtime Routines\/usr/local/bin/../lib/gcc/powerpc-405-linux-gnu/4.2.2/../../../../powerpc-405-linux-gnu/sys-include/sched.h(32,0): Warning : in file included from /usr/local/bin/../lib/gcc/powerpc-405-linux-gnu/4.2.2/../../../../powerpc-405-linux-gnu/sys-include/sched.h C:\Users\dennis.gabler\Documents\PowerPmacSuite\NewAMS2Solution\NewAMS2Solution\C Language\Realtime Routines\/opt/eldk-4.2/debian_rootfs/usr/local/xenomai/include/posix/sched.h(58,0): Warning : in file included from /opt/eldk-4.2/debian_rootfs/usr/local/xenomai/include/posix/sched.h C:\Users\dennis.gabler\Documents\PowerPmacSuite\NewAMS2Solution\NewAMS2Solution\C Language\Realtime Routines\/opt/eldk-4.2/debian_rootfs/usr/local/xenomai/include/posix/pthread.h(147,0): Warning : in file included from /opt/eldk-4.2/debian_rootfs/usr/local/xenomai/include/posix/pthread.h C:\Users\dennis.gabler\Documents\PowerPmacSuite\NewAMS2Solution\NewAMS2Solution\C Language\Realtime Routines\/opt/eldk-4.2/debian_rootfs/opt/ppmac/rtpmac/RtGpShm.h(26,0): Warning : in file included from /opt/eldk-4.2/debian_rootfs/opt/ppmac/rtpmac/RtGpShm.h C:\Users\dennis.gabler\Documents\PowerPmacSuite\NewAMS2Solution\NewAMS2Solution\C Language\Realtime Routines\usrcode.h(2,0): Warning : in file included from usrcode.h C:\Users\dennis.gabler\Documents\PowerPmacSuite\NewAMS2Solution\NewAMS2Solution\C Language\Realtime Routines\usrcode.c(26,0): Warning : in file included from usrcode.c C:\Users\dennis.gabler\Documents\PowerPmacSuite\NewAMS2Solution\NewAMS2Solution\C Language\Realtime Routines\/usr/local/bin/../lib/gcc/powerpc-405-linux-gnu/4.2.2/../../../../powerpc-405-linux-gnu/sys-include/bits/sched.h(62,0): Error : redefinition of 'struct sched_param' C:\Users\dennis.gabler\Documents\PowerPmacSuite\NewAMS2Solution\NewAMS2Solution\C Language\Realtime Routines\/usr/local/bin/../lib/gcc/powerpc-405-linux-gnu/4.2.2/../../../../powerpc-405-linux-gnu/sys-include/linux/sched.h(109,0): Error : previous definition of 'struct sched_param' C:\Users\dennis.gabler\Documents\PowerPmacSuite\NewAMS2Solution\NewAMS2Solution\C Language\Realtime Routines\/opt/eldk-4.2/debian_rootfs/opt/ppmac/rtpmac/ecrt.h(96,0): Warning : in file included from /opt/eldk-4.2/debian_rootfs/opt/ppmac/rtpmac/ecrt.h C:\Users\dennis.gabler\Documents\PowerPmacSuite\NewAMS2Solution\NewAMS2Solution\C Language\Realtime Routines\/opt/eldk-4.2/debian_rootfs/opt/ppmac/rtpmac/ethercat.h(2,0): Warning : in file included from /opt/eldk-4.2/debian_rootfs/opt/ppmac/rtpmac/ethercat.h C:\Users\dennis.gabler\Documents\PowerPmacSuite\NewAMS2Solution\NewAMS2Solution\C Language\Realtime Routines\/opt/eldk-4.2/debian_rootfs/opt/ppmac/rtpmac/RtGpShm.h(32,0): Warning : in file included from /opt/eldk-4.2/debian_rootfs/opt/ppmac/rtpmac/RtGpShm.h C:\Users\dennis.gabler\Documents\PowerPmacSuite\NewAMS2Solution\NewAMS2Solution\C Language\Realtime Routines\usrcode.h(2,0): Warning : in file included from usrcode.h C:\Users\dennis.gabler\Documents\PowerPmacSuite\NewAMS2Solution\NewAMS2Solution\C Language\Realtime Routines\usrcode.c(26,0): Warning : in file included from usrcode.c C:\Users\dennis.gabler\Documents\PowerPmacSuite\NewAMS2Solution\NewAMS2Solution\C Language\Realtime Routines\/usr/local/bin/../lib/gcc/powerpc-405-linux-gnu/4.2.2/../../../../powerpc-405-linux-gnu/sys-include/stdlib.h(536,0): Error : declaration does not declare anything C:\Users\dennis.gabler\Documents\PowerPmacSuite\NewAMS2Solution\NewAMS2Solution\C Language\Realtime Routines\usrcode.c(46,0): Error : redefinition of 'double user_pid_ctrl_new(MotorData*)' C:\Users\dennis.gabler\Documents\PowerPmacSuite\NewAMS2Solution\NewAMS2Solution\C Language\Realtime Routines\usrcode.c(36,0): Error : 'double user_pid_ctrl_new(MotorData*)' previously defined here Done building project "NewAMS2Solution.ppproj" -- FAILED. Build FAILED. Build process failed during the Realtime Routines build and download.
  8. Hi Sina, I'm not sure usercode.c even builds, below is my status window output. Please wait while mapping Power PMAC variables. End of syncing the database. PMAC variables are mapped successfully. Build Process For capp1.out has started. Build Process For capp1.out has ended. Build Succeeded. Please wait while downloading to Power Pmac. Downloading capp1.out to Power Pmac. Downloading global definitions.pmh to Power Pmac. Downloading subprog1.pmc to Power Pmac. Downloading prog1.pmc to Power Pmac. Downloading butterfly.plc to Power Pmac. Downloading encoder_test.plc to Power Pmac. Downloading populate conv table.plc to Power Pmac. Downloading selectable_freqs.plc to Power Pmac. Downloading stepped sine.plc to Power Pmac. Downloading pp_startup.txt to Power Pmac. Downloading pp_disable.txt to Power Pmac. Downloading pp_proj.ini to Power Pmac. uploading pp_error.log file from the Power Pmac. uploading pp_proj.log file from the Power Pmac. uploading pp_error_hist.log file from the Power Pmac. uploading pp_debug.txt file from the Power Pmac. uploading pp_proj.h file from the Power Pmac. Downloading NewAMS2Solution.ppproj to Power Pmac. Uploading and syncing PMAC variables. Download Successful.
  9. I am trying to write/use my first user written servo routine. I am following the instructions given starting on page 493 of the users manual. I compile and download using the "Build and download all programs" selection, this appears to work. Then I go into Realtime Routines User Servo Setup after right clicking the selection. In the dropdown I see my user_pid_ctrl as an available selection, and I chose that as User Servo 1. When I hit "apply" I get a popup window that says "Please BUILD and DOWNLOAD the project for the User Servo Setup Changes to take effect". I am apparently missing a step here but unsure what that is. Actually I am not totally sure that usercode.c is even being compiled because I put a typo in it to see if it would error on the build and it does not. All I see in the status window is that capp1.c built.
  10. I am running the Sept 2011 firmware here. The next time I see this I will do a screen cap. FWIW this seems to happen to windows that getting frequent updates (velocity, watches, etc.) Followup: I have attached a screen cap of the watch window in this failure mode. I've also seen it at least on the velocity too.
  11. I have also seen this problem in the velocity, and watch windows. My setup is similar to yours.
  12. Thanks Sina, I see it in the terminal window and it appears to change to 3 when I input sys.maxrtplc=3. However when I subsequently load mt PLC that is set to 2 via open plc 2 and look at the task manager, it shows up as a PLC instead of an RTPLC. I do have two other PLC's loaded with it and they are numbered 0, and 1.
  13. I am trying to increase Sys.MaxRtPlc from 1 to 3 via the IDE window Delta Tau->Configure-Setup Variables. It will change but reverts to 1 as soon as I try and run a PLC. I am obviously not using this correctly but I'm at a loss to figure out how to get the change to take.
  14. Thanks to CharlesP there who was kind enough to send me a new unreleased draft version of the ACC-28 manual which I found easier to read, I was able to determine we did indeed only have a 2 channel board. I did some looking around here and found another 2 channel and brought it up for my 3rd channel.
  15. Thanks Sina, is there anything I have to do to specifically enable 3 & 4? I ask because I see the expected raw data on 1 & 2 (Acc28E[1].AdcUdata[0].a, Acc28E[1].AdcUdata[1].a) but not 3 (Acc28E[1].AdcUdata[2].a).
  16. I am adding an input (CH3) to our 4 channel ACC-28E A-D board. The only manual I can find references the UMAC-TURBO. Where can I find the info I need to set this input up on Motor[6] so I can read it from a PLC ? TIA.
  17. [quote='dennisg' pid='3623' dateline='1340722303'] [quote='bradp' pid='3622' dateline='1340722071'] Yes you can put it there or make a seperate .pmh file. Make sure the settings match what your system needs. At the moment this is covered in the Power Pmac User's Manual and in the PPmac training class. Search for IDE in the user manual and although all data is not in one spot after reading all the things you find you will have enough information. [/quote] Thanks. The PPmac training class is unfortunately not in the picture for me presently so doing this the "hard way". I'll search the manual as you described. [/quote] Another newbie question. I have a basic PLC running and have included much of your code into my global_definitions.pmh file. While debugging it I set some watchpoints to see if I can see inputs. If I set the raw inputs to the encoder table as watches (i.e. Sys.piom + $A00000, and Sys.piom + $A00004) I see activity that looks like floating inputs. My current understanding (misunderstanding?) is that Motor[1].pEnc = EncTable[1].a and Motor[1].pEnc2 = EncTable[1].a are what get the output of the encoder table. If I set those as watchpoints I just see integer values that do not change. Understanding that I am still trying to understand how the I/O works I am sure I am viewing this incorrectly. How can I set watchpoints that display the output of the table? I think this output represents a "smoothed" version of the raw inputs. I have attached the PLC I'm using, it was written before my time here but does work. Our setup seems similar to the one in your example although I could be completely wrong. We would like to use the the Renishaw and ACC-84E on our project under development. We are at the proof of concept stage right now.
  18. [quote='bradp' pid='3622' dateline='1340722071'] Yes you can put it there or make a seperate .pmh file. Make sure the settings match what your system needs. At the moment this is covered in the Power Pmac User's Manual and in the PPmac training class. Search for IDE in the user manual and although all data is not in one spot after reading all the things you find you will have enough information. [/quote] Thanks. The PPmac training class is unfortunately not in the picture for me presently so doing this the "hard way". I'll search the manual as you described.
  19. [quote='bradp' pid='3619' dateline='1340696207'] I used it as just a configuration file (.pmh) to load and make a setup at power-on / reset [/quote] Should I just put this code in the global_definitions.pmh file? Also is there a document that describes the use of that file or any .pmh file? I am still coming up to speed with this development environment and hardware. TIA
  20. [quote='bradp' pid='3619' dateline='1340696207'] I used it as just a configuration file (.pmh) to load and make a setup at power-on / reset [/quote] Thanks for this, should this go in the global_definitions.pmh file ?
  21. I have another of my newbie to Delta Tau questions. I am just now embarking on getting this particular combination of hardware running. I am still figuring out how the different program types work. Is this code intended as a PLC or something else ? Thanks, Dennis [quote='bradp' pid='688' dateline='1284046430'] The standard manual is found at this link. It only describes Turbo PMAC http://www.deltatau.com/manuals/pdfs/ACC-84E.pdf?id=634158233091868750 Here is an example on how to use it with Power PMAC: [/quote]
  22. That took care of it, thanks.
  23. I am working with and inherited project/solution, and I'm new to this development environment. the .sln I am using was created 2 years ago. So far I have been able to get the PLC's to download and run, now I am tackling warnings and errors during compilation of usercode.c a typical error shows up like this C:\Users\dennis.gabler\Documents\PowerPmacSuite\AMS2C\AMS2B\C Language\Realtime Routines\/usr/local/bin/../lib/gcc/powerpc-405-linux-gnu/4.2.2/../../../../powerpc-405-linux-gnu/sys-include/stdlib.h(536,0): Error : declaration does not declare anything I do not know if this code ever actually compiled, the author is long gone. I'm trying to figure out what is happening. I downloaded and installed the latest version of the PMAC IDE which I assume is using a newer version of the gcc suite. These errors may be related to when the solution file was created and it's referencing the wrong files when it spawns the compiler. Any suggestions would be greatly appreciated. All errors seem to come from gcc header files.
  24. This would be for information during product development.
×
×
  • Create New...