0% found this document useful (0 votes)
227 views

10 Motion Perfect 2 PDF

This document discusses the Motion Perfect 2 support software for Trio Motion Technology's Motion Coordinator motion controllers. Motion Perfect 2 provides an interface for configuring controllers, developing application programs, and diagnosing runtime processes. It connects to Motion Coordinators via serial, USB, Ethernet or PCI connections. When first opened, Motion Perfect 2 performs a project check to ensure the programs on the controller match those on the PC. It provides options to save, load, or create new projects to resolve any inconsistencies found.

Uploaded by

wigen001
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
227 views

10 Motion Perfect 2 PDF

This document discusses the Motion Perfect 2 support software for Trio Motion Technology's Motion Coordinator motion controllers. Motion Perfect 2 provides an interface for configuring controllers, developing application programs, and diagnosing runtime processes. It connects to Motion Coordinators via serial, USB, Ethernet or PCI connections. When first opened, Motion Perfect 2 performs a project check to ensure the programs on the controller match those on the PC. It provides options to save, load, or create new projects to resolve any inconsistencies found.

Uploaded by

wigen001
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 84

10

Motion Coordinator Technical Reference Manual

C H A P T E R

SUPPORT SOFTWARE

Support Software 10-1

chap 10.indd 1 30/06/2008 15:35:54


Trio Motion Technology

10-2 Support Software


Motion Coordinator Technical Reference Manual

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.

Support Software 10-3


Motion Perfect 2
Trio Motion Technology

System Requirements:
The following equipment is required to use Motion Perfect 2.

PC

Minimum Specification Recommended


CPU Pentium class processor, oper- Pentium class processor, oper-
ating at 300MHz ating at 1GHz
RAM 64 Mb 256Mb
Hard disk space 20 Mb 20 Mb
Windows 98, Windows ME, Windows 2000 or Windows XP.
Windows 2000 or Windows XP
Display 800 x 600 1024 x 768
256 colours 24-bit colour
Communications Single RS232 Serial Port RS232 serial port,
USB port

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

10-4 Support Software


Motion Perfect 2
Motion Coordinator Technical Reference Manual

Connecting Motion Perfect to a controller


Motion Perfect can be connected to the Motion Coordinator using a serial connec-
tion, USB, Ethernet or PCI depending on the interface(s) fitted to the controller. A
suitable serial cable can be supplied by Trio Motion Technology. Motion Perfect
may use any the standard serial ports on a PC, COM1 to COM31.
If you wish to edit a project but do not have a controller connected to your PC, it
is possible to edit off-line by connecting to a ‘virtual’ controller running on your
PC. See the information on the MCSimulation at the end of this chapter.

Running Motion Perfect 2 for the First time


Turn your PC on and enter Windows. Make sure the Motion Coordinator is turned
on and then launch Motion Perfect. During initialisation you will see a splash
screen such as the one below.

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.

Support Software 10-5


Connecting Motion Perfect to a controller
Trio Motion Technology

Motion Perfect 2 Projects


One of the keys to using Motion Perfect is to understand its concept of a
"Project". The project facilitates the application design and development process,
by providing a disk based copy of the multiple controller programs, parameters
and data which may be used for a single motion application. Once the user has
defined a project, Motion Perfect works behind the scenes automatically main-
taining consistency between the programs on the controller and the files on the
PC. When creating or editing programs on the controller they are automatically
duplicated on the PC which means you do not have to worry about loading or sav-
ing programs and you can be confident that next time you connect to the control-
ler you will have the correct information on your PC .

Project Check Window


Whenever you connect to the con-
troller, Motion Perfect will perform
a project check to compare the
programs on the controller with
those defined in the current project
on the pc. During the project check
a window similar to the one below
will be displayed. If the projects
match then you will see a "project
checked ok" message and an OK
button to continue. If however
there is any inconsistency between
the controller and the PC, the dis-
play will feature a number of addi-
tion options, shown below.
You can force Motion Perfect to
perform a project check at any time
with the "Check Project" option
from the project menu. (Ctrl+Alt+P)

10-6 Support Software


Motion Perfect 2 Projects
Motion Coordinator Technical Reference Manual

Project Check Options

Save Save the controller contents to disk.


If you have never connected with this controller before, and therefore
do not have the project on your PC, or if there in an inconsistency in the
project check and you are sure that the project on the controller is the
correct version, then select SAVE to copy the programs on the controller
to disk.
Note: This will of course overwrite any programs already in the PC copy
of the project. If you are unsure which is the correct versiom, you
should save the project with a new name to avoid overwriting any exist-
ing project programs on the PC.

