Jump to content
OMRON Forums

daves

Members
  • Posts

    261
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by daves

  1. daves

    MACRO home

    Yes it is set to 1. Still not working in hardware mode. I tried software mode because I read: "If the captured position for triggered moves is obtained over the MACRO ring, Power PMAC obtains the position through a software request over the ring, and Motor[x].pCaptPos is not used." in the SRM and thought it was hinting only software mode would function. If only register 1 of the node is used for feedback how would PPMAC know it was getting the captured position or the current live position? What happens to the live feedback when the captured position comes through? Maybe this is not how it works.
  2. daves

    MACRO home

    Those were correct. We got a home to complete by changing CaptureMode to 1 for software capture. We would prefer hardware capture for accuracy but is that not possible over MACRO as there is no way to get the captured position back in the node? Or should it be possible and we have a bad setting messing up the captured position?
  3. daves

    MACRO home

    Thanks for the reply. I'm on my way home so can't check. I'm certain the first three things are as you describe. pCaptFlag is set to the right node on Gate3 5e3. Pretty sure it is register 3. Any other thoughts I can try tomorrow would be useful...
  4. daves

    MACRO home

    We have a two rack system (PPMAC CPU in one connected via Acc5E3 to MACRO16CPU in the other). We have 6 motors on each, set up and working well apart from the ones controlled over the MACRO have a funny issue with homing. The code has been migrated from UMAC and attempts to do things the way we were used to there. Here is the basic procedure: // Disable software limits Motor[1].MaxPos = 0; Motor[1].MinPos = 0; // Capture on Flag n high cmd "MacroSlave0, I912 = 2"; // Set flag PLIM cmd "MacroSlave0, I913 = 1"; sendallcmds; // Set home position Motor[1].HomeOffset = -150; // Disable +/- limits Motor[1].pLimits = 0; // Do the home move home 1; // Restore +/- limits Motor[1].pLimits = m1rememberedlimits; // Set what we want this position to be pset U(1990); // Restore limits Motor[1].MaxPos = m1rememberedmax; Motor[1].MinPos = m1rememberedmin; This appears to work for the motors on the main PPMAC rack: they run into the trigger and back off the amount we expect. On MACRO motors they move into the trigger and back off a seemingly random amount. It is as though the PPMAC and MACRO are out of sync during the home. Are there more parameters on the MACRO or for the PPMAC Motor which need to be set up to get some offsets working together? It is hard to get a handle on what is happening (hence this post). It looks as though the value in the position windows goes up until the trigger is hit, it is then set to some strange value which then decreases to zero during the back-off. This strange value seems to be made up of our required home position and some other value we can't work out. Is there a recommended procedure for homing MACRO motors in this way?
  5. I had done that. I'm not sure how that error message could be related to that. Anyway, turns ot it was the following line: #include "../../PMAC Script Language/Global Includes/common globals.pmh" It seems the build procedure cannot handle spaces in paths. This is a major problem for me as I need to include this file in my C-code (don't worry the script language part is not included thanks to #ifdef)
  6. My experience so far is that Sina's instructions fixed the save -> BRICK error message but I still get the message about the project being different every time I start the IDE.
  7. I think the purpose of CFunc was understood; to enable the CFromScript in BG tasks, this is just not what the manual states. The real point is not being able to set it. I have made a blank project declaring and exporting the CFromScript copied from the manual and still cannot get CFunc to be set to 1. There has to be something else going on and maybe CFuncStatus is the clue...
  8. OK I think I can live with my own timing in RTICPLC, CPLCs are not so critical I think. I would ask please that all tasks are included if you guys can get that sorted, thanks. I see if I put my RTI code in a userservo the task manager shows it nicely so I might consider that if I get round to thinking about the ramifications of when it executes in the scheduling (hopefully none). EDIT: this is if I can get my usrcode.c to build (see post http://forums.deltatau.com/showthread.php?tid=1577)
  9. Great, thanks for figuring it out, this works for me! Looks like a parser error protecting structure elements being substituted out maybe? Anyway, I would probably suggest entering a bug report to fix it as there is no real reason for it to be this way.
  10. I tried to include usrcode.c in an existing mature project and now I get Build Process For usralgo.ko has started. C:\ABD\PowerPMAC\SPMM\Phase2\Phase2\Phase2.ppproj(311,5): Error : fixdep: /cygdrive/c/ABD/POWERP~1/SPMM/Phase2/Phase2/CLANGU~1/REALTI~1/../../PMAC\: No such file or directory Build Process For usralgo.ko has ended. in Release or Debug builds. What do I need to edit to fix this path error?
  11. daves

    PPMAC Power?

    Thank you for the assistance. I have mailed you. It is sensitive but I have stripped a load of stuff out and we trust DT :)
  12. Thanks for starting to clear up what this is showing. Coming from a position of ignorance I would imagine the rticplc and cplc function is called from somewhere and it would simply be a case of double dStart = GetCPUClock(); realtimeinterrupt_plcc(); INTERNAL_REGISTER.RTIPLCTime = GetCPUClock() - dStart; True? I hope you can agree that the task times are not useful to a developer wanting to know the load on his/her system. I feel sure the intention of this display was to recreate the PEWin CPU load display which DOES include code running in PLCC0 (and userservo in the servo section). The IDE manual describes the tasks scantly and in particular "Real Time Interrupt - Move planning and real time Script and C PLCs". Another misleading implication comes from the colours and names used. These match the March 17, 2014 user guide picture of 'Sample Power PMAC Multi-Tasking Time Line' on p61, where again the "RTI task" is said to contain foreground PLCs, It definitely gives the impression the tasks listed in task manager are the coloured blocks in the picture. Can you tell me exactly what is included in each task and what I need to time myself? For example for the RTI, Sina's post http://forums.deltatau.com/showthread.php?tid=1144 lists 17 items as part of the "RTI task" including rticplc. If I were to write my own task manager summing your reported times with my measured times for the missing activities I assume I would have to add it to Sys.RtIntTime before removing servo/phase interrupting tasks as described in SRM p1018 (I'm not sure I have time/resources to do this). Sorry to bang on about this but I am using the IDE 9hrs a day, 5 days a week to get a large project running and I need a feel for what my system is doing without losing my time to misunderstandings.
  13. Trying this as you describe in a new project it fails to download with C:\Users\daves.ABD\Documents\PowerPmacSuite\PowerPmac11\PowerPmac11\PMAC Script Language\Motion Programs\prog1.pmc(7,1) : Error : ( error #31) invalid code : kill 1..MyMaxMotor PS not sure what you meant by "project manager" but I followed the subsequent description. IDE 1.6.0.109 FW 1.6.0.30
  14. daves

    Sys.SimConfigOk

    Thanks for the reply. Setup variables disappearing are not an issue for us, we do not rely on the saved cfg files but set all hardware up in plc only talking to cards which are fitted to the particular rack and only using pointers to addresses rather than structures. We know the particular rack that the code is currently running on from a stored ID number on the card. I still could not get this to work building on a rack containing a superset of the destination rack. In any case a maximalist rack is not feasible. We have 25 machines with 3 heavily populated 18 slot racks each. To make a maximalist rack would need circa 30 slots (if card base addresses don't matter), and you would have to allow more gate 1 addresses as one system has 8 x Acc24E2S cards, another has 6 Acc24E2A cards and these cannot coexist etc... Please can you help me think of another approach? In the short term I am going to have to have an engineer visit the site in Japan with code and IDE and download manually (we simply cannot give the raw code to customers or reasonably expect them to use the IDE).
  15. Thanks for the clarification. This throws up a question. Consider the following: 9.036kHz phase, 2.259kHz servo, 2.2kHz rti. A blank project, no motors, no ECT, RTICPLC=0. Task Manager shows P=1.1 S=1.7 R=10, B=13.6 (microsecond values of phase, servo, rti, bg). Start the below code with Count=1000. My timing variables go to RTITimeA=308 RTITimeM=338 however the Task Manager shows a tiny increase (in unexpected areas): P=1.2, S=3.0, R=13, B=16 Great, task manager shows I'm only using 3% of my RTI. Let's double Count to 2000. Click. RTITime shows 600. PPMAC shows WTDFault BgFault. Why does the contribution of the RTICPLC not get shown in task manager? It seems like it would be good to see how close I am to watchdogging. I assume my 2000 additions are starving the background processes (is this the processing limit?). To me the times don't seem to represent what they say... or there are significant tasks missing. global RTITime; global RTITimeA; global RTITimeM; global Dummy; global Count; --- void realtimeinterrupt_plcc() { double dStart = GetCPUClock(); int i; for (i = 0; i < Count; i++) Dummy = Dummy + randx(200.0); RTITime = GetCPUClock() - dStart; if (RTITime > RTITimeM) RTITimeM = RTITime; if (RTITimeA == 0) RTITimeA = RTITime; else RTITimeA = (7*RTITimeA + RTITime)/8; }
  16. Apologies, that explains everything very well. Another example of me searching the manuals for the wrong phrases and giving up too soon. However don't you think a #define is equivalent to a constant in one of those cases? Or are #defines implemented differently to a substitution in script? Maybe it is simply a parsing error on a valid command, I would really like to be able to do this.
  17. Issue 1 The biggest problem with task manager which confused me and wasted time was the tasks display: What are the Calculation Time values in the table? What is the difference between those and the value from hovering over the bar chart? I found after a good deal of grief the hover value, and that this must be the true time. Issue 2 Where have the CPLCs gone? Issue 3 Can I reset the Tasks - Peak Time values. They could be useful if they could be reset, as it is they (particularly background) seem to peak during download or whenever and you can't use them for study after that. Issue 4 The Programs tab does not show the true Coord and Running states, in particular I know program 1 is running in CS1 but it shows Not Assigned, No. Refresh List fixes this but then clicking on other non-running programs shows them as running Yes. Issue 5 Column clicking to order lists: PMAC Memory Overview - You can order by what you choose, then next refresh the memory columns update to the original buffer order (which is not necessarily the same) PLCs, Programs, Sub Programs - Size orders the column alphabetically rather than by size. Servo - Motor is again alphabetical, ServoCtrl is bizarre. OS Resources - Similar to above.
  18. Is it only possible to have literals in {list} ? Is it to be expected that I cannot have the following in script: #define MAXMOTOR1 27 #define MAXMOTOR 28 kill 1..MAXMOTOR-1; kill 1..MAXMOTOR1; kill 1..Sys.MaxMotors-1; L0=MAXMOTOR1; kill 1..L0; I have to do kill 1..27; and if I change the numbering of the motors I have to remember to find and change this code? I couldn't find the formal specification for {list} {constant} etc...
  19. Can I use this to solve the (I would guess common) problem of supplying an upgrade to a customer? I set it to 1 in my first pmh file. I build and download my project to my development rack (encrypted or not). I do a typical backup. I extract the usrflash folder into a PowerPMAC folder on a USB stick. I boot a customer rack (different accessories) with the USB stick in. I launch the IDE to check and see Default, HWChangeError, NoClocks, PwrOnFault lit. It has not worked. I can use the USB stick on the original rack no problem. Is this the wrong method? I really need to supply customers with a package which upgrades firmware and project code, using the encryption option so they never have access to the original code. I don't want them to need the IDE.
  20. daves

    PPMAC Power?

    Sorry Charles the phrase may have been over dramatic and not helpful. The first symptom was my the PPMAC failing to react to my Windows front-end issuing ASCII commands like "b4r" (comms is done using my own background c-app with a TCP mechanism recreating the old GetMem/SetMem/GetResponse) As I added more code to my rticplc I saw all communications slowing down and what were once regular-frequency read/write operations taking erratic lengths of time. The IDE also became less and less responsive. For example with useralgo.rticlpc=0 the terminal would give a response to "vers" in a millisecond or two, with useralgo.rticplc=1 it would take 20, 30, 40ms. Even pressing each key would be unresponsive (I assume due to slow watch window entries which I also noticed). I have since realised the task manager was not giving useful feedback on task times making me think I was only half-loading the RTI interval but really I was filling it with servo and rti tasks. Adding a bit more code eventually caused the WDTFault to go to BGFault. It looks like background tasks are being starved. I seem to remember ASCII comms is the first thing to go in UMAC when the foreground is overloaded? I think I would like to see an error status if the system does get to a state where commands are ignored (I admit I might not be monitoring the response correctly I haven't checked).
  21. I have heard that it may be bad to not service the send commands with a running getsends process (IDE or whatever). Is this true? I have a system in the field running which will be doing a number of send commands, the IDE is not running and I have not explicitly started any getsends process. Is this a ticking timebomb which will grind to a halt? How should a project be set to run outside of the IDE?
  22. daves

    PPMAC Power?

    I found my calculations in my RTI exceeded some limit and caused the PPMAC to grind to a halt. There were not many calculations really so I tried to investigate the timings. Is the following correct or am I confusing myself? There are actually 100 lines in this example but I have shortened the code below #define _PPScriptMode_ #include "../../Include/pp_proj.h" void realtimeinterrupt_plcc() { double d; int i; d = GetCPUClock(); ADC00 = ADC00 + 1; // etc ADC99 = ADC99 + 1; pshm->P[17] = GetCPUClock() - d; } I see P17 around 10 microseconds. If I have 2.2kHz RTI I only have 500 microseconds to play with (not including other tasks). It appeared that when I got to 200 microseconds in my real code everything choked (this is only 2000 additions and assignments). Is this true? Also the task manager shows RTI calc time at 15 microseconds whatever, why is this? Thanks Dave
  23. If usrcode.c is set to compile in the project it works fine in Debug configuration but not Release. Is there some setting I am missing? It says: C:\Users\daves.ABD\AppData\Local\Temp\oambyuii.e1j\Temp\PowerPmac6.ppproj(0,0): Error : The compiler was not able to generate an executable file. Please open the following error log file for more information C:\Users\daves.ABD\Documents\PowerPmacSuite\PowerPmac6\PowerPmac6\C Language\Realtime Routines\\err.log C:\Users\daves.ABD\Documents\PowerPmacSuite\PowerPmac6\PowerPmac6\C Language\Realtime Routines\\msg.log err.log is empty. msg.log contains: /usr/local/bin/powerpc-405-linux-gnu-g++ -mhard-float -funsigned-char -I/opt/eldk-4.2/debian_rootfs/opt/ppmac/rtpmac -I/opt/eldk-4.2/debian_rootfs/opt/ppmac/libppmac -I/opt/eldk-4.2/debian_rootfs/usr/local/xenomai/include -I/opt/eldk-4.2/debian_rootfs/usr/local/xenomai/include/posix -D_GNU_SOURCE -D_REENTRANT -D__XENO__ -O2 -Wall -c usrcode.c /usr/local/bin/powerpc-405-linux-gnu-gcc -mhard-float -funsigned-char -I/opt/eldk-4.2/debian_rootfs/opt/ppmac/rtpmac -I/opt/eldk-4.2/debian_rootfs/opt/ppmac/libppmac -I/opt/eldk-4.2/debian_rootfs/usr/local/xenomai/include -I/opt/eldk-4.2/debian_rootfs/usr/local/xenomai/include/posix -D_GNU_SOURCE -D_REENTRANT -D__XENO__ -O2 -Wall -c usrcode.c /usr/local/bin/powerpc-405-linux-gnu-gcc -o ../../Bin/Release/usralgo.so usrcode.o -shared -lpthread_rt -lrt -L../../Bin/Release/ -L/opt/eldk-4.2/debian_rootfs/usr/local/xenomai/lib -lppmac -L/usr/local/dtlibs/libppmac -Wl,-rpath,/var/ftp/usrflash/Project/C\ Language/Libraries -Wl,-rpath,/var/ftp/usrflash/Project/Bin/Release I see this is similar to http://forums.deltatau.com/showthread.php?tid=1539 but mine doesn't compile at all. 1.6 release versions
  24. Now I've found a 1.5.8.0 card that doesn't work. What are my steps for debugging this?
×
×
  • Create New...