News:

  • June 09, 2026, 12:22:19 PM

Login with username, password and session length

Author Topic: Compare Encoder Position with Actual Position  (Read 13443 times)

mikep

  • Jr. Member
  • **
  • Posts: 17
Compare Encoder Position with Actual Position
« on: December 23, 2008, 07:21:18 AM »
I have a DL06 PLC,HO-CTRIO Counter Module,STP-DRV-4035 Stepper Driver,TRDSH 100BD Encoder, and a Stepper I already had.
I have a program that uses Dynamic Positioning.
I can enter a Position and it moves both positive as well as negative depending on Parameter 3.
Since the encoder is not used with the CTRLDPR I Box, I am trying to compare the encoder position with the actual position.
I know the encoder is V2000 but I can't find what variable is the CURRENT POSITION .
Does anyone know what variable stores the CURRENT POSITION ?

Thank You,
MikeP

Greg

  • HostTech
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 702
  • Hmmm...
    • Host Engineering, Inc.
Re: Compare Encoder Position with Actual Position
« Reply #1 on: January 05, 2009, 03:12:18 PM »
Current Position is remembered by the CTRIO itself. In other words, it knows how many pulses have been sent out. The encoder you have (provided it is a quadrature type) is giving you current position. If you want to read current position from the CTRIO itself you will have to use a System Function to do this. And even then, you will have to do some math because depending on whether you have the output configured for Pulse (Step/Direction) or Pulse (CW/CCW), will determine how you figure out what the CTRIO already knows. (See above posts).

But, again, if you have provided an encoder attached to the motor you are controlling and are reading what the encoder is giving you (and that encoder is quadrature), then the reading you are seeing in V2000-2001 is the current position.
There are two types of people in the world; those that can extrapolate from incomplete data sets.