Load Load the PC files onto the controller


If you are uploading a complete project from the PC to the controller,
or the project check fails and you are sure the version on your PC is cor-
rect, then you should use this option to upload the entire project from
the PC to the controller.
Note: The entire contents of the programs on the controller will be
erased. If you are unsure, SAVE the controller contents first!

Change Change the project on the PC to compare with..


If you have been working on more than one project, the project on the
controller may not match the 'last project' remembered by Motion Per-
fect. If this is the case you can use this option to select another project
on the PC. Once you select an alternative, Motion Perfect will perform a
fresh project check and the above process will be repeated.

Support Software 10-7


Motion Perfect 2 Projects
Trio Motion Technology

New Create a new project


The controller contents will be erased and a new project created on the
PC. You will be prompted to select a directory and project name.
When you create a new project, Motion Perfect will make a new direc-
tory with the project name, and within that directory a project file with
the same name (the .PRJ extension is added to the filename).

10-8 Support Software


Motion Perfect 2 Projects
Motion Coordinator Technical Reference Manual

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.

Support Software 10-9


Motion Perfect 2 Projects
Trio Motion Technology

The Motion Perfect Desktop

Main Menu Standard Windows menu to access all features of the


Motion Perfect application.
Toolbar Shortcut buttons to access the Motion Perfect tools
Control Panel Displays the current controller contents and provides
controls for interrogating the controller status, running /
editing programs
Desktop Workspace This area is used to display the user windows and tools
Controller Messages Status and error messages reported by the controller
Status Bar Information about the current project and controller con-
nection.

10-10 Support Software


The Motion Perfect Desktop
Motion Coordinator Technical Reference Manual

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.

Support Software 10-11


The Motion Perfect Desktop
Trio Motion Technology

Controller Menu

The controller menu contains the following items:


Connect Connect to the controller and start the project manager. This is
only available if Motion Perfect is currently disconnected from
the controller.
Disconnect Disconnect from the controller, and stop using the project tools.
Only available if Motion Perfect 2 is currently connected to the
controller.
Connect to Connect to the controller simulator and start the project man-
Simulator ager. The controller simulator is started if it is not already run-
ning. This is only available if Motion Perfect is currently
disconnected from the controller.
Reset Perform a software-reset ( EX ) on the controller. This will
Controller cause Motion Perfect 2 to disconnect from the controller
Recover Reset the controller and restore the programs which were previ-
Project from ously stored in the EPROM
EPROM
Controller Display hardware and system software configuration data for the
Configuration controller.

10-12 Support Software


The Motion Perfect Desktop
Motion Coordinator Technical Reference Manual

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.

Support Software 10-13


The Motion Perfect Desktop
Trio Motion Technology

Controller Configuration
This screen interrogates the hardware and displays the configuration information
reported back by the controller.

Looking at the example screen shown here from top to bottom:


Controller: We are connected to a Motion Coordinator MC224
Software The controller is running version 1.64 (development version 69)
Version: of the system software.
Servo Period: The controller is running with a control servo period of 1000µs.
Axis Types A list of the types of all available axes.
Comms Boards If the controller is fitted with any of the extended / communi-
cations daughter boards, that capability will be indicated here.
I/O The channel range available for each type of I/O both digital
and analogue. Remember that on many Motion Coordinators the
digital channels are shared, i.e. if Output 15 is available, then it
implies that Input 15 is also available and shares the same con-
nector.

10-14 Support Software


The Motion Perfect Desktop
Motion Coordinator Technical Reference Manual

CAN I/O Status


This shows the status of the built-in CAN port on a Motion Coordinator and any
CAN I/O modules connected to it.

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.

Support Software 10-15


The Motion Perfect Desktop
Trio Motion Technology

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.

10-16 Support Software


The Motion Perfect Desktop
Motion Coordinator Technical Reference Manual

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:

Support Software 10-17


The Motion Perfect Desktop
Trio Motion Technology

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.

10-18 Support Software


The Motion Perfect Desktop
Motion Coordinator Technical Reference Manual

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.

Feature Code File


Motion Perfect stores all of the Feature Enable Codes of which it is aware in a file
called "FeatureCodes.TFC". By default this file is located in the same directory as
the Motion Perfect 2 executable file.

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.

Support Software 10-19


The Motion Perfect Desktop
Trio Motion Technology

Memory Card Support


