News:

  • June 09, 2026, 02:47:30 AM

Login with username, password and session length

Author Topic: Can I prevent negative numbers for a bi-directional turntable  (Read 69377 times)

estoffey

  • Newbie
  • *
  • Posts: 2
Can I prevent negative numbers for a bi-directional turntable
« on: October 30, 2007, 11:55:29 PM »
I have a WinPLC/CTRIO project that has a rotating turntable with an attached quad counter. When first implemented, the turntable always turned one direction, using the encoder counts to determine indexing, everything worked great. Now, the turntable is required to turn in either direction. When turning in the "other" direction, the counter goes below zero. I this situation, when the zero pulse is received from the encoder, can the counter be reloaded with 4000 so it can count down again, but still reset to zero in the other direction?

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6158
  • Yes Pinky, Do-more will control the world!
Re: Can I prevent negative numbers for a bi-directional turntable
« Reply #1 on: October 31, 2007, 12:26:50 AM »
Well, the short answer is 'no'.

I can think of some possible workarounds, but not sure what your control engine is or what kind of flexibility you have in programming. Can you give a little more detail about the app?
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

estoffey

  • Newbie
  • *
  • Posts: 2
Re: Can I prevent negative numbers for a bi-directional turntable
« Reply #2 on: October 31, 2007, 10:34:26 AM »
It is a WinPLC/Think and Do project. The encoder has 1000 cpr multiplied by 4 by the CTRIO. Therefore 1 revolution of my turntable gives me a count of 4000. The zero pulse from the encoder resets the count to zero once per revolution. This works great in one direction only. I am indexing, slowing, and stopping the turntable, with a VFD, all in software. One option is to copy the count and test it for negative before I use it and if it is negative to add(because it is neg) it to 4000 to convert it to the positive number I need.
  The CTRIO has motion control capabilities, could I use these features to get around this problem?

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6158
  • Yes Pinky, Do-more will control the world!
Re: Can I prevent negative numbers for a bi-directional turntable
« Reply #3 on: October 31, 2007, 02:24:37 PM »
The CTRIO's motion capability is very lightweight, and is oriented heavily toward steppers. Not sure how well that would play with your VFD.

One possible workaround would be to wire the encoder to the other quad input...but wire it backwards...which would produce positive counts when counter-clockwise. That doesn't sound any easier than doing the math though. Might just be best to do the math...
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO