I have a TIC-834 set up with one card. It is connected in serial mode to an arduino (code attached) . I can get the motor turning and control the number of steps and stepsize but I cannot seem to change the target velocity.
I am setting card=E0 (which works) and command 63 (E3 minus 1st bit)
Running the 2 examples below I see no noticeable change in speed. (I used simple examples with no msbs needed).
I didn’t check your code carefully, but at a glance, the values you are sending look okay. However, note the units of the value that the Set target velocity command takes - it is in microsteps per 10,000 seconds, so your two values correspond to about 20 microsteps per second and 0.13 microsteps per second, respectively.
Even with 20 microsteps/s, if you are using 1/4 step mode and a typical motor with 200 steps/rev, that means it would take 40 seconds for the motor to complete 1 revolution (= 1.5 rpm). With that slow of a speed, it can be easy to miss that the motor is running unless you watch it carefully, so you might want to make sure to watch it for a while or try testing with a higher target velocity.
By the way, is there a particular reason you are writing your own functions to send commands to the Tic instead of using the functions provided by our Arduino library (such as setTargetVelocity, as demonstrated in the SerialSpeedControl example)?
Thanks Kevin-
I think my confusion is around the use of the command to set velocity. My original thought is that this presets the velocity at which successive stepping commands occur. In fact it appears that it just begins stepping at the speed given until interrupted. So I guess I have to rethink my approach.
My intentions were to step the motor at a fairly high speed–about 20RPM. In fact I cannot-looks like the limit is 5E6 / 1E4 or 500 steps/second… So at full steps–200 per rev we have about 2.5.RPM. Not sure if there is a way for your software to move it faster. (excepting use of the hardware step-line on the card).
When I was in trouble I did indeed check this out with the Arduino functions you provide.
But I usually like to write my own code because it is compact and also not confined to the Arduino. I will likely be using a Technologics and a PIC at some point. Also I find C++ difficult to pass on to others in a small lab. The A calls B calls C calls D… type of thing commonly found in C++ often makes the code unreadable especially when it spans many pages or modules… Having it concise on 1 page usually works for simple microprocessor type programs like this.
I think your understanding is correct now. Sending a value with “Set target velocity”
causes the Tic to accelerate (or decelerate) the motor to that speed and then maintain it until another target command takes effect.
What you might be looking for instead is the “Max speed” setting (and the “Set max speed” command), which limits the Tic’s maximum motor speed, including when it is moving toward a target position. (You can also change the max acceleration and deceleration to control how quickly the speed ramps up and down.)
The largest possible value for the “Max speed” setting is actually 5E8 (500,000,000), which is 50,000 steps/second.