Jump to content
OMRON Forums

steveneads

Members
  • Posts

    107
  • Joined

  • Last visited

Everything posted by steveneads

  1. Hi Curt / Dro Thanks for looking into this. We have done some more investigation here and have found the root cause of my results. It looks like I was being fooled by some sort of compiler optimization which meant that for some of the function tests, the calculation wasn't really being repeated the number of times that I thought is was. However, we have noticed that using the rticplc seems to be significantly slower than using a C from script call from PLC 0 for the same function test. It's particularly bad for sqrt. Is this what you would expect? Thanks
  2. My application is gradually growing the PPMAC processor loading, and so I'm always trying to ensure that I write my code as efficiently as I can. I use a significant amount of trig function calculations and I want to have some guidance on what methods are most efficient. My code is running in C from script from PLC 0. I used this to do some timing tests evaluating some functions 1000 times. This yielded the following approximate times (microsecs) on a 465 PPMAC: atan2(x,y): 97 atan: 0.12 sqrt(1 + x*x): 57 1/x: 0.1 cos: 0.12 acos: 57 I was staggered to see the differences between atan2 and atan in particular and was also surprised by some of the other differences. I'm almost doubting my own results. Can DeltaTau shed any light on why atan2 and atan are so different in efficiency, and what functions are very costly / efficient? I remember some notes being provided on this years ago with the original PMACs!
  3. Thank you - I've made it work using "floor" with some logic to adjust the result for negative inputs (as I wanted to round towards zero). Is there an easy way to find a list of C functions that are and are not supported in the Kernel C code?
  4. I am trying to use it in C code that is included with usrcode.c
  5. What is the best way to do the equivalent of "trunc" in code that runs in the kernel?
  6. Hi, I have found a problem when downloading a motion program. PPMAC vers 2.3.2.5 and IDE 3.1.4.0. I have a "sub" program which is called from a "subprog". The structure of the sub program is like this: ------------------------------------------------------------------- sub: DoCalcs(void) local var //some code here if (error) { //some code return; } var = a + b; //some code using "var" return; ------------------------------------------------------------------------ This code does not download because the local variable "var" is not recognised as an L variable. If I move the local declaration after the return that's inside the if loop, it will download. It seems that the sub doesn't get its end point right. If I make a similar code structure in the higher level "subprog", it downloads perfectly ok - so it only seems to be a problem in the lower level "sub" program. Steve
  7. Searching this issue on the web, I found the comment "Most systems, including x86 GNU/Linux and Microsoft Windows, use signed char, but those based on PowerPC and ARM processors typically use unsigned char." This presumably explains the behaviour I saw since the 485 is a PowerPC chip. Am I right in thinking there is an Omron "Delta Tau" product on the way that uses an x86 processor? If so, it seems that we will need to watch code portability here.
  8. Hi I have come across a problem in C code that's called as C from script from a motion program, which has surprised me (probably not difficult)! My C function had a variable declared like this: char initialCubicTrue = 0; In the code the value of initialCubicTrue is set to a positive or negative value to control logic in the code. I found that the logic didn't work when the value was -3 (for instance) and I'm guessing that it didn't work for any negative number. The problem was resolved when I changed the variable declaration to: signed char initialCubicTrue = 0; My understanding of the C complier used is that it would default to treating char as signed - but in this case it seems not. (I am using a 465 card running 2.3.2.5 firmware). Can you let me know if there are any other similar things to beware of? Steve
  9. Yes to the first question - and no to the next.
  10. Running as administrator seems to fix the watch window issue, but it makes no difference to the screen size and position being lost or to the inability of the intillisense to recognise global variables. I am using Windows 7 - does this have any bearing on this all?
  11. Just to clarify this, the IDE version is 3.1.1.0, and I'm closing it down using the X in the top right of the screen. It isn't a crash. Another issue is that the intellisense only seems to work for pointers and locals - it doesn't spot global vars. It worked on the older IDE. Is something not configured correctly on my system?
  12. Hi I've just migrated to this new version of the IDE and noticed that it doesn't seem to store changes that I've made to the contents of the watch window after I've shut the IDE down. The changes are lost when I restart and the watch window is reverted to its original state. Is there something that I need to do to save these - or is it a bug? Another annoyance is that the IDE does not remember its position and size after closing down. I use it spread across 2 screens but it always starts up filling just one screen. The earlier IDE was fine on both of these counts. Thanks
  13. Hi Brad I'm still getting this fault - but it doesn't happen all the time. I have just had it again after being very careful to make sure that nothing I could think of was running. Firstly I set UserAlgo.CFunc=0, then using the task manager I made sure that all PLCs and C applications were stopped. I then did a build and download which generated the segmentation error (attached). Finally I checked that UserAlgo.CFunc was still zero and that nothing was running. This was the case. What can be generating the error? It seems to me that there's a problem in the download process. Is it because we have a large project? It seems that our problems have recently appeared with a sizeable amount of C application code being added. We need some help here! Steve download error 2.txt
  14. Hi Brad Currently my pp_startup.txt contains: UserAlgo.CFunc=1; enable plc 1; I will try removing UserAlgo.CFunc=1 from pp_startup.txt, adding a 2 second delay at the start of PLC 1 and then set UserAlgo.CFunc=1 in this plc, to delay these actions. Is this what you had in mind? I'll see whether this helps. Steve
  15. Hi I've recently started to experience code down-loading failing with the message "Download process failed with a segmentation fault" (465 board). I have now updated to IDE version 2.2.1.25 (PPMAC firmware is 2.1.1.3), but the problem persists. If I repeat the download it's often OK the second time. What's going wrong? Another colleague is also having the same problem. I've attached a copy of the messages given by the IDE during compiling and downloading. Thanks Steve download error.txt
  16. Could someone from Delta Tau please confirm this? Thanks
  17. Hi I have a CfromScript call from a motion program as below: null = CfromScript(PFsetSafety,0,tst_indx(look_ahead),0,0,0,0); This seems to work as I expect, but I've noticed that the manual states: "The calling program must pass to CfromScript() all seven arguments of type double, even if CfromScript() does not use all of the arguments internally. If CfromScript() does not use one of the arguments, it is recommended just to pass a zero to CfromScript() for that argument. All general-purpose user variables in Power PMAC (P, Q, L, R, C, D) are of type double. Some data structure elements are of type double, but the value in an element of a different type can be converted to double simply by copying the value into a general-purpose variable." My variable "tst_indx(look_ahead)" is part of a 16 bit integer M variable array stored in user shared memory. Is this OK even though it's not a double, or could I get unexpected problems? - as I said, it seems to work. Thanks Steve
  18. Thanks for your explanation. I know it's a typo, but 1 /7.366 = 0.135755 !
  19. Hi I'm trying to use the filter generator to generate the coefficient for a 1st order low pass filter. My servo frequency is 4kHz and the initial proportional gain is 1, and I've chosen a corner frequency of 200Hz. The filter generator calculates kd1 = -0.728489 and proposes a new gain of 0.13575 (see attached screen grab). I don't understand how the calculator arrives at this proposed gain value! The reference manual states: "Note that the “DC gain” of this filter is equal to 1 divided by the sum of 1 plus all of the coefficients used, and this gain is part of the overall servo-loop gain" - and this comment seems correct to me. This implies that the gain of the filter is 1/(1-0.728489) = 3.6831. I would therefore assume that the proposed gain should be 1/3.6831 = 0.2715, to compensate for the filter. This is a factor of 2 different from the value proposed by the generator. Can you explain this please? Thanks.
  20. I tried increasing the timeout x3 - but it made no difference to the reset failed problem.
  21. Hi Steve Back in October last year you replied by direct email to me that "A reset of your system requires up to one and a half minutes before responding. The timeout of the IDE is currently hardcoded at 10 seconds so it incorrectly replies that the reset failed. The software group is looking into what can be done to correct this. This may not be a simple fix." Has your software group resolved this yet? It's been 4 months now. (I think that your timeout is actually 60 seconds not 10). On a related subject, it does seem to be a real pain that the 465 card is so painfully slow at compiling and resetting in comparison with the old 460 card - I must now have accumulated days of wasted time waiting for compiling etc.! Thanks Steve
  22. It was sent to you last Thursday. Does your system filter out emails with zip file attachments?
  23. Hi Steve You should have received the project by email - did you manage to reproduce the problem?
  24. Firmware is 2.1.1.3 There is no problem with a factory reset. This presumably because there's no project! It seems to be a problem with a project taking a long time to load. We are using encryption. There are quite a lot of files.
  25. Hello I've just installed IDE version 2.2.0.39 and am rather disappointed to find that this issue has not been fixed. I still get the message "PowerPMAC reset failed" after a reset. The reset hasn't failed it has just not finished yet. The really annoying thing is that the IDE no longer works properly after this - error messages in the watch window etc. and to fix this you have to shut down the IDE and restart it again. This just wastes a lot of time. Surely this must be a trivial fix!
×
×
  • Create New...