This applies to controllers which are fitted with a socked for an SD, or Micro-SD
memory card. It also applies to older controllers which have flashstick socket
which, if the system firmware is recent enough, can use a Micro-SD memory card
in a special adaptor.
Memory card support is accessed using “Controller / Memory Card” from the
Motion Perfect main menu. The Memory Card dialog has a directory tree, a file
list and some action buttons. When the dialog is first displayed it shows the root
directory of the memory card. Double clicking on a directory will expand show (if
hidden) or hide (if visible) any subdirectories. The file list always shows the con-
tents (files only) of the directory selected in the directory tree .
The action buttons allow opera-
tions to be performed on the
selected directory or file. Applica-
ble buttons are highlighted when a
directory or file is selected.

The operations performed by the buttons is as follows:


New Directory: Creates a new subdirectory on the card in the directory selected.
Load Program File: Loads the selected program from the card onto the controller.
Save Program File: Saves a program file from the controller into the directory currently selected on
the card.
Load Project: Loads the project selected on the card onto the controller.
Save Project: Saves the project on the controller into the directory currently selected on the
card.
Delete Program File: Delete the program file currently selected on the card.
Delete Directory: Deletes the selected directory from the card.

10-20 Support Software


The Motion Perfect Desktop
Motion Coordinator Technical Reference Manual

Loading New System Software


Motion Coordinators feature a flash EPROM for storage of both user programs and
the system software. From Motion Perfect 2 it is possible to upgrade the software
to a newer version using a system file supplied by Trio.
NOTE: We do not advise that you load a new version of the system software unless you
are specifically advised to do so by your distributor or by Trio.

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:

Filename Controller Type


A*.OUT MC2
B*.OUT MC204
C*.OUT MC216
E*.OUT Euro205
F*.OUT MC202
H*.OUT MC206
I*.OUT MC224
J*.OUT PCI208
K*.OUT Euro205x
M*.OUT MC206X

Support Software 10-21


The Motion Perfect Desktop
Trio Motion Technology

Filename Controller Type


Q*.OUT Euro209
MC302K*.S37 MC302-K
MC302L*.S37 MC302-L
MC302X*.S37 MC302-X

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:-

When the download is complete, a checksum is performed to ensure that the


download process was successful. If it saw you will be presented with a confirma-
tion screen and asked if you wish to store the software into EPROM.
When you press Yes, the controller will take a few moments to fix the project into
the EPROM and you can then continue as normal.
At this point you can check the controller configuration to confirm the new soft-
ware version.

10-22 Support Software


The Motion Perfect Desktop
Motion Coordinator Technical Reference Manual

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

In order to unlock the controller you need


to enter the same numeric code which
was used to lock it. Once the unlock code
is entered it will be possible to gain full
access to the programs in memory.

Support Software 10-23


The Motion Perfect Desktop
Trio Motion Technology

Motion Perfect Tools


The Motion Perfect tools can be accessed from either the Tools Menu or the Tool-
bar buttons

10-24 Support Software


Motion Perfect Tools
Motion Coordinator Technical Reference Manual

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.

Support Software 10-25


Motion Perfect Tools
Trio Motion Technology

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.

10-26 Support Software


Motion Perfect Tools
Motion Coordinator Technical Reference Manual

In the Motion Perfect axis parameter screen


the AXISSTATUS parameter is displayed as a
series of characters, ocyxehdrfmaw.

These characters represent AXISSTATUS bits


in order, as follows:-
char status bit
w Warning FE Range
a Drive Comms Error
m Remote Drive Error
f Forward Limit
r Reverse Limit
d Datum Input
h Feed Hold Input
e Following Error
x Forward Soft Limit
y Reverse Soft Limit
c Cancelling Move
o Encoder Overcurrent

Support Software 10-27


Motion Perfect Tools
Trio Motion Technology

Parameter Screen Options


Select Axes
This shows a dialog that allows the user to select
the axes for which the data will be displayed.
The axes set by the last Create Startup, Jog Axes
window or Axes Parameters window will be dis-
played by default.
Refresh Display
In order to minimise the load placed upon the con-
troller communications, the parameters in the bank
1 section are only read when the screen is first dis-
played or the parameter is edited by the user. It is
possible that if a parameter is changed in a user
program then value displayed may be incorrect.
The refresh button will force Motion Perfect to
read the whole selection again.
Note If there is any possibility that a program has changed any of the parameters
then you should ensure that your refresh the display before making changes.

10-28 Support Software


Motion Perfect Tools
Motion Coordinator Technical Reference Manual

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.

Support Software 10-29


Motion Perfect Tools
Trio Motion Technology

Controls
The oscilloscope controls are organised into four channel specific control blocks,
followed by the oscilloscope general controls.

