Table of Contents

Overview
Establishing Communications
NMC Module Types
Viewing Controller Panels
PIC-SERVO Module Properties
   Motor Status Panel
   Motion Commands Panel
   Servo Parameters Panel
   Homing Control Panel
   Configure EEPROM
   Step Response Utility
PIC-I/O Module Properties
   I/O Bits Panel
   A/D Values Panel
   Counter/Timer Control Panel
   PWM Output Panel
PIC-STEP Module Properties
   Motor Status Panel
   Motion Commands Panel
   Stepper Parameters Panel
   Homing Control Panel
Macros
Configuration File
Additional Information

Overview
The Networked Modular Control (NMC) Test Utility allows users to test the functionality of control modules designed to use the NMC Communications protocol. Modules may be motor controllers, data acquisition systems, I/O devices, IR communication devices, etc..

With a string of NMC modules connected to one of the COM ports, this utility will search for modules and initialize them with addresses starting at 1 for the module furthest from the host. The list on the left side of the NMC Test Utility control window will show all of the modules found on the network, along with their assigned address. Clicking on one of the modules in this list will cause that module's properties to be displayed in the control panel on the right. Different control panels will be displayed for different types of modules. The status properties of the selected module will be updated automatically four times per second.

During initialization, each of the modules will be programmed with typical operating values. Note that these values are not necessarily the same as the module's default values.  Users may also specify that modules are initialized using operating values from a configuration file.

After initialization, users can change module operating parameters, record and delete macro command sequences, and load and save configuration files.

On exit, you will be prompted with the option to reset all modules to their power-up state, and prompted to save changes to a configuration file.

back to top

Establishing Communications

Network Adapters

NMC modules operate as slave devices on a full-duplex RS485 network. The PC, acting as the master controller, requires a simple RS232 to RS485 adapter (if using a standard RS232 COM port) to control the network. Because the master controller never has to share the command transmit line, it is never required to disable the output of the RS485 transmitter. The SSA-485 Smart Serial Adapter is a RS232/USB to 485 Network Adapter available from J.R. Kerr.

Baud Rate
By default, all NMC modules power-up with a baud rate of 19200, 1 start bit, 1 stop bit, no parity. The baud rate can be changed with the Communications Settings button to 57600 baud, 115200 baud or 230400 baud. In operating this test program, there is no real need to operate at other than 19200 baud, except to test the hardware reliability at higher communication rates. The baud rate of 230400 should only be used with PIC-SERVO SC controllers, and only with serial ports which support high speed baud rates.

COM Port Selection
When starting the NMC Test program, or when resetting the network, you will be prompted for the COM port and the baud rate. If the COM port fails to open, another application may have control of it, or it may not exist. Close the offending application or check your hardware configuration as required. If no modules are found, re-check your connections, make sure logic power is supplied to all the modules, and make sure that the furthest module has had the proper jumpers installed. If some but not all modules are found, re-check your connections and reset the network manually using the "Reset Network" button.

Network Reset
On startup or when the Reset Network button is clicked, a reset signal will be sent to all modules on the network, and all modules will be set with unique addresses, starting with 1 for the furthest module. When power is first applied to modules, they may read or send a spurious character. In some circumstances this may cause the initial search for modules to fail or not detect all modules. In this case, the Reset Network button can be used to reset the network manually. This can also be used to disable all modules on the network.

back to top

NMC Module Types
An NMC Module is any device which adheres to the NMC Communications Format (see Additional Information for a complete description). The format is suitable for motor controllers, data acquisition systems, I/O devices, IR communications devices, etc. . Currently, however, PIC-SERVO based motion controllers, PIC-STEP based motion controllers, and PIC-I/O I/O expansion modules are the only devices currently supported by this utility. Visit the web site "http://www.jrkerr.com/" for updates to this utility.

