Host Engineering Forum
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
May 23, 2012, 09:18:41 am


Login with username, password and session length


Pages: [1]
  Print  
Author Topic: Can I prevent negative numbers for a bi-directional turntable  (Read 1424 times)
estoffey
Newbie
*
Posts: 2


« 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?
Logged
BobO
Host Moderator
*****
Posts: 1149


Yes Pinky, we *are* going to control the world!


« 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?
Logged

BobO

The Constitution does not guarantee us freedom from being offended...but we can choose not to be, and life gets so much easier.
estoffey
Newbie
*
Posts: 2


« 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?
Logged
BobO
Host Moderator
*****
Posts: 1149


Yes Pinky, we *are* going to control the world!


« 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...
Logged

BobO

The Constitution does not guarantee us freedom from being offended...but we can choose not to be, and life gets so much easier.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM