Hi I am using a T825 controlled by an Arduino Uno. I am using the setup to drive an auxiliary axis on a CNC machine so I need the motor to drive exactly 1000 steps when signaled from the arduino, wait for another signal, advance 1000 steps, and again and again and again (18 times).
I am trying to use the following:
tic.setTargetPosition(1000); //drive the motor 1000 steps
waitForPosition(1000); //wait for the position
tic.haltAndSetPosition(0); //reset the current position to 0 steps so that I can tell the tic to move to the target position of 1000 steps the next time the controller is signaled to do so.
My problem is that the haltAndSetPosition(0) is not resetting the tic position.I can watch the tic via USB and the current position never resets.
I tried reproducing the bug you are describing, but I was unable to do so. Can you post the simplest complete Arduino sketch that demonstrates the problem? Also, could you post your Tic settings file? You can save your settings file by selecting the “Save settings file…” option within the “File” drop-down menu of the Tic Control Center software while the Tic is connected.
I am not at the machine shop where the tic is right now so I do not have the tic file for you at the moment.
I just thought that I did not have the Tic’s TX line connected to my Arduino’s RX line. Is the Tic not resetting my 1000 steps because the Arduino is never getting the information that it has reached 1000 steps? Therefor not proceeding to the “tic.haltAndSetPosition(0);”
A missing connection from the Tic’s TX line back to the Arduino’s RX line could certainly cause that problem. Your program might be hanging at the waitForPosition(1000); command if you do not have that connection.