PIC-SERVO Modules (Module Type 0)
The PIC-SERVO motor control board is designed for the motion control of D.C. Motors with incremental encoder position feedback. It is based on the PIC-SERVO chipset which has the NMC Communications protocol build in, and provides a PID servo control filter, velocity and trapezoidal profiling modes, as well as a variety of error checking and homing functions.

PIC-I/O Modules (Module Type 2)
The PIC-I/O module is a simple I/O expansion board which has 12 bits of digital I/O (user programmable as input or output), three 8-bit A/D input channels, two PWM output channels with high current drivers, and one 32 bit counter/timer channel. Like the PIC-SERVO, it has the NMC Communications protocol built in.


PIC-STEP Modules (Module Type 3)
The PIC-STEP motor control board is designed for the motion control standard stepper motors. It is based on the PIC-STEP chip which outputs step & direction signals to the amplifier. Various control modes are supported including trapezoidal profile mode, velocity profile mode, unprofiled position mode and unprofiled velocity mode.

back to top

Viewing Controller Panels
Normally, a control panel will be displayed which corresponds to the type of module selected from the list of modules found on the network. For reference, however, you may wish to view the control panels for different types of modules which you don't have connected to the network. To do this, simply click on the "Reset Network" button and then select "Cancel" when prompted to select a COM port. The control panel will display NO MODULES SELECTED, along with buttons for viewing control panels for the currently supported module types.

back to top

PIC-SERVO Module Properties
The PIC-SERVO module properties are displayed on the Motor Status Panel, the Motion Command Panel, the Servo Parameters Panel, and the Homing Control Panel.

Servo Motor Status Panel
The Motor Status panel gives information about the operating status of the motor as reported directly by the PIC-SERVO controller.

Position
The position is reported directly in quadrature encoder counts and is in the range of +/- 2,147,483,647 counts. The "Clr" button next to the position can be used to set the position to zero. The position should only be reset when the motor is at zero velocity. With the PIC-SERVO SC, the position can also be set to a specific value by editing the position value and clicking on the "Set" button.

Velocity
The velocity is reported in quadrature encoder counts per servo tick. It is in the range of +/- 32,676.

A/D Value
The A/D value is the 8 bit digitized value of the analog input channel and is between 0 and 255. Note that the analog input channel can be used in conjunction with the current limiting feature if a current sense signal from an external amplifier is connected to the analog input.

Home Position
The home position is the position of the motor captured when the triggering conditions set in the Homing Control Panel are met.

Position Error
The position error is difference between the current position and where the motor should be.  It is in the range of +/- 32,767.

Status Indicators
The first set of status indicators reflect the current state of the Limit 1 switch input, the Limit 2 switch input, the Index input, the Motor Power sense input, whether the Servo is enabled, the Slew status, the Accel/Decel status, and the Move Done status.  Placing the mouse over the name of the status indicator will display a hint describing the status indicator.

The second set of indicators are for latched flags, reflecting the error conditions of excessive Position Error, an Overcurrent condition, or of Position Wrap around of the position counter. These flags must be cleared explicitly using the "CLEAR" button to the right.  Placing the mouse over the name of the status indicator will display a hint describing the status indicator.

back to top

Servo Motion Commands Panel
The Motion Commands panel allows the user to specify motor motions. The "GO" button will send the PIC-SERVO controller a motion command for the selected operating mode. The three different stop buttons can be used to stop a motor.

PWM Mode
In PWM mode, the position servo is disabled and the absolute value of the specified PWM value is sent directly to the output. The PWM value must be between -255 and +255. Negative values will drive the motor in the reverse direction.

Velocity Mode
In velocity mode, the velocity profiler will be used to accelerate or decelerate the motor from its current velocity to the specified goal velocity. The specified acceleration must be positive, but the velocity may be positive or negative. The velocity is a 32 bit value with the lower 16 bits a fractional value. For example to rotate at 15 encoder counts per servo tick, you would specify a velocity of 15 x 2^16, or 983,040. The acceleration is in units of encoder counts/servo tick/servo tick and is also a 32 bit quantity with a 16 bit fractional component. Velocity mode can be entered at anytime.