Oscilloscope Channel Controls


Each oscilloscope channel has the following channel spe-
cific controls organised in each of four ‘channel control
blocks’ surrounded by a coloured border which indicates
the colour of this channels trace on the display.
There are parameter list box / axis list box / vertical scale up-down buttons/ ver-
tical offset scrollbar/ vertical offset reset button and cursor bars on-off button
controls per scope channel.
Parameter
The parameters which the oscilloscope can record and dis-
play are selected using the pull-down list box in the upper
left hand corner of each channel control block. Depending
upon the parameter chosen, the next label switches
between ‘axis’ or ‘ch’ (channel). This leads to the second
pull-down list box which enables the user to select the required axis for a motion
parameter, or channel for a digital input/output or analogue input parameter. It
is also possible to plot the points held in the controller table directly, by selecting
the ‘TABLE’ parameter, followed by the number of a channel whose first/last
points have been configured using the advanced options dialog. If the channel is
not required then ‘NONE’ should be selected in the parameter list box.
Axis / Channel Number
A pull-down list box which enables the user to select the
required axis for a motion parameter, or channel for a dig-
ital input/output or analogue input parameter. The list
box label switches between being blank if the oscilloscope
channel is not in use, ‘axis’ if an axis parameter has been
selected, or ‘ch’ if a channel parameter has been selected.
Vertical Scaling
The vertical scale (units per grid division on the display)
are selected per channel, and these can be configured in
either automatic or manual mode.

10-30 Support Software


Motion Perfect Tools
Motion Coordinator Technical Reference Manual

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.

Support Software 10-31


Motion Perfect Tools
Trio Motion Technology

When the cursor bars are disabled, the maximum and minimum points are indi-
cated by a single white pixel on the trace.

Oscilloscope General Controls


The oscilloscope general controls appear at the bottom
left of the oscilloscope window. From here you can con-
trol such aspect as the time base, triggering modes and
memory used for the captured data.

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.

10-32 Support Software


Motion Perfect Tools
Motion Coordinator Technical Reference Manual

One Shot / Continuous Trigger Mode


Button Raised = One Shot Trigger Mode
In one-shot mode, the oscilloscope runs until it has been
triggered and one set of data recorded by the controller,
retrieved and displayed.

Button Pressed = Continuous Trigger Mode:


In continuous mode the oscilloscope continues running and retrieving data from
the controller each time it is re-triggered and new data is recorded. The oscillo-
scope continues to run until the trigger button is pressed for a second time.

Manual/Program Trigger Mode


The manual/program trigger mode button toggles between
these two modes. When pressed, the oscilloscope is set to
trigger in the program mode, and two program listings can
be seen on the button. When raised, the oscilloscope is set
to the manual trigger mode, and a pointing hand can be
seen on the button.

Button Raised = Manual Trigger Mode:


In manual mode, the controller is triggered, and starts to record data immedi-
ately the oscilloscope trigger button is pressed.

Button Depressed = Program Trigger Mode:


In program mode the oscilloscope starts running when the trigger button is
pressed, but the controller does not start to record data until a TRIGGER instruc-
tion is executed by a program running on the controller. After the trigger instruc-
tion is executed by the program, and the controller has recorded the required
data. The required data is retrieved by the oscilloscope and displayed.
The oscilloscope stops running if in one-shot mode, or it waits for the next trigger
on the controller if in continuous mode

Support Software 10-33


Motion Perfect Tools
Trio Motion Technology

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.

Reset Oscilloscope Configuration


The current scope configuration (the state of all the con-
trols) is saved when the scope window is closed, and
retrieved when the scope window is next opened. This
removes the need to re-set each individual control every
time the scope window is opened.
The configuration reset button (located at the bottom right hand side of the
scope control panel) can be pressed to reset the scope configuration, clearing all
controls to their default values.

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.

10-34 Support Software


Motion Perfect Tools
Motion Coordinator Technical Reference Manual

Advanced Oscilloscope Configuration Options


When the options button is pressed the advanced oscilloscope configuration set-
tings dialog is displayed, as shown below. Click the mouse button over the various
controls to reveal further information.

Samples per division


The oscilloscope defaults to recording five points per horizontal (time base) grid
division. This value can be adjusted using the adjacent scrollbar.
To achieve the fastest possible sample rate it is necessary to reduce the number
of samples per grid division to 1, and increase the time base scale to its fastest
value (1 servo period per grid division).
It should be noted that the trace might not be plotted completely to the right
hand side of the display, depending upon the time base scale and number of sam-
ples per grid division.

