News:

  • October 27, 2025, 06:58:18 AM

Login with username, password and session length

Author Topic: CTRIO will not reset count  (Read 5426 times)

jb

  • Newbie
  • *
  • Posts: 2
CTRIO will not reset count
« on: May 16, 2012, 10:49:38 AM »
I'm using a H0-CTRIO with a DL-06.  I have a linear encoder connected to A channel to use as an up counter.  Not using any scaling with raw output to v5000. 

I cannot get the counter to reset.  When I issue a out-B5054.1  the count does not reset.  If I add (ld K0) and (out v5000) then it will go to 0 as long as the reset button is depressed, but then returns to the previous value.  I also tried hard wiring the C channel as a reset with the same results.

The weird part is that it did work when I set up the program.  Then I added the output programs to run a step motor.  It seems like there is something internal that is keeping it from resetting. 

Any thoughts?

Greg

  • HostTech
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 702
  • Hmmm...
    • Host Engineering, Inc.
Re: CTRIO will not reset count
« Reply #1 on: May 16, 2012, 02:07:39 PM »
My first thought is you have a programming conflict. Something is stepping on B5054.1 bit.

To test, you can insert an END at the top of your program, leaving your CPU in RUN mode. Then use a DataView to turn that bit ON.
There are two types of people in the world; those that can extrapolate from incomplete data sets.

jb

  • Newbie
  • *
  • Posts: 2
Re: CTRIO will not reset count
« Reply #2 on: May 16, 2012, 03:40:27 PM »
I moved the reset command rung to the beginning of the program, and before any of the stages(I'm using rll plus).  Now it works.  It doesn't make sense why it would work here and not inside a stage.  Oh well, It's working now.