Position Mode
In position control mode, a trapezoidal profile is used to move the motor from its starting position to the to the goal position. The specified acceleration will be used and the specified velocity will not be exceeded. The acceleration and velocity must both be positive, and the goal position must be in the range of -2,147,483,647 to +2,147,483,647 encoder counts. In addition, the goal position should not be more than 1,073,741,824 counts from the starting position. Before a position mode command can be issued, the "move done" flag must be set and the motor must be at zero velocity except for the PIC-SERVO SC, where a position mode command can be issued at any time.

Stop Button
This button will cause the motor to decelerate to a stop at the current acceleration rate. It is equivalent to setting the velocity to zero and then clicking the "GO" button.

STOP! Button
This button will cause the motor to servo to its current position with zero velocity immediately. This stop mode should only be used as an emergency stop, or for enabling the position servo from PWM mode.

Motor Off Button
This button will turn off the motor by entering PWM mode with a PWM value of 0.

Enable Amplifier Box
Clicking on this box will raise or lower the amplifier enable output. If this amplifier enable output is used, this box must be clicked before power can be applied to the motor.

back to top

Servo Parameters Panel
The Servo Parameters panel allows the user to modify the eight servo control parameters, or gains. The "Set Servo Parameters" button will apply the gains to the selected controller.

Kp, Ki, Kd
Kp, Ki, and Kd are the primary control parameters used by the PID control filter. They must all be positive values in the range between 0 and 32,767.

Output Limit (OL)
The output limit. sets the maximum PWM output value. If the control algorithm produces a larger value, the actual value will be clipped to the output limit value. The output limit must be between 0 and 255.

Current Limit (CL)
If the A/D input is connected to a voltage signal proportional to the motor current, the current limit can be used to adjust the PWM output to prevent the motor current from exceeding the limit. If a current limit between 1 and 255 is used, the PWM output will be reduced if the A/D value exceeds the current limit. If the A/D value is inversely proportional to the motor current a negative value for the current limit should be used (between 0 and -255). This will cause the PWM output to be reduced whenever the A/D value is less than the absolute value of the current limit. The Overcurrent flag will be set whenever an overcurrent condition occurs. A current limit value of 0 effectively disables current limiting.

Servo Rate (SR)
The servo rate is a clock divisor which determines the length of a servo tick. The servo tick time is equal to 0.51 milliseconds multiplied by the servo rate divisor value. This value must be between 1 and 255. In general, this value may be left at the default value of 1, but for systems with a large inertia and/or low encoder resolution, it may be desirable to increase the tick time to improve the servo's damping characteristics.

For the PIC-SERVO SC, the servo tick time is fixed at 0.51 milliseconds. The servo rate is instead interpreted as the number of servo ticks which transpire between position error samples used for the derivative term.

Deadband Compensation (DC)
Some amplifier/motor combinations will exhibit a deadband around a zero PWM output. That is, small PWM values will have no visible effect on driving the motor. While servoing, the deadband compensation value will be added to the magnitude of the PWM output, thus boosting the control signal into the active region outside the deadband. Deadband compensation is only available on versions 4 and higher of the PIC-SERVO.

Step Rate Multiplier (SM)
The PIC-SERVO SC has a multiplier factor applied to the step input pulses. The command position of the motor is incremented by the number of step pulses multiplied by the step rate multiplier.

Integration Limit (IL)
The integration limit limits the absolute value of the integral of the position error. The integration limit must be between 0 and 32,767. The limit value used internally is the limit value x 256. Limiting the integration term is useful for preventing huge sums from accumulating in that case of a locked rotor. Temporarily setting this value to zero can be used to zero out any accumulated integral error term.