Support Software 10-35


Motion Perfect Tools
Trio Motion Technology

Oscilloscope Table Values


The controller records the required parameter data values in the controller as
table data prior to uploading these values to the scope. By default, the lowest
oscilloscope table value used is zero. However, if this conflicts with programs run-
ning on the controller which might also require this section of the table, then the
lower table value can be reset.
The lower table value is adjusted by setting focus to this text box and typing in
the new value. The upper oscilloscope table value is subsequently automatically
updated (this value cannot be changed by the user), based on the number of
channels in use and the number of samples per grid division. If an attempt is made
to enter a lower table value which causes the upper table value to exceed the
maximum permitted value on the controller, then the original value is used by the
oscilloscope.

Table Data Graph


It is possible to plot controller table values directly, in which case the table limit
text boxes enable the user to enter up to four sets of first/last table indices.

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.

General Oscilloscope Information


Displaying Controller Table Points -
If the oscilloscope is configured for both table and motion parameters, then the
number of points plotted across the display is determined by the time base (and
samples per division). If the number of points to be plotted for the table parame-
ter is greater than the number of points for the motion parameter, the additional
table points are not displayed, but can be viewed by scrolling the table trace
using the horizontal scrollbar. The motion parameter trace does not move.

10-36 Support Software


Motion Perfect Tools
Motion Coordinator Technical Reference Manual

Data Upload from the controller to the oscilloscope -


If the overall time base is greater than a predefined value, then the data is
retrieved from the controller in blocks, hence the display can be seen to be
updated in sections. The last point plotted in the current section is seen as a
white spot.
If the oscilloscope is configured to record both motion parameters, and also to
plot table data, then the table data is read back in one complete block, and then
the motion parameters are read either continuously or in blocks (depending upon
the time base).
Even if the oscilloscope is in continuous mode, the table data is not re-read, only
the motion parameters are continuously read back from the controller.

Enabling/Disabling of oscilloscope controls -


Whilst the oscilloscope is running all the oscilloscope controls except the trigger
button are disabled. Hence, if it is necessary to change the time base or vertical
scale, the oscilloscope must be halted and re-started.

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.

Support Software 10-37


Motion Perfect Tools
Trio Motion Technology

Keypad Emulation

The keypad requires one of the user communications channels,


and so you will be prompted for the channel to use.
If the specified channel is already in use, either by another
keypad or a terminal window, the window will not open. Once
a channel has been reserved then the keypad will be shown.
In the Trio BASIC program the channel definition for the com-
mands that are associated with the Keypad must be changed
from 3 (or 4) to the channel that corresponds with the channel
selected for the emulation. We recommend that the channel
assignment be made through a variable, so when time comes to run the program
on the real machine, only one program change will be required.
example: kpd=5
PRINT #kpd, "Press any key.."

10-38 Support Software


Motion Perfect Tools
Motion Coordinator Technical Reference Manual

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.

Support Software 10-39


Motion Perfect Tools
Trio Motion Technology

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.

10-40 Support Software


Motion Perfect Tools
Motion Coordinator Technical Reference Manual

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.

Support Software 10-41


Motion Perfect Tools
Trio Motion Technology

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.

10-42 Support Software


Motion Perfect Tools
Motion Coordinator Technical Reference Manual

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.

Support Software 10-43


Motion Perfect Tools
Trio Motion Technology

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.

10-44 Support Software


Motion Perfect Tools
Motion Coordinator Technical Reference Manual

Checking the Show Descrip-


tion check box will toggle
between dsecriptions on, and
descriptions off. Descrip-
tions are stored in the
project file

Support Software 10-45


Motion Perfect Tools
Trio Motion Technology

Analogue Input Viewer


The analogue input viewer is
only available if the system
has analogue inputs. It dis-
plays the input values of all
analogue inputs in the system
using a bar-graph with
numeric display.

10-46 Support Software


Motion Perfect Tools
Motion Coordinator Technical Reference Manual

Linking to External Tools


The EXTERNAL menu in Motion Perfect allows you to run
other programs directly from the main Motion Perfect
menu. In our example shown here, the menu has been con-
figured to launch two other Trio applications, CAD2Motion
and DocMaker. Further information on these applications is
given at the end of this chapter.

Note: Cad2Motion and DocMaker are available to download from the Trio Website at
www.triomotion.com.

Configuring Items on the External menu


Clicking on the Configure item will bring up a list of all installed applications and
from here we can add or delete items from this list.

Adding a new programs to the menu


