Jump to content
OMRON Forums

JeffB

Members
  • Posts

    60
  • Joined

  • Last visited

Everything posted by JeffB

  1. I figured the reason was something like that; unless I missed something, it sounds like it's time for a manual update. So I assume the preferred method of calling ecattypedsdo from a motion program would be to call a non blocking plc routine and wait until plc routine was done by looking at when Plc[x].Active and/or Plc[x].Running equals false.
  2. Calling from a motion program when it fails; calling directly from plc routine when succeeds. And I'm sure the subprogram ran because it changes the value from 0 to nan. I will experiment some more.
  3. Any reason why a SDO read ecattypedsdo(0,0,1,$603F,0,0,4) return nan in a subprogram but works in the terminal?
  4. I thought it was more like a PC running a normal priority thread which would be very quick. Are the plc routines compiled to assembly when executed or are they interpreted during execution? I remember reading something about higher priority plc routines in one of the manuals. Would that be useful? I will measure the time between execution using your suggestion, which would be useful to know. Since all the triggers will be in the same while loop, it seems I should look at the time between loop iterations. Also, I will try the plot utility. I assume that uses some special mechanism that allows it to run faster. Thanks
  5. From the Power PMAC User manual: "When this is done, the communications application will check command lines against the automatically generated “symbol table” for variable names and substitute the underlying numbered variable name. This process is invisible to the user. It does add some computational overhead to communications, but in most applications, this is not noticeable." Is there a way to access the symbol table? Jeff
  6. Seems not. I know the system is basically working because I can see the output in the scope. In one motor scan there should be 200+ trigger signals sent out from BEQU1. But with my code I only see 3 changes and 2 rising edges. The pulse width is 0.4ms so it's conceivable that we're missing the triggers but given that I measure 400,000 Hz (0.0025ms) for the program loop, that shouldn't be happening. Also, my understanding is that Gate1[4].Chan[3].Equ measures the logical output. Is there another variable that measures the actual output? OPEN PLC TestTrigger local currentValue local lastValue local start_time_sec start_time_sec = Sys.RunTime //debug5 = 0 while (Motor[6].DesVelZero == FALSE) { ﹒﹒currentValue = Gate1[4].Chan[3].Equ ﹒﹒if (currentValue != lastValue) ﹒﹒{ ﹒﹒﹒﹒debug6++ ﹒﹒﹒﹒debug7 = currentValue ﹒﹒﹒﹒if (currentValue == 1) //only count rising edge ﹒﹒﹒﹒﹒﹒debug5++ ﹒﹒﹒﹒lastValue = currentValue ﹒﹒} } monitor_frequency_Hz = 1.0/(Sys.RunTime-start_time_sec) CLOSE
  7. I'm using the position compare for the 4th axis of the ACC24E2A. It works ok, and I see the expected result on the scope. But I would also like to monitor in the PMAC. is Gate1[4].Chan[3].Equ the correct channel to monitor? Thanks
  8. Thanks Curt, Eric It looks like EtherCAT is correctly configured: ﹒﹒Motor[1].pAmpFault ﹒﹒Motor[1].pAmpFault=ECAT[0].IO[4096].Data.a ﹒﹒Motor[2].pAmpFault ﹒﹒Motor[2].pAmpFault=ECAT[0].IO[4098].Data.a ﹒﹒Motor[3].pAmpFault ﹒﹒Motor[3].pAmpFault=ECAT[0].IO[4100].Data.a So I wrote a plc routine to monitor. from configuration.pmh ﹒﹒Motor[3].pAuxFault = Sys.Udata[0].a ﹒﹒Motor[3].AuxFaultBit = 0 ﹒﹒Motor[3].AuxFaultLevel = 1 ﹒﹒Motor[3].AuxFaultLimit = 1 // PLC Motor Monitor //check for alarm on Yaskawa amplifier #define ECAT_NETWORK 0 #define J3_AXIS_INDEX 2 #define SDO_READ 1 //Service Dictionary Object #define YASKAWA_ALARM_ADDRESS $603F #define YASKAWA_OVERHEAT_ALARM $860 OPEN PLC MotorMonitor local time_sec = 0.0; local alarm //if motors from coordinate system 1 are moving if (Coord[1].DesVelZero != TRUE) { ﹒﹒if (time_sec < Sys.RunTime) ﹒﹒{ ﹒﹒﹒﹒time_sec = Sys.RunTime + 0.010//10ms ﹒﹒﹒﹒alarm = ecattypedsdo(ECAT_NETWORK,J3_AXIS_INDEX,SDO_READ,YASKAWA_ALARM_ADDRESS,0,0,4) ﹒﹒﹒﹒if (alarm == YASKAWA_OVERHEAT_ALARM) ﹒﹒﹒﹒﹒﹒Sys.Udata[0] |= $1 ﹒﹒﹒﹒else ﹒﹒﹒﹒﹒﹒Sys.Udata[0] &= ~$1 ﹒﹒} } CLOSE
  9. I'm using an EtherCAT Yaskawa amplifier. Because of some hardware issues, the encoder occasionally heats up and the amplifier has an alarm. At this point the control of the coordinate system goes awry, with the other axes seemingly continuing motion. I think this is because there's seemingly no error on the PMAC side. I can read the error debug1 = ecattypedsdo(0,2,1,$603F,0,0,4) debug1 P8208=2144 //0x860 = overheat but I saw some document not to put this in a loop, presumably because it is slow. I could make a loop that only read it every 10ms. Is there any standard way to handle this? And to stop can I just issue a Motor[3].InterlockStop? Thanks
  10. I had loaded the mappings, just not in that order. Seems something was wrong with that project as even after successful EtherCAT activation I couldn't move the motors but creating a new project could work. Doing a diff with the saved configuration files didn't show any important differences... Has anyone made a utility to export every setting? It'd be easy to export all P, Q, M, I, variables to a text file, but time consuming to map those to the data structures. And of course many variables don't relate to settings. The bottom line is there needs to be some way to compare one project to another to make sure they are identical.
  11. In the process of setting up a motor the IDE recommends updating the firmware. But on file depot the latest firmware version is from 2018, 2.4.1.2. From the vers command, my current firmware version is 2.5.1.2. Where can I find the latest firmware?
  12. I sent an email last week Sunday but nary a response all last week. In talking with some other PMAC users I arrived at this solution: reset *** Scan EtherCAT network Load mapping to PowerPMAC Build & Download Activate EtherCAT I had tried all of these before but not in this exact sequence. Maybe the key is loading the mapping?
  13. You're correct, thanks! The purple wire was on the wrong connector...
  14. I'm trying to put a breakpoint in my PLC script. It seems to work, but when the breakpoint is reached I see a window saying the application is in break mode but "Your app has entered a break state, but no code is currently executing that is supported by the selected debug engine (e.g. only native runtime code is executing). Is there somewhere I can select script only debugging? Thanks
  15. For both the turbo and power PMAC we are using the 4 axis board ACC-24E2A. For the Turbo PMAC we used the M415->X:$78218,19,1;232 as a digital input. From the Power PMAC Software Reference Manual p1556 it looks like this should be Gate1[4].Chan[3].UserFlag. The gate and channel selection seems ok because I can control the Gate1[4].Chan[3].Dac[1] output from the PMAC. Normally I read a 1 for Gate1[4].Chan[3].UserFlag (as expected). When I apply 24 volts to USER4 as in the yellow wire in the photo, I expect to read a 0, but the watch window still shows a 1. It works for the turbo PMAC but not the power PMAC. Is there some mode or configuration I have to change for this to work? If it matters, the Gate1[4].Chan[3].UserFlag's address is $c76000e0 (M8243) Thanks
  16. Now this error is gone but I get: 3/20/2020 4:10:28 PM Master0 EtherCAT Invalid state (0x9811000E) Any idea what the root cause is? I tried comparing all the system and ethercat settings with a working system and couldn't see any difference. after I perform ecat reset I can go into diagnosis mode. Everything seems fine in diagnosis mode. But after I leave dianosis mode to go to configuration mode I get the invalide state error. and then I can't go into diagnosis mode without a doing another ecat reset.
  17. Sorry, but next stupid question: where is the Network menu? I get this network mismatch analyzer message when I try to go to Diagnosis dialog. I tried searching the IDE manual for analyzer and didn't see any reference. Thanks again
  18. I'm trying to setup a new system; I copied the PMAC Workspace from the old system. When trying to activate the EtherCAT I get a network mismatch error and it tells me to run the network mismatch analyzer. Where can I find this utility? Thanks
  19. I'm using some motors via a Yaskawa ethercat amplifier in position mode. I would like to read the velocity and torque. When I read the velocity by the chart program the values look reasonable but when I log the Motor[0].ActVel in an array the numbers are mostly 0. I also log the position (ActPos) and time (Sys.RunTime) so I can calculate a decent velocity value using (Δp/Δt) but I don't understand why the ActVel doesn't show correctly and why it seemingly does show correctly in the chart (I exported the chart data). Also my calculation has some ripple that I'm not sure is real or is a product the times not being in perfect sync with the position reads. For torque I can see the IqMeas doesn't change; the IqCmd does. But I think I should be reading this from the Ethercat amplifier directly (ECAT[0]…) but not sure what variable to type. Thanks
  20. Our names tend to be things like scan_distance_mm and we may query 20 at a time so I thought less text being communicated would be more efficient. Also if variables happened to be consecutive I could use the PXXX..PYYY syntax. And I assume on the PMAC side if I send a name there has to be some kind of lookup hash table to find the memory address whereas the memory address can presumably be calculated directly from the P-variable I remember there's an "echo7" command sent at the beginning of our gpascii run. Maybe I can toggle that to see the P variables. Thanks
  21. Is there anyway to programmatically lookup a variable's assigned p#? I don't want to hard code the P# in the program because it may change as variables are added. But for some frequently read variables I'm thinking reading a p variable may be more efficient so at the app startup I would like to lookup the p variable from the variable name and use that for the duration of the program.
  22. Can you please update the link? thanks
  23. Thanks to some tips here I have a dll that can communicate with the PMAC over ssh. Things generally work but occasionally fail. So I wrote a test program to do 10,000 individual variable reads. I turned on echo 7 so normally when I do a read I pass a variable name, say "scan_distance_mm/n" and it will return "scan_distance/r/n/123.4/r/n/6/r/n" so I use '/6/r/b' as the terminator and keep reading until I see that (or timeout). Sometimes I will just see the value "123.4/r/n/6/r/n" instead of the echoed command. Sometimes I will just see the terminator. One theory is that when the PMAC is busy it may not reply correctly. So my plan is to add up to 3 automatic retries, each with a 1ms sleep. But I would like to know that the behavior I'm seeing is expected not some kind of bug in my code or a physical connection issue.
  24. Ahh, I was using 2e19. Got it; thanks;
  25. JeffB

    PTR to AI

    For the ACC65E board I can define a pointer to a digital input channel by: PTR Input6->ACC65E[0].DataReg[0].5.1; How to set up a pointer for a AI channel on the ACC59E3 board? Can I set it to be 0-10V (unipolar)? Similarly, how to declare a pointer to a limit switch for the 24E2A? Thanks
×
×
  • Create New...