Position Error Limit (EL)
The position error limit is used to detect locked rotor conditions or other situations where the motor is not tracking as accurately as it should. If the absolute value of the position error ever becomes greater than the position error limit, the position servo will be disabled and the PWM output value will be set to 0. The position error flag will also be set. The position error limit is in units of quadrature encoder counts, and must be between 0 and 16,383.

Set I/O Parameters
For the PIC-SERVO SC, you can select I/O options for limit switch actions (motor off or stop abrupt), output modes (PWM & Direction, Antiphase PWM or 3-Phase commutation), and also enable Step & Direction inputs. If the output mode for your PIC-SERVO SC has not already been stored in EEPROM, you should set the I/O mode before enabling the amplifier. (Note: setting the I/O mode does not automatically store the I/O mode in EEPROM.)

back to top

Servo Homing Control Panel
The incremental encoders which are used for position feedback do not know their absolute position on power-up. Therefore, the homing control uses limit switches, the encoder index signal, or other conditions to determine the absolute position of the motor. When one of these homing triggers is activated, the current position of the motor is stored as the home position in the Motor Status Panel. The distance between the current position and the home position gives the absolute position of the motor.

Typically, the homing trigger conditions are set using the "Start" button and then the motor is set in motion using one of the three motion command modes. Any or all of the homing trigger conditions can be set, and the home position will be captured as soon as any of these triggers occurs. The "Home in progress" flag will be set when homing is initiated, and will be cleared once the home position has been found.

Homing on Limit Switches or Index Signal
Homing on either of the limit switches or on the index signal will occur when theses input signals change value. Typically, an inaccurate home position (within one revolution of the motor) will be found by homing to one of the limit switches. A final, more accurate, home position can then be found by looking for the index pulse on the encoder. Low velocities should be used while homing to insure the most accurate capture of the home position.

Homing on Position Error or Over Current
In systems which do not have limit switches or index signals, the motor may be homed by moving until a fixed limit stop is hit. If motor current sensing is used, the home position can be captured when the current limit is exceeded and then the motor can be commanded to stop. If current sensing is not available, the home position can be captured when the position error limit is exceeded, and the motor will be turned off automatically. In either of these cases, the motor should be moving at a very low velocity and the current or position error limits should be set to the minimum usable value to prevent damage to the motor or mechanism when the limit stop is hit.

Auto Stop on Home
With version 3 or higher of the PIC-SERVO, setting one of the three stop modes will cause the motor to stop automatically (in the specified mode) once the home position has been found. The "Off" option will disable the servo, allowing the motor to spin freely. The "Abrupt" option will cause the motor to stop abruptly and servo to its current position. (This mode may cause excessive accelerations.) The "Smooth" option will decelerate the motor to a stop using the current programmed acceleration value. For versions 1 & 2 of the firmware, the Auto Stop feature is not available, and the Auto Stop section is disabled.

If homing is used when recording a Macro, the "Abrupt" or "Smooth" options must be used, and the homing command must be followed by a "Wait Move" command.

back to top

Servo EEPROM Configuration
The PIC-SERVO SC allows you to save parameters in EEPROM which will be restored on power-up. (A software reset will not restore EEPROM data.) Configuring the EEPROM will reset the PIC-SERVO SC and it will be unavailable until the entire network of controllers is reset.  To save configuration parameters in EEPROM select "Configure PIC-SERVO EEPROM" from the options menu.

back to top

Step Response Utility Program (available soon)
A separate Step Response utility program is available to assist in the setting of your servo gains.  This program lets you make jump motions of the motor and then plots how quickly and accurately the motor moves to the goal position.  You can then adjust your gains to optimize the rise time, overshoot, and settling time.  To run the stepresponse.exe, click on  "Exit and Run Step Response" from the options menu.

back to top

PIC-I/O Module Properties
The I/O module properties are displayed on the I/O Bits Panel, the A/D Panel, the Counter/Timer Control Panel, and the PWM Panel.

back to top