Clicking on the Add button will open the following dialog:

Support Software 10-47


Linking to External Tools
Trio Motion Technology

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.

Removing program items from the menu


To delete a program from the External menu, you simply need to click on the pro-
gram name in the list and press the Delete button.

Note: This simply removes the program from the menu. it does NOT affect the original
program on disk!

10-48 Support Software


Linking to External Tools
Motion Coordinator Technical Reference Manual

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.

Control Panel Features


Fixed/Editable radio buttons
When the project is “fixed”, the programs are cop-
ied to the Flash EPROM on the Motion Coordinator,
the Motion Coordinator is set to run from EPROM
and the programs cannot be modified by Motion
Perfect. Usually this is done when the machine programs are completed. The
Flash EPROM provides a reliable permanent storage for the programs.
Drives radio button

Drives Enabled

Support Software 10-49


Control Panel
Trio Motion Technology

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.

10-50 Support Software


Control Panel
Motion Coordinator Technical Reference Manual

Right clicking on an entry in the program


list causes a pop-up menu to appear allow-
ing easy access to operations commonly
performed on programs. The right click
operation highlights the entry in the pro-
gram list under the cursor whilst the pop-up
menu is visible. It reverts to the program
which is currently selected on the control-
ler when the menu is closed.
Run buttons

The run buttons provide short cut keys for


running, stopping and single stepping programs.
They can be in one of three states, red, green or
yellow.

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.

Support Software 10-51


Control Panel
Trio Motion Technology

General Options

Show Controller Configuration

Show a full directory of all programs in memory

Create a New Program. Same as the Program menu item.

HALT - Stop all programs which are running

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.

Control Panel Variations for Motion Coordinators without


battery backup

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.

10-52 Support Software


Control Panel
Motion Coordinator Technical Reference Manual

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

Support Software 10-53


Control Panel
Trio Motion Technology

Creating and Running a program


In order to create a new program on the controller, you must first have an active
project. If you have already connected to the controller then you can use the
default project which was created at this time.
You will be presented with a program selector dialog and prompted to enter a
name for your program file. It is a good idea to make this name representative of
the task performed by the program, for example “mmi”, “motion”, “logic” or
something similar. In the following example, we will add a program called “test”
to the current project.

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.

10-54 Support Software


Creating and Running a program
Motion Coordinator Technical Reference Manual

The Motion Perfect Editor


You can start the Editor from the main Program
Menu, the Edit button in the program section of
the control panel or by right clicking in an entry in
the control panel program list and selecting Edit
from the pop-up menu.
If you launch the editor from the control panel it
will start immediately. From the program menu Program Section of the
Control Panel
you will first be prompted with a program selector
dialog to confirm the file you wish to edit.
The Motion Perfect Editor is designed to operate in a similar manner to any sim-
ple text editor found on a PC. Standard operations such a block editing functions,
text search and replace and printing are all supported and conform to the stand-
ard Windows shortcut keys. In addition it provides TrioBASIC syntax highlighting,
program formatting and program debugging facilities.

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.

Support Software 10-55


Creating and Running a program
Trio Motion Technology

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.

10-56 Support Software


Creating and Running a program
Motion Coordinator Technical Reference Manual

• Label Reference - where a jump or branch (GOTO, GOSUB etc.) in program


execution is required. The jump or branch changes the execution point to the
place where the label is defined.
Format
The format options affect text
entry and the automatic refor-
matting preformed by Motion
Perfect.
For automatic reformatting
the code start column and the
tab width are specifiable. As
label definitions always start
in column 0, the code start
column can be used to indent
all lines containing code thus
making label definitions
clearer.
The when Auto tab on enter
check box is checked pressing
the “enter” key will automati-
cally indent the next (new) line to the same position as the current one.
Other.
The other options cover things
which do not easily fit into
any of the above categories.
When the Show long variable
name warnings box is
checked, the editor will give a
warning if a variable name
exceeds the maximum number
of characters which the con-
troller checks for uniqueness
of variable names (currently
16).
When the Use inline break-
points in BASIC programs if
available box is checked, the
debugger uses inline break-
points which the controller inserts without modifying the program. If the box is
not checked then the debugger inserts a TRON statement into the program. The
advantage of inline breakpoints is that, because they do not actually modify the
program, they can be inserted whilst the program is running (or paused).

Support Software 10-57


Creating and Running a program
Trio Motion Technology

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.

10-58 Support Software


Creating and Running a program
Motion Coordinator Technical Reference Manual

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.

Support Software 10-59


Creating and Running a program
Trio Motion Technology

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.

