Host Engineering Forum

General Category => CTRIO and CTRIO2 => Topic started by: gjones on September 30, 2009, 02:21:43 PM

Title: H2 CTRIO run to position profile
Post by: gjones 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)
Title: Re: H2 CTRIO run to position profile
Post by: franji1 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).
Title: Re: H2 CTRIO run to position profile
Post by: Greg 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.