News:

  • June 08, 2026, 10:56:46 AM

Login with username, password and session length

Author Topic: H2 CTRIO run to position profile  (Read 25546 times)

gjones

  • Newbie
  • *
  • Posts: 6
H2 CTRIO run to position profile
« on: September 30, 2009, 02:21:43 PM »
I am using two H2CTRIOs to opperrate 4 stepping motors with linear encoders on two X_Y tables simultaniously. I am using the home search profile to zero the encoders and then Run to Position mode to establish starting positions for the tables.  This works fine most of the time, but occasionally one channel, CTRIO 1, CHANNEL 2, fails to execute the Run to Position move.  When this happens I do not get an error from the I-Box but I discovered that the Workspace has a value of 8(hex) when the error happens. All other I-Box workspaces have a value of 1.  If I reset the workspace value to 1, the routine will execute correctly after a restart.
What is the meaning of the value in the workspace memory locations and what is the significance of 8(hex)

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3827
    • Host Engineering
Re: H2 CTRIO run to position profile
« Reply #1 on: September 30, 2009, 03:58:31 PM »
It's WaitForOutXCommandComplete, meaning it's looking for the CommandComplete bit to turn on in the CTRIO configuration.

Look at the CTRRTPM box that is causing the problem.  Make sure that the Workspace V register is not used anywhere else in your program.  Do a Find or look at the XRef.  Make sure you are not duplicating any parameters across the two sets of CTRIO IBoxes, especially the two CTRIO boxes themselves at the top of your program (you need one for each module).

Greg

  • HostTech
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 702
  • Hmmm...
    • Host Engineering, Inc.
Re: H2 CTRIO run to position profile
« Reply #2 on: October 01, 2009, 09:52:01 AM »
Another thing to consider is, are you running any of this in Stages? Because if you are, it is important not to terminate a particular Stage before getting the CommandComplete bit.
There are two types of people in the world; those that can extrapolate from incomplete data sets.