10-60 Support Software


Creating and Running a program
Motion Coordinator Technical Reference Manual

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.

Support Software 10-61


Program Debugger
Trio Motion Technology

Stepping Through a program


To commence stepping a program:
Use the mouse to press the yellow button alongside
the required program name in the list box on the
control panel
if the required program is currently selected, press
the 'Step' button on the control panel( ) or use
the menu item 'Debug-Step line'
The currently executing line of code is indicated in the debug window by high-
lighting it with a green background, and a breakpoint is highlighted with a red
background.
To continue stepping the program, repeatedly press the yellow button alongside
the program name in the list box on the control panel, or press the 'Step' button
or the 'F8' function key if the program required is currently selected on the Motion
Coordinator.

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.

10-62 Support Software


Program Debugger
Motion Coordinator Technical Reference Manual

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.

Switching a running program into trace mode


A running program can enter trace (stepping) mode by pressing the yellow button
alongside the required program name in the list box on the control panel, or the
'Step' button if the required program is currently selected on the Motion Coordi-
nator.

Support Software 10-63


Program Debugger
Trio Motion Technology

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.

From the program list


Pressing the red button to the left of the program
name in the list will start it running, the button will
change to green and it will then function as a stop
button for the same task.

From the editor toolbar

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

From the Program Menu


The program menu provides us with a
slightly different option when running the
program as we are presented with a pro-
gram selector box which includes an
option to choose which task we want to
run the program on

10-64 Support Software


Running Programs
Motion Coordinator Technical Reference Manual

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.

Support Software 10-65


Running Programs
Trio Motion Technology

Making programs run automatically


Set Powerup Mode
It is possible to make the programs on the controller run automatically when the
system first starts up. From the Program Menu, select “Set Powerup Mode” to
open the following dialog.

Click on the program you want to


auto run and a small drop-down
list will appear to the right of the
window. If you are happy to let
the controller allocate which task
to run on then you should choose
“default” as the process number,
otherwise you can specify the task
explicitly in the box.

10-66 Support Software


Making programs run automatically
Motion Coordinator Technical Reference Manual

Storing Programs in the Flash EPROM


This is accomplished by selecting the “Fixed”
option in the controller status section of the con-
trol panel, or the “Fix Program Into EPROM”
option from the controller menu.
When the controller is fixed into EPROM, the pro-
grams actually still run from RAM. The informa-
tion stored is copied into RAM when the controller is first started, therefore if the
controller has been switched off for an extended period, or there is any corrup-
tion of the RAM, it will be refreshed with a correct copy of the programs.
When the controller is set to fixed you will not be able to edit any programs. In
order to make changes you must select “Editable” from the control panel or “Ena-
ble Editing” from the controller menu.

Variations for controllers without battery backup


On those controllers without battery backup, such as the MC202, it is essential
that you store your programs into the EPROM to avoid loss of data.

The control panel the fixed / editable radio


buttons are replaced by a single button labelled
"Store Programs into EPROM".

If the programs in memory have been edited, the


button will be highlighted to remind you to fix
into EPROM before exiting the program.

Support Software 10-67


Storing Programs in the Flash EPROM
Trio Motion Technology

Configuring The Motion Perfect 2 Desktop


There are a number of ways in which you can configure Motion Perfect 2 to suit
your requirements. The Options menu provides a number of choices:-

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.

10-68 Support Software


Configuring The Motion Perfect 2 Desktop
Motion Coordinator Technical Reference Manual

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.

Support Software 10-69


Configuring The Motion Perfect 2 Desktop
Trio Motion Technology

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.

Setting the Default Port


You can change the order in which the ports are scanned by the program by
selecting the port in the list and using the up/down arrows to move the items as
required.

Packet Based Communications


Motion Perfect 2 features an enhanced communications protocol which uses a
packet based structure with error checking to significantly improve the reliability
of the serial port communications. Packet communications can only be used over
a serial communications link as other forms of communication have their own
build in packetization or error checking.
In order to use the packet based communications mode you must have system
software 1.49 or higher.

10-70 Support Software


Configuring The Motion Perfect 2 Desktop
Motion Coordinator Technical Reference Manual

Controller message timeout


Certain controller operations may cause the controller to stop communicating for
a few seconds. If you find that your PC seems to disconnect often, you can change
Motion Perfect 2's default timeout value to allow the program to wait for a longer
time before disconnecting.

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.

The check-boxes enable the following features:


Check comm port against project file
Checks the comm port being used against the one in the project file when a
Check Project operation is performed.

Support Software 10-71