I/O Bits Panel
The I/O bits panel lets you view the state of the input bits, set the value of the output bits, and define whether particular bits should be inputs or outputs.

Setting Bits as Inputs or Outputs
The column of 12 check boxes marked "Make Output" let you define whether a bit is an input or an output.  If the checkbox is unchecked, the bit is an input (the default), and if the checkbox is checked, the bit is an output. Clicking on the checkbox will cause it to change states. Make sure that the pin corresponding to a bit is connected to another devices input (or left open) before making it an output, otherwise, you may damage the PIC-I/Os output driver.

Setting/Clearing Output Bits
The column of 12 check boxes marked "Output State" are used to set or clear an output bit. If the checkbox is not checked, the bit is clear (0 volts) and if the checkbox is checked, the bit is set (+5 volts). Clicking on the checkbox will toggle its value. If a bit is defined as an input, the checkbox is yellow and either checked or unchecked. This indicates the state the output bit will be set to should it become an output. Clicking on an "Output State" checkbox while the bit is still defined as an input can be used to pre-set or pre-clear a bit so that it will take that state immediately when it is switched to an output.

Viewing Input Bits
The column of LED indicators marked "State" indicate the state of the input bit (green for set, gray for clear). When a bit is defined as an output, the input state LED should be green when the "Output State" checkbox is checked, and it should be gray when the "Output State" checkbox is unchecked. If this is not the case, it means that the level read by the input is not the level set as the output; the driver is not able to drive the output to the proper voltage, potentially damaging it and the device it is connected to. If this occurs, immediately change the bit to an input.

back to top

A/D Panel
The A/D panel displays the values of the three 8-bit A/D input channels. The values displayed are between 0 (Input = 0 volts) and 255 (Input = 5 volts).

back to top

Counter/Timer Control Panel
The counter/timer control panel allows you to set the operating characteristics of the PIC-I/O modules 32 bit counter/timer.

Setting as a Counter or a Timer
The radio buttons on the left side of the panel allow you to set the counter/timer as either a counter, a timer, or to a disabled state. As a counter, the value displayed on the right is incremented with each rising edge of I/O bit number 10. Normally, bit 10 would be set as an input to count external events. If bit 10 is set as an output, however, the count will reflect the number of times Bit 10 is manually set. When set as a timer, the counter/timer counts the ticks of the PIC-I/Os internal 5 MHz clock. The time displayed is in seconds. The "Set Mode/Clear" button must be clicked to make the mode change take effect.

Setting the Resolution
The counter/timer has a pre-scaler which can be set to count every event, every other event, every fourth event or every eighth event. This is most useful for increasing the maximum duration which can be timed before the 32 bit timer rolls over. The "Set Mode/Clear" button must be clicked to make the mode change take effect.

Clearing the Count/Time Value
The "Set Mode/Clear" button both sets the mode and clears the counter/timer value. There is no way to change the mode (or resolution) without clearing the count.

back to top

PWM Output Panel
The PWM Output Panel allows you to type in PWM output values for the two high current output drivers on the PIC-I/O module. Values should be between 0 (0% duty cycle - output turned off) and 255 (100% duty cycle - output full on).

back to top

PIC-STEP Module Properties
The PIC-STEP module properties are displayed on the Motor Status Panel, Motion Commands Panel, Stepper Parameters Panel, and the Homing Control Panel.

Stepper Motor Status Panel
The Motor Status panel gives information about the operating status of the motor as reported directly by the PIC-STEP controller.

Position
The position is reported directly in steps and is in the range of +/- 2,147,483,647 counts. The "Clear" button next to the position can be used to reset the position to zero. The position should only be reset to zero when the motor is not moving.

Timer Count
The timer count is the raw timer value which governs the motor speed. Please refer to the PIC-STEP data sheet for details of interpreting this value.

A/D Value
The A/D value is the 8 bit digitized value of the analog input channel and is between 0 and 255. If the Thermal input is connected to a thermistor mounted on the motor, the A/D value will be proportional to the motor temperature.

