Jump to content
OMRON Forums

jmitchelloptomec.com

Members
  • Posts

    3
  • Joined

  • Last visited

Everything posted by jmitchelloptomec.com

  1. Thanks for the reply. I emailed support and Mr. Milici sent me a pdf with a snippet of a Handwheel routine.
  2. Can anyone give suggestions, tips, or tricks for using an MPG wheel input as a separate encoder? My current MPG.plc is basically a variable jog command that accounts for click direction and accumulated clicks since the last scan.....basically a carry over from PMAC PCI. My routine works great for singlets and steady clicks: So if I turn one click on my MPG wheel and my increment is set to 0.001, the routine sends a jog 1=* command and it moves 0.001.....that works in both directions and quick change of direction no problem. Problem: Starting with the axes at 0.000 with my MPG increment set to 0.001: If I'm clicking slow and whip to say 10 clicks I would expect the axis to move to 0.010 but sometimes it will move to 0.013, next time the same scenario may yield 0.017, etc.... With this being said, I have zero issues with commanded moves. Is there a better way to MPG rather than using a jog command based on clicks? I can't find many examples in the manuals or exactly what I'm looking for on the forum. I feel that there must be an easier way with PowerPMAC. If anyone is truly interested, I can post a snippet of my routine. Thank you for any insight.
  3. Here is a snippet for X axis in my Home.plc I understand the concept about calling Timers in a subroutine via creating a subroutine in the Libraries folder, but I would like to keep the execution as local as possible to the plc. The variable I'm most concerned with is AXIS1_DWELL_TIME. Any insight or constructive criticism to optimize or clean up this routine would be appreciated. I've included the snippet in a file as well because of the formatting within this thread window. /********************** AXIS 1 **********************/ // WATCH FOR MOTOR #1 HOME COMMAND if ((AXIS1_HOME_STATE == 0 && M1_HOME_INPROGRESS == 1) && (AXIS1_HOME_POS != 0)){ AXIS1_HOME_STATE=1; } // WAIT FOR AXIS TO BE AT HOME OFFSET POS if (AXIS1_HOME_STATE == 1 && abs(M1_ACTUAL_VELOCITY) < 1000 && M1_IN_POS == 1 && M1_HOME_COMPLETE == 1){ if (AXIS1_TIMER_STARTED==0){ AXIS1_DWELL_TIME = (200 * 8388608)/Sys.ServoPeriod; TIMER5_START = Sys.ServoCount; AXIS1_TIMER_STARTED = 1; } TIMER5_ELAPSED = Sys.ServoCount - TIMER5_START; AXIS1_HOME_OFF_COMPARE = abs(M1_COUNTER_POS - M1_HOME_POS) - abs(M1_HOMEOFFSET/16); if (AXIS1_TIMER_STARTED == 1 && TIMER5_ELAPSED > AXIS1_DWELL_TIME && abs(AXIS1_HOME_OFF_COMPARE) < AXIS1_AT_HOME_BANDWIDTH){ AXIS1_TIMER_STARTED = 0; AXIS1_HOME_COMPLETE = 0; AXIS1_HOME_STATE = 2; } } close P3Home.txt
×
×
  • Create New...