10 Motion Perfect 2 PDF
10 Motion Perfect 2 PDF
C H A P T E R
SUPPORT SOFTWARE
Motion Perfect 2
Motion Perfect 2 is an application for the PC, designed to be used in conjunction
with the Motion Coordinator range of multi-tasking motion controllers.
Motion Perfect provides the user with an easy to use Windows based interface for
controller configuration, rapid application development, and run-time diagnostics
of processes running on the Motion Coordinator.
System Requirements:
The following equipment is required to use Motion Perfect 2.
PC
Motion Coordinator
Motion Coordinator controller or compatible controllers.
Compatible controllers include:
MC2, MC202, MC204, Euro205, Euro205x, MC206, MC206X, PCI208, MC216, MC224,
MC302X etc.
In order to use the serial link Packet Communications mode, system software ver-
sion 1.49 or higher is required.
Note: You should always try to use the most recent version of Motion Perfect.
Updates are available from your local distributor or you can download the latest
version from the Trio Web site: WWW.TRIOMOTION.COM
The splash screen features a small messages window (bottom left) which is used
to display the status of the connection process. In this example Motion Perfect is
connected to an MC206X controller via serial port COM1.
Resolve This option should be used when you have the correct project selected,
but one or more of the files differ between the controller and PC ver-
sion, or do not exist in one of the copies.
You will need to use your judgment to decide whether the disk or con-
troller version is correct. Typically, if you are recovering the project
after a comms failure or PC crash then the version on the controller
should be saved. If you have modified the disk based copy of the pro-
gram then you will need to load this version onto the controller. The
examine button starts an external compare program to allow you to vis-
ually compare the version on the controller to the one on the PC.
Cancel Cancels the connection process and starts Motion Perfect in discon-
nected mode.
Once the project has been checked and is consistent then a backup copy of the PC
project will be created.
Main Menu
Project Options for Creating, Loading & Saving Motion Perfect Projects,
Loading/Saving program files and Table data
Controller Options relating to the controller hardware, including connect-
ing/disconnecting and checking configuration information.
Program Program specific options, including creating, editing and run-
ning controller tasks.
Tools Access to the main Motion Perfect tools. These options are also
available from the Toolbar
Options Configure the Motion Perfect Environment. Includes options to
setup the communications ports and to customise the editor dis-
play.
Window Control the appearance of the Motion Perfect desktop.
Help Access the help files and version information.
Controller Menu
CANIO Status Display the ststus of any CAN I/O modules connected to the con-
troller.
Ethernet Configure the parameters of any ethernet interfaces on the con-
Configuration troller.
Enable Enable or disable any features which can be enabled using fea-
Features ture codes.
Enable Editing Restore the power-up state of a controller currently starting
from EPROM to run from RAM and allow editing.
Fix Project into Store the programs in RAM into the controllers flash-EPROM
EPROM memory. The startup state for each program will not be
changed.
Flash Stick/ Store the current project on a flash stick or load a project from
Memory Card a flash stick/memory card (for controllers with a flash stick
interface).
Load System Update the controller system software.
Software
Full Directory Display a complete listing of all files on the controller, details of
memory used and the run status of each program.
Lock Controller Lock the controller to prevent modification of the programs.
Unlock Unlock a previously locked controller to allow programs to be
Controller edited.
Controller Configuration
This screen interrogates the hardware and displays the configuration information
reported back by the controller.
Address This is the CAN address of the built-in CAN port. The address
can be set in the range 32 to 47. If the address is 32 the control-
ler can automatically poll CAN I/O modules connected to it.
Enable If this is checked (and the CAN address is set to 32) automatic
polling of I/O modules is active.
Status This shows the status of groups of I/O modules by CAN address,
green for OK, red for error.
Initialise Clicking on this initilises the built-in CAN port on the controller.
Initialised This shows the state of the built-in CAN port, green for OK, red
for error.
Ethernet Configuration
This shows the configuration for an ethernet interface on the controller. It allows
the user to set up ethernet addressing parameters for built-in or daughterboard
ethernet interfaces.
Slot This is the daughterboard slot (-1 for built-in) of the ether-
net interface being viewed.
IP Address This is the ethernet IP address of this ethernet interface.
Subnet Mask This is the ethernet subnet mast for the network to which
this ethernet interface is connected.
Default Gateway This is the default gateway for this ethernet interface. It is
only needed if the controller is required to communicate
with a device on a different ethernet subnet to its own.
MAC Address This is the hardware MAC address for the current interface.
Normal This is the IP port number on which normal communications
Communications will take place. This is the port used by Motion Perfect for
Port Number communications. The default value is 23, which is the
reserved port for telnet communications.
Normal This is the IP port used for token based communications.
Communications This port is used by the Trio PC Motion ActiveX control. The
Port Number default value is 3240, which is the reserved port for Trio
Motion Control.
Ethernet firmware This shows the version number of the ethernet firmware for
version the current interface.
MODBUS tcp mode This sets the type of numerical representation used by
MODBUS tcp over this interface. The value can be float or
integer.
Feature Enable
Certain Motion Coordinators, such as the EURO205x and MC206X, have the ability
to unlock additional axes by entering a "Feature Enable Code".
When you access the Feature Enable dialog, you will be presented with a display
similar to one of the following:
This display shows the features which are currently available. If the codes for
additional features have been purchased, the relevant boxes will be available for
checking, otherwise the check boxes will be greyed out.
Enabling Additional Features
To enable a feature you must enter a Feature Enable Code, which is unique to
each controller and feature. To obtain a Feature Enable Code, you will need to
specify the feature required and the security code for the specific controller to be
updated. The order for the required codes should be FAXed to Trio or an author-
ised Trio distributor.
Security Code
Controllers with features which can be enabled
each have a unique security code number which is
implanted when the unit is manufactured. This
security code number is displayed on the above
screen (as highlighted right).
Once you have the required codes, select the button.
A dialog similar to the following example will appear.
Each feature requested has a feature number. Enter the relevant code for each
feature number, being careful to enter the characters in upper case. Take care to
check that 0 (zero) is not confused with O and 1 (one) is not confused with the
letter I.
Flashstick support
This only applies to controllers
which are fitted with a flash-
stick socket (eg MC206X).
When a controller with flash-
stick support is powered on with
a flashstick inserted, then the
controller will automatically
load the programs from the
flashstick into the controller
RAM.
The Read button will read the
directory of the flashstick and
display it. As the directory is
automatically read when the
tool window is created, this but-
ton only needs to be used when
the flashstick is changed.
The Save button will save the
programs on the controller to
the flashstick eassing any programs already stored on the flashstick. If the set
EPROM flag on save box is checked then a flag is set on the flashstick which
makes the controller store the programs on the flashstick in controller EPROM as
well as in controller RAM at power-up.
The Load button will load the programs from the flashstick onto the controller.
This is done by resetting the controller.
When you select the 'Load System Software' option from the controller menu, you
will first be presented with a warning dialog to ensure you have saved your
project and are sure you wish to continue. When you press OK you will be pre-
sented with the standard Windows file selector to choose the file you wish to
load.
Each Motion Coordinator controller has its own system file, identified by the first
letter (or letters) of the file name.
System Software File Prefix Codes:
You must ensure that you load only software designed for your specific controller,
other versions will not work and will probably make the controller unusable.
When you have chosen the appropriate file you will be prompted once again to
check that you wish to continue. Press OK to start the download process.
Downloading may take several minutes, depending on the speed of your PC and
the controller. During the download, you should see the progress of each section
updated as follows:-
Lock / Unlock
Lock Controller
Locking the controller will prevent any
unauthorised user from viewing or modify-
ing the programs in memory.
You simply need to enter a numeric code
(up to 7 digits). This value will be
encoded by the system and used to lock
the directory structure. The lock code is
held in encrypted form in the flash mem-
ory of the Motion Coordinator.
This can also be achieved by issuing the LOCK(lock_code) command from the con-
troller's command line.
Once the Motion Coordinator is locked it is not possible to list, edit or save any of
the controller programs. You cannot connect to the controller with Motion Per-
fect 2, although the terminal screen and unlock dialog will still be available.
WARNING: If you forget the lock code there is no way to unlock the controller. You will need
to return it to Trio or a distributor to have the lock removed.
Unlock Controller
Terminal
The terminal window provides a direct connection to the Motion Coordinator.
Most of the functions that must be performed during the installation, program-
ming and commissioning of a system with a Motion Coordinator have been auto-
mated by the options available in the Motion Perfect menu options. However, if
direct intervention is required the terminal window may be used.
When Motion Perfect is in connected mode then, on starting
the terminal tool you will be presented with a dialog to
select the communications channel. Channel 0 is used for the
controller command line and channels 5, 6 and 7 are used for
communication with programs running on the controller.
Selecting the required channel then pressing “OK” will start a
terminal tool on the selected channel. Only one terminal tool
(or keypad tool) can be connected to a channel at one time.
When Motion Perfect is in disconnected mode then, on
starting the terminal tool you will be presented with a dia-
log to select the communications port for connection. The
available ports will be those previously configured in the
communications options tool. Selecting an interface (proba-
bly COM1) and pressing “OK” will start a terminal tool. Only
one terminal tool can be used at any on time when operat-
ing in disconnected mode.
Axis Parameters
The Axis Parameters window enables you to
monitor and change the motion parameters
for any axis on the controller.
The window is made up of a number of cells,
separated into two banks, bank 1 at the top
and bank 2 at the bottom:
Bank 1. contains the values of parameters
that may be changed by the user.
Bank 2. contains the values of parameters
that cannot be changed by the user, as these
values are set by the system software of the
Motion Coordinator as it processes the Trio
BASIC motion commands and monitors the
status of the external inputs.
The black dividing bar that separates the two
banks may be repositioned using the mouse
to redistribute the space occupied by the dif-
ferent banks, for example to allow the user
to shrink the window and view other win-
dows whilst still watching the bank 2 infor-
mation.
When there are more parameters in a bank
that can be shown in the window a scroll bar
will appear beside that bank so that the user
can scroll up and down the parameter list to
see the required values.
The user can select different parameters
using the cursor keys or using the mouse. Multiple items may be selected by press-
ing the shift key and then using the cursor keys or the clicking the mouse to select
a different cell, or by pressing the left mouse button in the start cell and the
moving the mouse to select the last cell in the selection. Functions may be imple-
mented in the future that work on a selection of multiples cells.
When the user changes the UNITS parameter for any axis, all the data for this axis
is re-read as many of the parameters, such as the SPEED, ACCEL, MPOS, etc., are
adjusted by this factor to be shown in user units.
Oscilloscope
The software oscilloscope can be used to trace axis and motion parameters, aid-
ing program development and machine commissioning.
There are four channels, each capable of recording at up to 1000 samples/sec,
with manual cycling or program linked triggering.
The controller records the data at the selected frequency, and then uploads the
information to the oscilloscope to be displayed. If a larger time base value is
used, the data is retrieved in sections, and the trace is seen to be plotted in sec-
tions across the display. Exactly when the controller starts to record the required
data depends upon whether it is in manual or program trigger mode. In program
mode, it starts to record data when it encounters a TRIGGER instruction in a pro-
gram running on the controller. However, in manual mode it starts recording data
immediately.
Controls
The oscilloscope controls are organised into four channel specific control blocks,
followed by the oscilloscope general controls.
In automatic mode the oscilloscope calculates the most appropriate scale when it
has finished recording, prior to displaying the trace. Hence if the oscilloscope is
running with continuous triggering, it will initially be unable to select a suitable
vertical scale. It must be halted and re-started, or used in the manual scaling
mode.
In manual mode the user selects the scale per grid division.
The vertical scale is changed by pressing the up/down scale buttons either side of
the current scale text box (left hand side button decreases the scale, and the
right hand side button increases the scale value.) To return to the automatic scal-
ing mode, continue pressing the left hand side button (decreasing the scale value)
until the word ‘AUTO’ appears in the current scale text box.
Channel Trace Vertical Offset
The vertical offset buttons are used to move a trace verti-
cally on the display. This control is of particular use when
two or more traces are identical, in which case they over-
lay each other and only the uppermost trace will be seen
on the display.
The offset value remains for a channel until the vertical offset reset button is
pressed, or the scrollbar is used to return the trace to its original position.
Vertical Offset Reset
The vertical offset value applied using the vertical offset
scroll bars can be cleared by pressing this vertical offset
reset button.
The button latches on/off. When the button is latched ON
then the vertical offset will automatically rescale each time the oscilloscope dis-
play is redrawn.
Cursor Bars
After the oscilloscope has finished running, and has dis-
played a trace, cursor bars can be enabled. These are dis-
played as two vertical bars, of the same colour as the
channel trace, and initially located at the maximum and
minimum trace location points. The values these represent
are shown below the oscilloscope display, and again the text is of the same colour
as the channel values represented.
The cursor bars are enabled/disabled by pressing the cursor button which toggles
alternately displaying and removing the cursor bars. The bars can then be moved
by positioning the mouse cursor over the required bar, holding down the left
mouse button, and dragging the bar to the required position. The respective max-
imum or minimum value shown below the display is updated as the bar is dragged
along with the value of the trace at the current bar position.
When the cursor bars are disabled, the maximum and minimum points are indi-
cated by a single white pixel on the trace.
Time Base
The required time base is selected using the up/down
scale buttons either side of the current time base scale
text box (left side button decreases the scale, and the
right side button increases the scale value.) The value
selected is the time per grid division on the display.
If the time base is greater than a predefined value, then the data is retrieved
from the controller in sections (as opposed to retrieving a compete trace of data
at one time.) These sections of data are plotted on the display as they are
received, and the last point plotted is seen as a white spot.
After the oscilloscope has finished running and a trace has been displayed, the
time base scale may be changed to view the trace with respect to different hori-
zontal time scales. If the time base scale is reduced, a section of the trace can be
viewed in greater detail, with access provided to the complete trace by moving
the horizontal scrollbar.
Horizontal scrollbar
Once the oscilloscope has finished running and displayed
the trace of the recorded data, if the time base is
changed to a faster value, only part of the trace is dis-
played. The remainder can be viewed by moving the
thumb box on the horizontal scrollbar.
Additionally, if the oscilloscope is configured to record both motion parameters
and plot table data, then the number of points plotted across the display can be
determined by the motion parameter. If there are additional table points not visi-
ble, these can be brought into view by scrolling the table trace using the horizon-
tal scrollbar. The motion parameter trace does not move.
Trigger Button
When the trigger button is pressed the oscilloscope is ena-
bled. If it is manual mode the controller immediately
commences recording data. If it is in program mode then
it waits until it encounters a trigger command in a running
program.
After the trigger button has been pressed, the text on the button changes to
‘Halt’ whilst the oscilloscope is running. If the oscilloscope is in the one-shot
mode, then after the data has been recorded and plotted on the display, the trig-
ger button text returns to ‘Trigger’, indicating that the operation has been com-
pleted.The oscilloscope can be halted at any time when it is running, and the
trigger button is displaying the ‘Halt’ text, by pressing this button.
Status Indicator
The status indicator is located in between the options and configuration reset
buttons. This lamp changes colour according to the current status of the scope, as
follows:
Red oscilloscope stopped.
Black polling controller waiting for it to complete recording the required
data.
Yellow retrieving data from the controller.
Parameter Checks
If analogue inputs are being recorded, then the fastest oscilloscope resolution
(sample rate) is the number of analogue channels in msec ( ie 2 analogue inputs
infers the fastest sample rate is 2msec). The resolution is calculated by dividing
the time base scale value by the number of samples per grid division.
It is not possible to enter table channel values in excess of the controllers maxi-
mum TABLE size, nor to enter a lower oscilloscope table value. Increasing the
samples per grid division to a value which causes the upper oscilloscope table
value to exceed the controller maximum table value is also not permitted.
If the number of samples per grid division is increased, and subsequently the time
base scale is set to a faster value which causes an unobtainable resolution, the
oscilloscope automatically resets the number of samples per grid division.
Display accuracy -
The controller records the parameter values at the required sample rate in the
table, and then passes the information to the oscilloscope. Hence the trace dis-
played is accurate with respect to the selected time base. However, there is a
delay between when the data is recorded by the controller and when it is dis-
played on the oscilloscope due to the time taken to upload the data via the serial
link.
Keypad Emulation
Emulating Channel
The normal operation of the keypad emulation returns the characters as if they
were read from channel #3 with the DEFKEY translation. Alternatively, the Motion
Coordinator can read the characters returned directly from the Keypad using
channel 4. If the emulate #4 codes is selected then the keypad emulation will
return the raw characters.
Note: It is only possible to emulate the default DEFKEY table.
Key Functions
menu keys This is a keypad menu key. Normally it is associated with a message
on the display. This button can only be pressed by clicking the mouse
over it.
function keys This is the keypad function key 1. Normally it has an associated user
1-8 label. This button can be pressed by clicking the mouse over it or
using the ‘1’ - '8' keys in the QWERTY area of the PC keyboard.
number keys This is a keypad number key. It can be pressed by clinking the mouse
over it or using the corresponding number in the numerical keypad of
your PC keyboard.
Y/N keys This is the keypad ‘Y’ and 'N' keys. This is usually used to respond YES
or NO to some question on the display. It can be pressed by clicking
the mouse over it or using the ‘Y’/'N' keys in the QWERTY area of the
PC keyboard.
CLR key This is the keypad ‘CLR’ key. This is usually used to perform some
form of CANCEL operation. It can be pressed by clicking the mouse
over it or using the ‘ESC’ in the QWERTY area of the PC keyboard.
Return key This is the keypad Return key. This is usually used to perform some
form of ACCEPT operation. It can be pressed by clicking the mouse
over it or using the ‘Enter’ in the QWERTY area or numerical keypad
of the PC keyboard.
- key This is the keypad ‘-’ key. This is usually used for entering negative
numbers. It can be pressed by clicking the mouse over it or using the
‘-’ in the QWERTY area or numerical keypad of the PC keyboard.
. key This is the keypad ‘.’ key. This is usually used for entering fractional
numbers. It can be pressed by clicking the mouse over it or using the
‘.’ in the QWERTY area or numerical keypad of the PC keyboard.
arrow keys This is the keypad up arrow key. This is usually used to select
between options on the display. It can be pressed by clicking the
mouse over it or using the appropriate arrow key of the PC keyboard.
centre button This is the keypad centre key.
It can only be pressed by clicking the mouse over it.
Table / VR Editor
The Table and VR Editor tools are very simi-
lar. You are presented with a spreadsheet
style interface to view and modify a range of
values in memory.
To modify a value, click on the existing value
with the mouse and type in the new value and
press return. The change will be immediate
and can be made whilst programs are running.
Options
Range
In both tools you have the option to set the start and end of the
range to view. In the Table view tool the max value displays the
highest value you can read (this is the system parameter TSIZE).
If the range of values is larger than the dialog box can display,
then the list will have a scrollbar to enable all the values to be
seen.
Refresh Button
This screen does not update automatically, so if a Table or VR is
changed by the program you will not see the new value until you
refresh the display.
Jog Axes
This window allows the user to move the axes on the Motion Coordinator.
This window takes advantage of the bi-directional I/O channels on the Motion
Coordinator to set the jog inputs. The forward, reverse and fast jog inputs are
identified by writing to the corresponding axis parameters and are expected to be
connected to NC switches. This means that when the input is on (+24V applied)
then the corresponding jog function is DISABLED and when the input is off (0V)
then the jog function is ENABLED.
The jog functions implemented here disable the fast jog function, which means
that the speed at which the jog will be performed is set by the JOGSPEED axis
parameter. What is more this window limits the jog speed to the range 0..demand
speed, where the demand speed is given by the SPEED axis parameter.
Before allowing a jog to be initiated, the jog window checks that all the data set
in the jog window and on the Motion Coordinator is valid for a jog to be per-
formed.
Jog Reverse
This button will initiate a reverse jog. In order to do this, the following check
sequence is performed:
• If this is a SERVO or RESOLVER axis and the servo is off then set the warning
message
• If this axis has a daughter board and the WatchDog is off then set the warning
message
• If the jog speed is 0 the set the warning message
• If the acceleration rate on this axis is 0 then set the warning message
• If the deceleration rate on this axis is 0 then set the warning message
• If the reverse jog input is out of range then set the warning message
• If there is already a move being performed on this axis that is not a jog move
then set the warning message
If there were no warnings set, then the message “Reverse jog set on axis?” is set
in the warnings window, the FAST_JOG input is invalidated for this axis, the CREEP
is set to the value given in the jog speed control and finally the JOG_REV output is
turned off, thus enabling the reverse jog function.
Jog Forward
This button will initiate a forward jog. In order to do this, a check sequence iden-
tical to that used for Jog Reverse is performed.
Jog Speed
This is the speed at which the jog will be performed. This win-
dow limits this value to the range from zero to the demand
speed for this axis, where the demand speed is given by the
SPEED axis parameter. This value can be changed by writing
directly to this control or using the jog speed control. The scroll bar changes the
jog speed up or down in increments of 1 unit per second
Jog Inputs
These are the inputs which will be associated with the forward
/ reverse jog functions.
They must be in the range 8 to the total number of inputs in
the system as the input channels 0 to 7 are not bi-directional
and so the state of the input cannot be set by the corresponding output.
The input is expected to be ON for the jog function to be disabled and OFF for the
reverse jog to be enabled. In order to respect this, when this is set to a valid input
number, the corresponding output is set ON and then the corresponding REV_JOG
axis parameter is set.
Warnings
This shows the status of the last
jog request. For example, the
screen below shows axis 0 with
IO channel 7 selected. This is
an Input-only channel and
therefore cannot be used in the
jog screen.
Axes
This displays an axis selector box which enables
the user to select the axis to include in the jog
axes display. By default, the physical axes fitted
to the controller will be displayed.
Digital IO Status
This window allows the user
to view the status of all the
IO channels and toggle the
status of the output chan-
nels. It also optionally
allows the user to enter a
description for each I/O line.
Digital Inputs
This shows the total number
of input channels on the
Motion Coordinator.
Digital Outputs
This shows the total number
of output channels on the
Motion Coordinator.
IO Mimic
Input Bank 0-7
This first bank of 8 LEDs shows the status of the dedicated input channels. If an
LED is green then the corresponding input is ON. If an LED is white then the corre-
sponding input is OFF.
Input/Output Banks
These banks of LEDs show the status the bi-directional IO channels. If an LED is
yellow then the corresponding input is ON. If an LED is white then the correspond-
ing input is OFF. Under normal conditions the input status mimics the output sta-
tus, except:
• If this input is connected to an external 24V then it may be on without the
corresponding output being on.
• If the output chip detects an overcurrent situation, then the output chip will
shut down and so the outputs will not be driven, even though they may be
turned on.
If the LED is clicked with the mouse the status corresponding output channel is
toggled, i.e. if the LED is white then the output will be turned on, if the LED is
yellow then the output channel will be turned off.
Note: Cad2Motion and DocMaker are available to download from the Trio Website at
www.triomotion.com.
You can either directly enter the path and program file name in the "File" box, or
use the "Browse" option to open up a standard windows file selector box which
you can use to locate the file on your computer.
Once you have selected the file, it will automatically appear in the External menu
every time you run Motion Perfect 2.
Note: This simply removes the program from the menu. it does NOT affect the original
program on disk!
Control Panel
The control panel appears on the left hand side of the main
Motion Perfect window.
It provides direct links to many of the frequently used
operations within Motion Perfect, in particular the file and
directory functions.
Please Note: Certain Control Panel Features behave differently on controller without a
battery backup. The differences are described later in this section.
Drives Enabled
Drives Disabled
This radio button toggles the state of the enable (watchdog) relay on the control-
ler, going between drives disabled (watchdog off) and drives enabled (watchdog
on).
The LED mimic next to this control shows the status of the error LED on the
Motion Coordinator. If it is yellow then the drives are disabled, if it is grey the
drives are enabled and if it is flashing then there has been a motion error on at
least one axis of the controller.
Axis Status Error
This will normally be greyed out unless a motion
error occurs on the controller.
When an error does occur you can use this button to
clear the error condition.
Program directory
This is a scrollable list of the programs on the con-
troller. The list shows the program name followed
by two optional indicators. The first is a number
which specifies which process that program is run-
ning on. If it is not running then this space is blank.
The second indicator shows the status of the pro-
gram. If it has a tick then the program has been
compiled successfully and is ready to be run. If it
has a cross then there was an error during the com-
pilation of the program and it cannot be run.
If it is blank then it has not been compiled.
If a program name is clicked then it will become the selected program if there are
no programs running. If there are programs running the select will be ignored.
If a program name is double clicked then it will be opened for editing assuming
that there are no programs running. If there are programs running then the editor
will open in read-only mode.
The names of programs which are currently running are displayed in italics.
RED Click on the red button to start the corresponding program running.
The button will turn Green. *
GREEN Click on the green button to stop the corresponding program. The but-
ton will turn red. *
YELLOW Click on the yellow button to single step through the program.
* If the program goes into trace mode, through the use of a trace button, the
selected program step button, the debug option of the program menu, the debug
button on the tool bar or a TRON/STEPLINE command in a program or the terminal
window, then the red/green run button will turn yellow. If the button is clicked
when it is yellow then the program will be stepped one line.
General Options
Selected Program
The text box displays the currently selected pro-
gram and the buttons below, the operations which
can be performed on that program.
From left to right they are:
Run, Step, Stop, Edit and Power Up Mode
Free Memory
Shows the total free memory available on the con-
troller
Motion Stop
Stops all running programs, cancels moves on all
axes and disables the watchdog relay.
Note MOTION STOP is a software function. It is not a substitute for a hardware E_Stop
circuit and should not be used as an emergency stop.
On those controllers without a battery backup such as the MC202, the fixed /
editable radio buttons are replace by a single button labeled "Store Programs into
EPROM".
As the controller does not feature a battery, it is essential that you store your
programs into the EPROM to avoid loss of data.
If the programs in memory have been edited, the button will be highlighted to
remind you to fix into EPROM before exiting from the program
Once you have created a new program it will be added to both the controller and
the Motion Perfect project file. You can now edit the file in Motion Perfect Editor
which will have been started up automatically when the new program was cre-
ated.
Editor Options
Options for the editor are controlled by the Editor Options dialog. This can be
opened by selecting Options/Editor from Motion Perfect’s main menu. The dia-
log allows to user to change the fonts used for screen display and printing, the
colours used for syntax and line highlighting and the spacings used when automat-
ically formatting a program.
Screen Font
This is the font used by Motion
Perfect to display text in the
editor window on the screen.
The font is restricted to fixed
pitch fonts only.
Printer Font
This is the font used by Motion
Perfect to print program list-
ings. The font is restricted to
fixed pitch fonts only.
Colours
Colours can be specified for
the following:
• Normal Text - Text which is
not highlighted using systax
highlighting.
• Screen Background.
• Current Line (background)
- the current line during
debugging.
• Break Line (background) - a
line containing a break
(TRON) command.
• Current Line Break
(background) - a line
containing a break
command which is also the
current line.
• Error Line (background) -
The first line containing a compilation error.
• BASIC key word - A key word in the TrioBASIC language, usually a command or
some type of system variable.
• Comment Text
• Constant Text - text making up a constant value (number).
• Strings
• Label Defenition - where a program label is defined.
When the Print in colour box is checked any printing from the editor will be done
in colour if the printer supports it. Otherwise printing is done in monochrome.
Editor Menus
Program
Save
Normally the program is only saved to disk when the
editor is closed or a program is run, however if you
have modified the program the Save Button will be
available and will force Motion Perfect to save the file
immediately.
Printing
Use Page Setup to set the page mrrgins, Print Setup to configure you printer set-
tings and the Print option to send the program to the printer.
Edit
The edit menu functions are similar to
many other text editors and provide
the standard block cut/copy/paste
operations as well as a simple text
find/replace, and various select and
delete functions.
Find/Replace
The options for the find & replace dialogs are very similar and feature many of
the same options
You should enter the text to search for in the “Find What” box, and if using find
and replace, the text to replace it with in the “Replace With” box.
Normally the “Case Sensitive” search option is not selected, You should only use
this option if you have an exact pattern to match, generally the default option is
best.
GOTO
The Goto option will bring up the following dialog:
A list of labels defined in the program is displayed.
You can either select a label from here, or enter a line
number directly in the “Selected Line” field. Pressing
the the button at the head of one of the columns in
the list will cause the list to be sorted by the values in
that column.
Pressing OK after a selection has been made will cause
the cursor in the editor to jump directly to the begin-
ning of the selected line.
Program Debugger
The Motion Perfect debugger allows you to run a program directly from the editor
window in a special 'trace mode, executing one line at a time (known as stepping)
whilst viewing the line in the window. It is also possible to set breakpoints in the
program, and run it at normal speed until it reaches the breakpoint where it will
stop, and this line of code will be highlighted in the debug window.
When programs are running on the controller, any open editor windows will auto-
matically switch to Debug Mode and will become read-only. Hence, breakpoints
are set in the edit window, and the code viewed in the same window in debug
mode when the program is running.
Breakpoints
Breakpoints are special place markers in the code which allow a particular section
(or sections) of the program to be identified when debugging the code. If a break-
point is inserted, the program will pause at that point and return control to
Motion Perfect where the controller may be interrogated or the program run in
step mode as described above.
To insert a breakpoint, first position the text cursor on the line at which you want
the break to occur, then use either Ctrl-B or the menu item to insert the break-
point.
If the editor option Use inline breakpoints in BASIC programs if available has
been selected and the controller supports inline breakpoints (this is true of most
current controllers) then an inline breakpoint will be inserted. Otherwise the Trio
BASIC instruction TRON is used to mark a breakpoint and TROFF to terminate a
'traced' block.
Note: Inline breakpoints can be added or removed whilst programs are running (or
paused). It is not possible to add or remove TRON breakpoints whilst any
programs are running or are paused.
Running to a breakpoint
A program can be run to the next break point by:
• using the mouse to press the red button
alongside the program name in the list box on
the control panel.
• if it is the currently selected program on the
Motion Coordinator, you can pressing the 'Run' button ( ) on the control
panel/editor tool bar, or by using the keyboard <F5> function key.
• by selecting the 'Debug->Run' menu option
Stopping a Program
If it is necessary to stop the program running before it reaches the breakpoint
then:
• press the green button alongside the program name (running on the
required process) in the list box on the control panel.
• press the stop button ( )on the control panel if the program is
currently selected (this will stop all running copies of the program)
• use the 'Debug-Stop' menu option.
Alternatively all programs can be stopped by pressing the 'Halt' button on the con-
trol panel, or selecting the 'Program' 'Halt all programs' menu option, or using the
<Ctrl><F> key combination.
Running Programs
You can start/stop programs running in one of four ways:
From the control panel
If the program is currently selected (highlighted in
the control panel), you can press the green start
arrow in the "selected program" box.
If you have an editor or debug window open for the program you can use either
the Debug menu or toolbar buttons to start the program running
Run on Process
Run on process runs a program on a specified process. The selected process
number is remembered for when the program is run again from within Motion Per-
fect.
The dialog also has buttons for clearing
the stored process number for the cur-
rent program and for all programs in the
project.
Communications
Set up the default communications device for Motion Perfect 2 to use.
Motion Perfect 2 needs a connection to the controller in order to operate. This
can be an RS-232 serial connection, a USB connection if your controller and PC
have USB ports, an ethernet connection if your controller and PC have ethernet
ports, or PCI if your controller is PCI based. It will normally recognise the ports
installed in your PC and will display these in the Configure Communications win-
dow.
If the port you wish to use is not shown, you need to select the Add Port option
which will select the following dialog.
Most Motion Perfect 2 users will connect via a standard RS-232 serial (COM) port.
Other options include a connection via a high speed Universal Serial Bus (USB)
port, ethernet connection or a controller simulation for offline editing. A PCI
based controller will use the PCI interface
Choose the port options you require and click on the "OK" button to install the
new port.
Changing Communications Parameters
Serial
The default settings for serial communications on
MC2 series controllers is:- 9600 baud, 7 data bits, 2
stop bits, even parity. For MC3 series controllers it
is 34k8 baud, 8 data bits, 1 stop bit, even parity. If
you wish to change these values you can do so with
the configure button in the Configure Communica-
tions dialog.
Note: If you change the port setting to anything other than the default, you may
encounter problems when the controller is reset because it will revert to the
default values.
In order to avoid this your controller will need to set the comms parameters
within an auto-running program. See the SETCOM instruction in the Trio BASIC
reference for further information.
USB
There are no configuration options for USB communications.
Ethernet
You can set the ethernet IP address used by
Motion Perfect to communicate with the con-
troller and also the IP port used. IP port 23 (tel-
net port) is the default.
PCI
There are no configuration options for PCI communications.
Editor Options
The Editor Options dialog allows you to modify the appearance of the Motion Per-
fect 2 editor to suit your own personal taste. You can change both the default
font used and the colours used by the syntax highlighting feature. See the Editor
section for more details
General Options
This dialog allows the user to change a number of options relating to how Motion
Perfect 2 starts up and handles projects.
When you select General Options you will be presented with the following screen.
Diagnostics
This is used to log communications and some of the internal workings of Motion
Perfect as an aid to fault diagnosis. This should not be used except under direc-
tion from Omron as the data logging function has a significant effect on the speed
of operation of Motion Perfect.
Terminal Font
This is used to set the font used in all terminal tool windows.
Program Compare
This is used to specify the external application used to display the differences
CX-Drive Configuration
Not required for operation with Trio controllers.
FINS Configuration
Not required for operation with Trio controllers.
MC Simulation
MC Simulation (MCSim) is a very simple program
designed to run alongside Motion Perfect 2 in the
background. There are no options or configura-
tions to worry about, you just have to run the
program and connect as usual.
Use the Add Port option to select a new port and choose
"Simulation" as the Port Type.
Limitations of MC Simulation
The MCSimulation program does not yet cover all the functionality present in a
real controller. It does allow connection to Motion Perfect for program editing
and the running of programs in the simulated environment. There are some
unsupported TrioBASIC commands (mainly those related to communications
busses such as CAN).
The motion engine built
into the simulation is still
under development
although it will handle all
move types except linked
moves. There is an axis
demand position display
which can be used to moni-
tor the axes when moves
are taking place. This can
be toggled on and off by
selecting View/Axes from
the MCSimulation main
menu. The motion engine
can be enabled/disabled by
checking/unchecking the
the Motion Simulator Ena-
bled check box.
Project Encryptor
Introduction
The Motion Perfect Project Encryptor is a stand alone program running under
MicrosoftTM Windows which encrypts one or more programs in a Motion Perfect
project so that the TrioBASIC source for that program cannot be read. This gives
solution providers a way of protecting their work form possible reverse engineer-
ing attempts by third parties.
Encryption Process
The encryption process uses a “Project Password” to encrypt one or more pro-
grams in a project. The encryption process creates a new project leaving the
original unencrypted version intact. When the encrypted version is loaded onto a
motion coordinator a decryption key is required. This key, which is also gener-
ated by the encryption program, is used by the controller to decrypt the program
for compilation purposes. The decryption key is generated from the “Project
Password” and the serial number of the target motion coordinator and is unique
to that motion coordinator.
Encrypting a Project
Entering the Project Password
When the project encryptor is first started, or when the “Set / Change Project
Password” button is pressed, the Password “Set Project Password” dialog is dis-
played.
The password needs to be entered twice to reduce the chance of an entry error
occurring. For security reasons the password is not displayed in the application’s
main window.
Source Project
The source project is selected, either by entering the full path of the project file
(which has a .prj extension) into the source project text entry box or by using the
browse button (...) to the right of the source project text entry box to open up a
file selection dialog.
Select the source project by clicking on an entry in the disk directory tree.
Destination Project
The destination project (which must be fifferent from the source project) is
selected, either by enterning the full path of the new project directory into the
destination project text entry box or by using the browse button (...) to the right
of the destination project text entry box to open up a directory selection dialog.
Select the parent directory for the project using the disk directory tree and enter
the project name into the project name text entry box.
Encrypting
Click on the Encrypt button to encrypt the project. If it is not enabled then some
of the data required to perform the encryption has not been entered.
CAD2Motion
CAD2Motion is a program designed to allow users to translate CAD generated two
dimensional motion paths into Trio BASIC programs.
The program allows the user to create motion paths in a CAD package such as
AutoCAD and convert them into code executable by a Motion Coordinator. Typi-
cally the path information will be drawn on a single layer in the CAD package and
exported as a DXF file. The DXF file (layer with motion path only) is read into
CAD2Motion to create a program to follow the motion path.
The motion path can be manipulated and edited before being saved as a Trio
BASIC program file which can be loaded on to a Motion Coordinator.
• Can read Industry standard DXF files and TrioBASIC files.
• Outputs files as TrioBASIC programs.
• Graphical display of motion path with full pan and zoom facilities.
• Built in program text editor.
• Program list and graphical display linked together to show correlation between
program code and moves within the motion path.
• Built in tools to mirror, scale, shift, reverse and rotate motion paths.
• Full undo on all tool and editor operations.
• Will handle multiple motion paths (sequences) in the same program.
DocMaker
DocMaker is a Windows application designed to assist in documenting a Trio BASIC
project created with Motion Perfect.
DocMaker analyses the content of the program files in the project. It can be used
to print program listings and to report on the programs (variables, labels, I/O and
VR’s) and on overall I/O and VR usage. There is also a checking routine which does
a quick check on the whole project and flags up possible errors
DocMaker Benefits
• Automatic Analysis of MotionPerfect Project Files
• Highlight potential errors due to labels or variables
• Generates fully cross-referenced reports
• Reformat programs with auto-indenting