Home Position
The home position is the position of the motor captured when the triggering conditions set in the Homing Control Panel are met.

Status Indicators
The status indicators report the state of the Limit 1 and Limit 2 switch inputs, the Emergency Stop input, the Home Switch input, and the Auxiliary 1 and Auxiliary 2 inputs. Also indicated are the  Motor Power state, the Amplifier Enabled state, the Motor Moving state, and the Motor At Speed state.  On the PIC-STEP board from J.R. Kerr, the homing switch input is connected to the amplifiers home output, and is set whenever the amplifier cycles to its initial winding energization state.

back to top

Stepper Motion Commands Panel
The Motion Commands panel allows the user to specify motor motions. The "GO" button will send the PIC-STEP controller a motion command for the selected operating mode. The panel includes controls for enabling/disabling the amplifier, and for stopping the motor smoothly and abruptly.

Velocity Mode
Velocity mode will move the motor at a constant velocity with acceleration ramping. The speed is specified as an integer value between 1 and +250 (or -1 and -250), and an acceleration time of 1 to 255 is used for accelerating or decelerating to the target speed. Larger acceleration times will cause the motor to accelerate more slowly.

Speeds units are equal to 25 steps/sec in 1x mode, 50 steps/sec in 2x mode, 100 steps/sec in 4x mode, and 200 steps/sec in 8x mode.

Unprofiled Velocity Mode
Unprofiled velocity mode will move the motor at a constant velocity without acceleration ramping. The speed is specified as a floating point raw speed value between 0.4 and 250.0 (or -.4 and -250.0). This speed will be commanded immediately without any acceleration or deceleration.

Speeds units are equal to 25 steps/sec in 1x mode, 50 steps/sec in 2x mode, 100 steps/sec in 4x mode, and 200 steps/sec in 8x mode.

Position Mode
In position mode, the motor will move at the specified speed and stop at the specified goal position. The motor must be stopped before giving a position mode command. The motor will ramp up to the goal speed, slew at that speed, and then decelerate to a stop at the goal position. The speed and acceleration are the same as used for the velocity mode. The goal position must be in the range of -2,147,483,647 to +2,147,483,647 steps.

Stop Button
This button will cause the motor to decelerate to a stop at the current acceleration rate. Stopping smoothly switches the controller into the profiled velocity mode with a target speed of zero.

STOP! Button
This button will cause the motor to stop immediately with no deceleration.

Enable Amplifier / Disable Amplifier Buttons
The "Enable Amplifier" button enables the amplifier and causes the motor position to be held with the specified holding current. Various error conditions may automatically disable the amplifier, and this button can be used to re-enable it. The "Disable Amplifier" button can be used to disable the amplifier, allowing the motor to spin freely.

back to top

Stepper Parameters Panel
The Stepper Parameters panel allows the user set control bits governing the amplifier or driver behavior, as well as changing other parameters governing the motion. The "Set Motion Parameters" button will set the parameters for the selected controller.

Output1 - Output5
Outputs 1 - 5 are general purpose outputs of the PIC-STEP controller chip, typically connected to control inputs on the amplifier. If a PIC-STEP controller board from J.R Kerr is being used, Output2 is used to control the half-step/full-step mode, Output3 is used to control the fast or slow decay mode (leave in slow decay mode), and clearing Output4 is used to force the amplifier into energizing the motor in its initial phase state (leave set for normal operation) . Outputs 1 and 5 are not used by the PIC-STEP board.

Ignore Limits, E-Stop, Off on E-Stop
The next set of controls determines whether or not the forward and reverse limit switches, and the emergency stop input will automatically cause the motor to stop moving, or whether these inputs will be ignored. The Off on E-Stop control will cause the amplifier to be disabled altogether if a limit switch or E-Stop fault occurs. (By default, the motor will stop moving but hold its current position.)

