Jump to content
OMRON Forums

mshaver

Members
  • Posts

    56
  • Joined

  • Last visited

Everything posted by mshaver

  1. I've read that Motion Programs are not owned by any one coordinate system and that multiple coordinate systems can access the same program simultaneously. (Sounds analogous to a class module in object oriented languages) I have to execute the exact same logic for four different motors in 4 different coordinate systems. I'd like to use a single motion program and just "tell" the program which axis of which system is to execute but I don't see how this is possible. In a motion program, don't I have to use an explicit axis name for a motion command? IE; X(expression). So right now, I have 4 separate motion programs that are identical except for the axis letter in the motion commands. IE; one program has a series of move commands that look like X(expression), another program is identical except for the use of Y(expression), and another is identical except for the use of Z(expression), and so on. If I make changes, I have to change 4 programs. How do I get around this and have a single motion program that can operate on either X, Y, Z, etc., based on a parameter passed to the program when executed?
  2. I assume the first line should go in global definitions ptr PosScaler(5)->*; Where should the remaining pointer definitions go? In global definitions or in a plc? PosScaler(1)->Motor[1].CoordSf[6]; PosScaler(2)->Motor[2].CoordSf[7]; PosScaler(3)->Motor[3].CoordSf[8]; PosScaler(4)->Motor[4].CoordSf[0]; What's happening is the first line, PosScaler(1)->Motor[1].CoordSf[6]; ends up underlined in red and the build fails. However, if I fiddle with it long enough, such as removing the bottom two lines and then putting them back, eventually I can get the red underline to go away and then the build succeeds. Additionally, if I place any 3 of the above 4 lines in either global definitions or a PLC, the IDE accepts it. As soon as I add the 4th definition the IDE chokes and underlines the first definition in red and the build fails. The IDE is extremely buggy, finicky, unrepeatable, unpredictable, and I have no idea whether something is really going to work or fail.
  3. I started a thread a while back having to do with redirecting pointers programmatically and cited an example from the power point training slides. In global definitions; M100->Sys.Fdata[L10]; I said this throws an error. Delta Tau insiders said this would download. I finally got back around to this. This will not compile or download. I have IDE version 1.6.0.109. ???
  4. So when I place the following in global definitions; ptr PosScaler(1)->Motor[1].CoordSf[6]; ptr PosScaler(2)->Motor[2].CoordSf[7]; ptr PosScaler(3)->Motor[3].CoordSf[8]; ptr PosScaler(4)->Motor[4].CoordSf[0]; The right side is underlined in red with a message "syntax error, unexpected IDENTIFIER, EXPECTING '*', or ..." etc.etc. Tried to compile. Will not compile. Yields same error message as directly above. IDE = 1.6.0.109 ???
  5. Is there a way to accomplish the following? I want to end up with an array of pointers defined as follows: ptr PosScaler(1)->Motor[1].CoordSf[6]; ptr PosScaler(2)->Motor[2].CoordSf[7]; ptr PosScaler(3)->Motor[3].CoordSf[8]; ptr PosScaler(4)->Motor[4].CoordSf[0]; ptr PosOffset(1)->Motor[1].CoordSf[32]; ptr PosOffset(2)->Motor[2].CoordSf[32]; ptr PosOffset(3)->Motor[3].CoordSf[32]; ptr PosOffset(4)->Motor[4].CoordSf[32]; And I want to be able to refer to the pointers in motion programs and PLC's using a local variable as an index, generally like the following: {expression1} = {expression2} * PosScaler(myIndex) + {expression3} * PosOffset(myIndex) Can I accomplish this or something functionally equivalent?
  6. If Motor[3] brake is connected to the output represented by ACC65E[0].DataReg[3].0.1; (first output on the ACC65E), do I assign Motor[3].pBrakeOut = Acc65E[0].DataReg[3].a ? And then do I assign Motor[3].BrakeOutBit = 0 ? How do people typically decide on appropriate values for .BrakeOffDelay and .BrakeOnDelay? MShaver
  7. If I place M100->Sys.Fdata[L10]; in global definitions.pmh, the IDE underlines L10, and if I hover over the red underline, I get the following message; "syntax error, unexpected PMAC_LVARIABLE, expecting NUMBER or IDENTIFIER" I've not tried to download. Not much point if the IDE isn't happy. Is this firmware dependent? IDE is 1.0.6.109.
  8. Can I change what a pointer points to on the fly in a script program? For example, I have some code that is manipulating status bits in a series of 32 bit shared memory words that a client computer will read. It would be great if I could change what some pointers point to on the fly so I could easily index through the various status words. Couldn't figure out how to change what they point to on the fly. For example, in global declarations, I have the following: M4000->u.user:$0; //Used by GetAxisStatus(0), ALL Motors M4001->u.user:$4; //Will contain status for Motor 1 M4002->u.user:$8; //Will contain status for Motor 2 Etc.Etc. and; ptr mBit0->u.user:$14.0.1; ptr mBit1->u.user:$14.1.1; Etc, etc. And I would have liked to re-aim the pointers programmatically. The power point training on Shared Memory says I can do the following; M100->Sys.Fdata[L10] which would imply I can change the pointer. PPMAC IDE would not accept this code anywhere. No program would accept the pointer declaration. Global declarations will not accept the L10. Must be missing something. MShaver mshaver@pekoprecision.com
  9. I think, like C, "#define myvariable P100" does not actually define a pointer and does not create a variable that an external device can access. It's just a text substitution at compile time. IE; an external device using GPASCII is not going to be able to access P100 via "myvariable". The IDE will, because it's aware of the definition, but an external device will not be able to access via this name. However, in this case, I think this fills the bill because my customer wants to access these variables via their Pnnnn definitions and it lets me program using the #define name. Thanks;
  10. I did as kmonroe suggested, implementing a watchdog routine in a free-running PLC that ends up detecting the aborted motion program in question and setting an error code to failure since the motion program cannot. Then later, unrelated to my original issue, I discovered by accident that a PLC program can also abort "silently". I had a PLC program doing some initialization upon power up or reset. Noticed that certain variables were never getting initialized. Realized that the PLC program was aborting partway through due to some obscure syntax error that I don't think the compiler was catching or maybe the compiler was aborting and just not compiling the rest of the plc program. I'm used to industrial controllers having a form of exception handling whereby instead of quietly aborting, such errors will cause the execution to jump to a designated error handling routine whereby one can implement whatever form of error handling one wants or needs. Does the PPMAC have such exception handling capability?
  11. I'm developing an application for a client. Client has a legacy Windows application originally written for a PMAC and wants to use this same Windows application with the PPMAC I am developing for him. Mostly no problem. However, Windows app does most interaction through PMAC-style P-Variables which, in and of itself is no problem for the PPMAC except that I would like to use more intuitive variable names than P8101, for example. I tried to make pointers, ptr RampRate->P8101 which would allow client to write to P-variables and me to program with intuitive variable names. IDE was not at all impressed with my feeble attempt and declared hairball. Is there a way to declare pointers to P-variables? If not, I suppose I can use Define statements to accomplish the same end. I know that declared global variables are really mapped to underlying P-Variables. Is there some way for me to declare a variable and tell the IDE which underlying P-Variable to map it to? I think I remember reading that I can but I can't find the reference now. M. Shaver
  12. Try as I might, I cannot get the motion velocity and acceleration I desire in a motion program in linear move mode. There has to be something really obvious that I'm overlooking. My motor jog speed and max speed are both 200, motor Ta=50, Motor Ts=0, etc. When I run the motion program and execute the command F{data}, the feed rate does vary with the value {data} up to a point and then further increases in {data} do not increase the velocity any further. Similarly, I've tried ranges of Coord[].Ta and making it long will slow it down but making it short only increases the acceleration up to a point and then further increases in Ta have no effect. Coord[].Ts is 0 which I understand disables it. Nothing I've tried will achieve velocities and accelerations that I achieve through using rapid move mode or through simple jog commands. What am I missing? M. Shaver
  13. In a motion program, I am using a P-Variable to indicate status/progress through the program. ie; I start out with a status of 1, and then increment it as I progress through the program so that the user interface can track progress. And I have status codes for successful completion and other less successful outcomes. However, if during a move in the motion program a soft limit occurs, the program aborts without completing. So all my nice logic that I employed after the move to determine whether the program completed successfully or not and some other cleanup is never scanned if the motion program aborts due to soft limits being hit. Am I missing something? Is there something I can do to make it complete the rest of the program, basically the cleanup? The problem is, I have set the status value to 2 for program running and if it aborts, the status value is still 2, program running. Is there some way to positively detect that the program has aborted? How do others positively track the progress of a motion program through completion in order to determine whether it ran to completion or not? Thanks; M. Shaver mshaver@pekoprecision.com
  14. To DAVES: Thanks, makes much more sense now. Was obviously confused with how the DT deals with the while loops, what gets scanned what doesn't upon reentry, etc. Works great now. Was able to consolidate everything into one program now that I know and "trust" what the DT is doing in these loops. To kmonroe023: Also thanks, will give this a try. Different animal this PPMAC. Been programming every kind of platform under the sun for 40 years. At times the PPMAC makes me feel like I'm in my very first programming class all over again with that feeling of "What the ... Thanks
  15. In a PLC homing routine, I want to jog off of a home switch at the homing velocity, so I want to save the original jog speed and restore it at the end of the routine. I'm attempting to use the following code to save the original jogspeed: open plc 21 local JogSpeed; JogSpeed=Motor[1].JogSpeed; {etc. etc.} Compiler coughs hairball with the following; C:\Documents and Settings\mshaver\My Documents\PowerPmacSuite\PowerPmac3\PowerPmac2\PMAC Script Language\PLC Programs\plc21.plc(7,1) : Error : ( error #31) invalid parameter number in equation : L0=Motor[1].L0 Error: downloading preprocessed File: "/var/ftp/usrflash/Temp/pp_proj.pma" There were errors during the download process and the download process has stopped. Compile goes OK with use "of mJogSpeed", or with "L1" as my local variable. So obviously, the compiler is confusing local variable JogSpeed with the element name of the Motor[1] structure. I get it, I know how to fix it, no need to reply, unless I'm missing something, but I just must say Grrrrrrr!
  16. From an earlier post: open plc 1 L1 = sys.time + 0.01; while(L1 > sys.time) {}; p2 = p2 + 1; close // So based on the above, I wrote this as my watchdog on the homing process. // The sends are just hooks I added to see why the thing never timed out. // When this runs, I get the first four sends over and over hundreds of times without ever // stopping. Keeps running long after HomeInProgress has gone to zero. It continues to return // the same value for sys.time over and over without ever advancing. // It is simply not obtaining an updated value for sys.time. open plc 21 send 2,"Checking in plc 21" send 2,"Timer1=%d\n",Timer1 send 2,"Sys.time=%d\n",Sys.Time send 2,"HomeInProgress=%d\n",Motor[1].HomeInProgress //Wait until time out or home in progress = 0 while ((Sys.Time > Timer1) && (Motor[1].HomeInProgress==0)) {} send 2,"Proceeding in plc 21" send 2,"Timer1=%d\n",Timer1 send 2,"Sys.time=%d\n",L1 send 2,"HomeInProgress=%d\n",Motor[1].HomeInProgress if (Motor[1].HomeInProgress!=1) { if (Motor[1].HomeComplete) { send 2,"Motor 1 homed successfully" } else { send 2,"Motor 1 homing failed" } send 2,"Exiting plc 21"; disable plc 21 } if (sys.Time > Timer1) { cmd"&1A" send 2,"Motor 1 homing timed out" send 2,"Exiting plc 21"; disable plc 21 } close // So I tried the following: Same result. The first 4 sends repeat continuously long after I know 3 seconds has elapsed and long after the home in progress has gone to zero in the status window. open plc 21 send 2,"Checking in plc 21" send 2,"Timer1=%d\n",Timer1 send 2,"Sys.time=%d\n",Sys.Time send 2,"HomeInProgress=%d\n",Motor[1].HomeInProgress //Wait until time out or home in progress = 0 if ((Sys.Time > Timer1) || (Motor[1].HomeInProgress==0)) { send 2,"Proceeding in plc 21" send 2,"Timer1=%d\n",Timer1 send 2,"Sys.time=%d\n",L1 send 2,"HomeInProgress=%d\n",Motor[1].HomeInProgress if (Motor[1].HomeInProgress!=1) { if (Motor[1].HomeComplete) { send 2,"Motor 1 homed successfully" } else { send 2,"Motor 1 homing failed" } send 2,"Exiting plc 21"; disable plc 21 } if (sys.Time > Timer1) { cmd"&1A" send 2,"Motor 1 homing timed out" send 2,"Exiting plc 21"; disable plc 21 } } close
  17. I have a process (say a specialized homing routine) running in a motion program and I want to have a watchdog timer running such that if it expires before the routine is complete I cancel the process and declare a fault. I can't find anything "built in". Am I overlooking a built in method? I've read and implemented some logic I found in older posts. The examples of comparing sys.time and a value x seconds from now in a "while loop" in the same program that is the watchdog simply don't work. I built in some hooks so I could see what happens to sys.time and a done bit from the homing routine program, and neither one ever updates. The system truly is in an infinite loop and does not actually check sys.time each time it loops. I implemented an example that uses a subprogram, and this does work, but it's not even close to deterministic. Tests showed that for a 1 second timer, usually the actual time was closer to 1.5 to 2 seconds and sometimes as much as 3 to 4 seconds. Am I overlooking something more native? I'm more used to controllers that have native timer objects or OOP environments such as C#, VB.net, Java, and so on that have native timer objects. What about using the RTI for PLC 1 and using counters within PLC 1, starting, stopping, and clearing them from other programs? How deterministic might this approach be? Anyone have more elegant solutions? Thanks; MShaver mshaver@pekoprecision.com
  18. There is a post from 2009 on this topic: http://forums.deltatau.com/showthread.php?tid=98&highlight=resistor+packshttp:// that apparently was never answered by the Delta Tau Insiders. The following excerpt from the Acc-24E2 user manual is very ambiguous and confusing. "The 4.7K resistor packs used will allow 12-24V flag inputs. If 0-5V flags are used, then a 1KΩ resistor pack (RP) can be placed in either RP45 or RP46 (refer to the Resistor Pack Configuration section of this manual). If these resistor packs are not added, all flags (±Limits, Home, User, and amplifier fault) will be referenced from 0-5V." This same text has existed in the Acc-24E2 manuals since at least 2000. Delta Tau Guys. I can't find an update or clarification of this on line. Doncha think 5 years is a long time to go without clarifying the original post? Please provide a clear concise explanation of how to set these resistor packs for either 5 volts or 12 to 24 volt operation.
  19. Thanks, this was very helpful and informative. M. Shaver
  20. OK, I should have asked the question differently. I know that I can write to these variables using the IDE as a terminal just as I can from a Telnet session. I'm asking a different question. I can set up motors, coord systems, etc., in the IDE by clicking on Delta Tau > Configure > Setup Variables. I'm asking if there is a similar utility for setting values for the sundry Gate1.Chan[j].{ElementName} items from the IDE and then downloading them? Is this what system setup does?
  21. Let me ask a few more specific questions. I am using Parker stepper drives. The Parker drives take care of microstepping, ie; I can set the Parker drives to take the step pulses from the DT and turn them into various fractional microsteps. There are no encoders on the stepper motors. However, the motors drive linear stages and the linear stages have linear encoders that I will be bringing back to the Delta Tau as the outer loop position feedback. I will not be using current feedback of any type. Based on this, do I need to do anything at all with regard to phasing in the delta tau? I view phasing as coming into play if I want the DT to do commutation, current feedback, or to create the microstepping, which, in this case, will be done by the Parker drives. Based on this, what else can the PPMAC bring to the party with regard to phasing?
  22. There is a great example of a stepper setup using ACC24E3 located at http://forums.deltatau.com/showthread.php?tid=768&highlight=pulse+and+direction+example Can anyone provide a similar example of a stepper setup using Acc24E2A? Would be much appreciated. M. Shaver mshaver@pekoprecision.com
  23. Can I set the value of Gate1.Chan[j].{ElementName} from the IDE? Or just from programs?
  24. Using Delta Tau > Configure > Setup Variables, no matter what I set the value of "Motor[1].pEncLoss" to, when I save it and then reopen it, it comes back as "EncTable[0].a". Matter of fact, all .pEncLoss values for all motors in this table are set to "EncTable[0].a". Furthermore, if I open the saved configuration file, there are no entries for Motor[x].pEncLoss for any motors. This doesn't seem good. M. Shaver mshaver@pekoprecision.com
×
×
  • Create New...