First Motion

Follow these steps to setup the controller and achieve initial motion.

Wiring

Connect the USB plug to a PC port and the 9 pin DSub connector to the "Comm" plug on an Animatics power-comm cable. Connect the power-comm cable to one Smartmotor or multiple Smartmotors using the add-a-motor cables. The Cub is powered by the USB cable and should show a green blinking "Heartbeat" indication when plugged in. The heatbeat LED needs to be blinking before the controller will respond to software. If you encounter a problem the first question support will ask will likely be "Is the heartbeat LED still blinking? Was there any deviation to the blink pattern during the problem?".

Detect Motors

Click the Setup Tab


Click the "Detect" button


After sine preparation time the Cub should be shown as the first Module in the Module List


There will be a momentary message indicating the Master software is being prepared


This is followed by a momentary message notifying that the Cub is trying to detect motors


The Module List is updated showing detected motors


The SmartMotor is considered a controller with axis and IO resources. Note that the axis of motion is now listed in the Named Axis Groups


Make a Console Button

Click the Console Tab


Click the Button Tool


Click inside the default form to create a default sized button or drag a rectangle over the form to create a button of any size.


With the button still selected click on the Legend Editor and change the name to "Move"


Note that the button name field to the left changes to "MoveButton"

Add Button Behavior

Edit the Button Click Procedure

Double click on the button to produce the button property editor:


Select "Procedure Click" from the list of Button Events. This is the procedure called when the button is clicked on. This produces a text editor:


Comments start with a left curly bracket, end with a right curly bracket, and are shown in the syntax highlighting editor as green. The comment is indicating where program statements need to be placed. Delete the comment and replace with the following three commands:


Most commands follow an object oriented syntax where the object, expressed as a noun, starts the statement followed by a period followed by a method name as a verb and any additional parameters. Some commands are procedural and begin with the procedure name followed by parameters. In this example the SetCurrent command is the procedural style and the remaining motion commands are in the object oriented style. Select "File | Save and Exit"


Click the "Play" button and wait for the status to indicate "Running":


If there is an error in a command there will be an indication of the error and the editor will try to put the cursor close to the error. Correct the error, File Save and Exit again, and press the "Play" button again. A small windows form should be provided displaying the Move button:


Click on the Move button and the motor should turn one rotation