Speed Mode
The Speed Mode sets a multiplying factor for the step rate timer. In 1x mode, one speed unit is equal to 25 steps/second. In 2x mode, one speed unit equals 50 steps/second. In 4x mode, one speed unit equals 100 steps/second. In 8x mode, one speed unit equals 200 steps/second.

Minimum Speed
The Minimum Speed is the lowest speed allowable for profiled motions. The commanded speed should be equal to, or higher than, this minimum speed. All profiled moves will start at this minimum speed, and any command to decelerate the motor to a stop will decelerate to no lower than this minimum speed before stopping.  The minimum speed is an integer value between 1 and 250.

Running Current
The Running Current determines how much current will be sourced to the motor while it is in motion. A value of 255 corresponds to full current, and a value of 0 corresponds to no current. Note that the PIC-STEP board allows the amplifier to be overdriven by about 25%, so do not leave the current limit set above a value of 200 for more than a few seconds. Whenever the motor is not moving, the motor current will revert to the holding current.

Holding Current
The Holding Current determines how much current will be sourced to the motor while it not moving. A value of 255 corresponds to full current, and a value of 0 corresponds to no current. Note that the PIC-STEP board allows the amplifier to be overdriven by about 25%, so do not leave the current limit set above a value of 200 for more than a few seconds. Whenever the a motion is started, the motor current will switch to the running current.

Thermal Limit
If the thermal input of the PIC-STEP is connected to a thermistor bridge (attached to your motor) such that the thermal input voltage drops as the temperature increases, the thermal limit can be used to automatically disable the amplifier if the thermal input (A/D value) drops below the set thermal limit. A thermal limit of 0 effectively disables this feature.

back to top

Stepper Homing Control Panel
The homing control panel is used to capture the motor position when some homing trigger condition, such as a limit switch being tripped, occurs. Typically, the homing trigger conditions are set using the "Set Homing" button and then the motor is set in motion using one of the motion command modes. Any or all of the homing trigger conditions can be set, and the Home in progress flag will be set when homing is initiated. When a change in any of the homing triggers occurs, the captured home position will be displayed in the status panel, and the motor will optionally stop in the specified stopping mode.

Homing on Limit Switches
Homing on either of the limit switches will occur when theses input signals change value. Low velocities should be used while homing to insure the most accurate capture of the home position.

Homing on Homing Switch
The homing switch input is an optional input which can be used for homing. On the PIC-STEP board from J.R. Kerr, the homing switch input is tied to the HOME output of the amplifier. When the amplifier cycles to the beginning of its 4 (full step) or 8 (half step) step phase cycle, the home switch input goes high.

Auto Stop Mode
Setting one of the three stop modes will cause the motor to stop automatically (in the specified mode) once the home position has been found. The Off option will disable the servo, allowing the motor to spin freely. The Abrupt option will cause the motor to stop abruptly and hold its current position. (This mode may cause excessive accelerations.) The Smooth option will decelerate the motor to a stop using the current programmed acceleration value.

If homing is used when recording a Macro, the "Abrupt" or "Smooth" options must be used, and the homing command must be followed by a "Wait Move" command.

back to top

Macros
The NMC Test Utility allows users to record a sequence of commands for play back at a later time. For example, a user can record a stepper macro that first enables the stepper amplifier, then makes a forward move to a goal position, then makes a reverse move to a goal position. Macro control is ideally suited for simple sequences of motion commands. For more complex sequences, use a programming language such as Motion Basic.

The Macro Panel is located on the right side of the NMC Test Utility.  By the default, the panel is not displayed on startup.  To show or hide the Macro Panel display, select "Show/Hide Macro Controls" from the Options Menu.