Configuring The Motion Perfect 2 Desktop
Trio Motion Technology

Check controller type against project file


Checks the type of the connected controllerg used against the one in the project
file when a Check Project operation is performed.
Restore desktop on reconnect
If this option is selected, the program will attempt to automatically save the
desktop layout when disconnecting from the controller.
When you reconnect, Motion Perfect 2 will automatically restore the last desktop
layout saved.
Auto EPROM if no Battery Backed RAM
If the controller does not feature battery-backed RAM memory and this option is
selected, the program will attempt to automatically save the controller memory
to EPROM before disconnecting from the controller.

CAN Drive Options


The CAN Drive Options dialog con-
trolls how Motion Perfect interacts
with CAN based drives. You can
inhibit scanning for drives on any of
the CAN interfaces on the controller
(useful if you have other devices con-
nected to a CAN interface) and select
which drives to look for (currently
only Infranor SMT_DB1 and Infranor
CD1 drives are supported).

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.

10-72 Support Software


Configuring The Motion Perfect 2 Desktop
Motion Coordinator Technical Reference Manual

Program Compare
This is used to specify the external application used to display the differences

between controller and PC versions of a program during the check project /


resolve operation. The standard Motion Perfect installer installs a version of the
GLP licensed program WinMerge to do this but you can choose another program if
you prefer.

CX-Drive Configuration
Not required for operation with Trio controllers.

FINS Configuration
Not required for operation with Trio controllers.

Saving the Desktop Layout


When you have a number of windows open, you can save the layout so that it can
be quickly restored later. Alternatively the desktop can be set to restore auto-
matically on each re-connection by ticking the checkbox under the menu:
Options/General options.
From the Window menu...

Restore Last Desktop


Restores the last desktop which was automatically saved by Motion Perfect 2
when it disconnected from the controller

Support Software 10-73


Configuring The Motion Perfect 2 Desktop
Trio Motion Technology

Restore Saved Desktop


Restore the last desktop saved using the Save Desktop option.
Save Desktop
Saves the current desktop layout to a file on disk
Clear Desktop
Closes all open tool windows.
Note: Intelligent drive configuration windows are not restored

10-74 Support Software


Configuring The Motion Perfect 2 Desktop
Motion Coordinator Technical Reference Manual

Running Motion Perfect 2 Without a Controller


Normally you will run Motion Perfect 2 on-line, that is connected to a controller.
In fact Motion Perfect 2 is designed to operate in this manner and has little func-
tionality without the connection.
In order that you can view or edit your project programs without a controller con-
nected there is a special application to simulate the controller operation and to
allow Motion Perfect 2 to operate in many ways as if a real controller were con-
nected.

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.

Starting MC Simulatiion from Motion


Perfect 2
MC Simulatoion is automatically started (if it is
not already running) when Motion Perfect tries to connect to it. To connect to

MCSimuolation either use the Connect to Simulator tool button or set up


an MCSim port in the connection list.

Support Software 10-75


Running Motion Perfect 2 Without a Controller
Trio Motion Technology

Use the Add Port option to select a new port


and choose "Simulation" as the Port Type.

The new device will normally


appear at the end of the list. Use
the "move up" button to make it
the default option.

Use the Add Port option to select a new port and choose
"Simulation" as the Port Type.

10-76 Support Software


Running Motion Perfect 2 Without a Controller
Motion Coordinator Technical Reference Manual

The new device will normally appear at the


end of the list. Use the "move up" button to
make it the default option.

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.

Support Software 10-77


Running Motion Perfect 2 Without a Controller
Trio Motion Technology

10-78 Support Software


Running Motion Perfect 2 Without a Controller
Motion Coordinator Technical Reference Manual

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.

Support Software 10-79


Project Encryptor
Trio Motion Technology

Selecting Source and Destination Projects


In order to be able to encrypt a project the user must select the project to be
encrypted (source project) and the name and location of the encrypted project
(destination project).

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.

10-80 Support Software


Project Encryptor
Motion Coordinator Technical Reference Manual

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.

Support Software 10-81


Project Encryptor
Trio Motion Technology

Selecting the programs to be encrypted


To select which programs to encrypt tick the check boxes next to the program
names.

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.

10-82 Support Software


Project Encryptor
Motion Coordinator Technical Reference Manual

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.

Support Software 10-83


CAD2Motion
Trio Motion Technology

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

Docmaker Hardware Requirements


• IBM PC or Compatible running Microsoft Windows 98 or higher
• Works with all current Motion Coordinators

10-84 Support Software


DocMaker

You might also like