Record New Macro
Record a New Macro by pressing the "Record New Macro" button. When the button is pressed, the button text will change to "Finish Macro" and the button will be highlighted with a red outline to indicate that you are recording a macro. You will be prompted to enter the macro name and macro description.  After entering the name and description, continue recording the new macro by entering command parameters (such as position and velocity), selecting command modes (such as position mode), and executing the command (pressing the "GO" button). Complete the macro by pressing the "Finish Macro" button.   Each macro can support a sequence of up to 25 macro commands.

Wait Move
The "Wait Move" button is used to instruct the macro processor to wait for the previous motion to finish executing before going on to the next command in the macro sequence.  For example, a macro that consisted of two position moves would be entered as: GO (to position 5000) - Wait Move - GO (to position 8000) - Wait Move. This command is required only for commands that take time to complete such as "GO", and   "Stop" (stop smoothly).

Finish Macro
Finish a macro by pressing the "Finish Macro" Button.  When this button is pressed, the button text will change to "Record New Macro" and the red button highlight will disappear.

Run Macro
To run a macro, highlight the desired macro by clicking on the macro name in the Macro List Box, then press the "Run Macro" button. When the button is pressed, the button text will change to "Pause Macro" and the button will be highlighted by a red outline to indicate that you are running a macro. If no other button is pressed, the macro will run to completion, the button text will change back to "Run Macro", and the red button highlight will disappear.

Pause Macro
To pause a macro that is running, press the "Pause Macro" button.  When the macro is paused, it stops executing the sequence of macro commands.  Note that pausing a macro only stops the macro sequence, but does not stop any motor movement.  Use the "Stop all Smooth" or "Stop all Abrupt" Buttons to stop motor movement.

Stop all Smooth/Stop all Abrupt
To pause a macro and stop all motor movement, press the "Stop All Smooth" or "Stop All Abrupt" button.

Resume Macro
After a macro has been paused, it may be resumed by pressing the "Resume Macro" button.  When this button is pressed, the button text changes to "Pause Macro", and macro execution resumes at the next command in the macro sequence.   Note that when resuming a macro that has been paused using the "Stop All Smooth" or "Stop All Abrupt" options, the execution will move onto the next command in the macro and will not complete the motion that was interrupted.

Exit Macro
To exit a paused macro, press the "Exit Macro" Button.  When this button is pressed, the button text will change to "Run Macro", and the red highlight around the macro will disappear indicating that you are no longer running a macro.  Note that a running macro must be paused (by pressing either the "Pause Macro" button or the "Stop all Smooth" or "Stop all Abrupt" button) before it can be exited.

back to top

Configuration File
The NMC Test Utility allows users to load and save module configuration and macros to a file. 

Saving Configuration
The NMC Test configuration is saved by selecting the "File->Save" or "File->Save As" menu items.  The configuration file saves the current module configuration and macros.  The module configuration includes module type, version, address, and the latest configuration data send to the module.

Loading Configuration
Once the NMC Test Utility has established communications, you may manually load a configuration by selecting the "File->Open" menu item.  When loading a configuration, the NMC Test Utility first checks the module topology.  If the module address and type information stored in the configuration file does not match the current network configuration, an error message is displayed and the configuration file is not loaded.  Once the module topology is verified, the configuration file is read and loaded into each module, and the Macro Data is loaded.  The NMC Test Utility User Interface is updated with the new configuration data.

Auto Load Configuration

On startup or when the "Reset Network" button is clicked, you will be prompted with a "Reload Last Configuration" checkbox and the name of the last configuration file. Checking the "Reload Last Configuration" checkbox will automatically load the last configuration file on startup and reset. 

Auto Save Configuration
On startup or when the "Reset Network" button is clicked, you will be prompted with a "Auto Save Configuration On Exit" checkbox.   Checking the "Auto Save Configuration On Exit" checkbox will automatically save the configuration file on exit.

back to top

Additional Information
Please refer to the PIC-SERVO, PIC-I/O or PIC-STEP Data Sheets for further details regarding use of these motion control chipsets. These data sheets, along with other application notes may be downloaded from the web site: "http://www.jrkerr.com/"

back to top