5. MOTION PERFECT V3
Introduction to Motion Perfect 3
Motion Perfect 3 is an Microsoft Windows™ based application for the PC, designed to be used in conjunction with Trio Motion Technology’s Series 4 Motion Coordinator range of multi-tasking motion controllers.
Motion Perfect 3 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
PC
A PC with the following specifications is required to run Motion Perfect 3:
Due to limitations in some of the third party libraries used, Motion Perfect 3 is only available as a 32 bit application. This will however run on 64 bit Microsoft Windows™.
It is recommended that your copy of Microsoft Windows™ has all current service packs and updates applied.
CONTROLLER
The requirements for a controller are different depending on the mode of connection.
DIRECT MODE
To connect in Direct Mode the controller can be almost any Trio series 2, 3 or 4 Motion Coordinator.
TOOL MODE / SYNC MODE
To connect in Tool Mode or Sync Mode the controller must be a Trio series 4 Motion Coordinator running system firmware version 2.0177 or later.
Operating Modes
Motion Perfect 3 has four operating modes:
• Disconnected
• Direct
• Tool Mode
• Sync Mode
The current connection mode is displayed on the right of the status bar at the bottom of Motion Perfect’s main window.
DISCONNECTED
Not connected to a controller. All tools are closed and no communications ports are open.
DIRECT MODE
A direct connection is made to a controller allowing a Terminal tool to be used for direct interaction with the command line on the controller.
TOOL MODE
A multichannel connection is made to a controller allowing the monitoring tools within Motion Perfect to be used. This mode allows the user to see a list of the programs on the controller (so that they can be started and stopped) but does not allow editing of any of the programs.
SYNC MODE
A multichannel connection is made to a controller and a local project on the PC is opened. The contents of the controller and the project are synchronized so that the local copy of all programs matches those on the controller. All of Motion Perfect’s tools are available and programs can be edited. The synchronization process can involve deleting programs or copying them from the controller to the PC of vice versa.
A connection (direct or multichannel) to a controller consists of a single TCP/IP socket connection over Ethernet
Main Window
The “Main Window” is the main user interface of Motion Perfect 3. It acts as a desktop for displaying all controls needed to interact with a single controller.
Because the tools available to the user are different for each operating mode the Main Window tends to take on a different appearance for each mode.
In all operation modes the user has access to the Main Menu and Main Toolbar for commands, although the commands available will depend on the operation mode.
PROJECT
CONTROLLER
EDIT
SEARCH
All search commands apply to the current active editing session
PROGRAM
BUILD/RUN
The commands I n this sub-menu operate on the program open in the current active editing session.
The availability of the commands in the Build/Run sub-menu depends on the type or program being edited and the run state of the program.
TOOLS
WINDOW
HELP
Main Toolbar
The Main Toolbar gives the user quick access to Motion Perfect’s main tools and functions.
Controller Tree
The controller tree can be displayed when Motion Perfect is operating in “Tool Mode” or in “Sync Mode”. It contains information about the controller connected to Motion Perfect and its contents.
The tree consists of a header section and the tree body.
TREE HEADER
The tree header contains basic information about the controller plus some important controls. The top of the header contains a pictorial representation of the controller, the controller model (MC464 in the case above), the system software version number and an “Axis Status” control. The bottom of the header contains three button controls: “Motion Stop”, “Drive Enable” and “Halt Programs”
CONTROLLER INFORMATION
The controller is shown as an icon to the left of the header. The controller model and system software version are displayed towards the top of the header. If the mouse cursor is moved over the icon a tooltip is displayed giving some basic information about the controller.
“AXIS STATUS” CONTROL
This control shows the error status of the controller. It is a passive control when there is no error and is coloured green. When an error occurs the control becomes coloured red and then acts as a button which, when clicked, will clear the error on the controller.
Some errors, notably hardware errors, cannot be cleared by clicking the “Axis Status” button.
“MOTION STOP” BUTTON
Clicking on the “Motion Stop” button stops all currently running programs and empties all the move buffers on the controller causing all motion to stop. Its action is similar to an “Emergency Stop” button but, as it is implemented in software, it is less reliable that a properly implemented hardware emergency stop.
It is important that a proper hardware emergency stop is implemented on any system. This button must not be used as a substitute.
“DRIVE ENABLE” BUTTON
Clicking on this button toggles the state of the drive enable (watchdog output) on the controller. When drives are enabled the background of the button is coloured yellow.
“HALT PROGRAMS” BUTTON
Clicking on this button halts all currently running programs but does not stop and current or buffered moves.
Use the “Motion Stop” button if you want to stop the motion as well as the programs.
TREE BODY
The body of the tree contains information in several expandable sections:
PROGRAMS
These are the programs and files stored on the controller. The following types of item can be stored on the controller:
• TrioBASIC program
• Text file
• MC _ CONFIG program (one only)
• HMI project (not available on all controllers) containing one or more HMI page definitions.
• IEC 61131-3 project (not available on all controllers) containing one or more programs in one or more of the IEC 61131-3 defined program types.
The “Programs” item in the tree has a context menu to allow creation of programs and some operations on all programs as follows:
The program entries in the tree allow the user to run, pause, stop and compile the program by means of a set if icons after each program entry.
When a program is running it has an extra entry in the tree representing the running instance, showing the process number.
AXES: (MAX AXES)
The value of Max Axes is the total number of axes available on the controller, both real and virtual.
When expanded the list of axes shown is that specified by the user. To specify which axes are to be shown, right click on axes and select “Shaw/Hide Axes…” to display the “Show/Hide Axes” dialog and select which axes to display.
MEMORY
This shows various memory related items as follows:
VR
The maximum number of VR variables allowed. Double clicking on this launches the VR Viewer tool.
TABLE
The size (in values) of the TABLE memory area. Double clicking on this launches the Table Viewer Tool.
LOCAL VARIABLES
Double clicking on this launcher the variable viewer tool.
GLOBALS
Currently not used.
FREE PROGRAM SPACE
The number of bytes of unused memory available for storing programs in.
MODULES
This give a list of the modules connected to a controller. Currently this only supports the local modules of a modular controller such as the MC464.
CONFIGURATION
Shows the current controller configuration and allows the user to change some user configurable features.
Project Tree
The project tree can be displayed when Motion Perfect is operating in “Sync Mode”. It contains information about the current project Motion Perfect.
The tree consists of a header section and the tree body.
TREE HEADER
The tree header contains basic information about the project plus some important controls. The header contains a project icon, the project name, a “New Program” button and a “Delete Item” button.
“MOTION STOP” BUTTON
Clicking on the “Motion Stop” button stops all currently running programs and empties all the move buffers on the controller causing all motion to stop. Its action is similar to an “Emergency Stop” button but, as it is implemented in software, it is less reliable that a properly implemented hardware emergency stop.
It is important that a proper hardware emergency stop is implemented on any system. This button must not be used as a substitute.
PROGRAMS
This section duplicates the functionality of the “Programs” section in the “Controller Tree”
BACKUPS
Every time Motion Perfect synchronizes with a project a backup of the project is made before and after the synchronization operation (the backup after is only made if synchronization has been successful). The tree contains a list of the backups currently stored on the PC.
The “Backups” item in the tree has a context menu as follows:
Each backup entry also has a context menu as follows:
Output Window
The “Output Window” displays the status messages received from the controller.
Solutions
In order to handle systems which contain more than one controller Motion Perfect uses a “Solution” to manage the connections to more than one controller and their associated projects. The solution defines a list of controllers included in the solution. For each controller it also defines a connection used to communicate with the controller and a project associated with it. No two controllers can be associated with the same project. The user can create and edit a solution using the Solution Manager.
SOLUTION MANAGER
The Solution Manager is used to manage a collection of projects (solution) which are used for applications containing multiple controllers. In single applications which contain only one project, Motion Perfect uses a default solution so that the user does not need to use the solution manager.
The default solution cannot contain more than one project.
CONTROLS
LOAD ON STARTUP CHECKBOX
If checked, the solution manager and the current solution will be loaded when Motion Perfect is started.
CHANGE SOLUTION BUTTON
Change to a different solution.
SAVE SOLUTION AS BUTTON
Save the current solution under a new name
ADD CONTROLLER BUTTON
Add a controller (connection) to the solution.
REMOVE CONTROLLER BUTTON
Remove the currently selected controller (connection) from the solution
OPEN WINDOW BUTTON
Open a window for the currently selected controller
CLOSE WINDOW BUTTON
Close the open window for the currently selected controller
CLOSE BUTTON
Close the “Solution Manager” window
CREATING A SOLUTION
• Create a project for one controller as normal.
• Open the “Solution Manager” from the Project section of the main menu. This will display the existing project as part of the “Default Solution”.
• Click on the “Add” button. A warning about multiple controllers will be displayed.
• Clicking on the “OK” button will cause the “Connection Dialog” to be displayed. Configure an appropriate connection for another controller. On closing the “Connection Dialog” you will be prompted to save the solution. A desktop window will appear for the connection to the new controller.
• To associate a project with the new controller, attempt to connect to it in Sync Mode (this may happen automatically depending on the stored state of the connection). The “Controller Project Dialog” will be displayed to allow this.
Project
A Motion Perfect project contains a set of programs and settings which represents the contents of the controller for a given application. Al files relating to a project are stored in a single directory on the PC this is known as the project directory.
PROJECT DIRECTORY
The files contained in the project directory will depend on the programs used in the project. There are three main files in the project directory which all have the same name as the project directory but have different file extensions.
PROJECT FILE (EXTENSION “MPV3PRJ”)
This contains a definition of the contents of the project (programs) and any customization such as axis names.
DESKTOP FILE (EXTENSION “MPV3DSK”)
This contains the desktop layout used when Motion Perfect is connected in sync mode to the controller.
TOOL INTERNAL CONDITIONS (EXTENSION “MPV3IC”)
This contains the internal state of each open tool window when Motion Perfect is connected in sync mode to the controller.
PROGRAM FILES
Program files are also stored in the project directory. The type of each file can be determined by its file extension the most important being .BAS which is used for TioBASIC programs. Each TrioBASIC program may also have a .PRG file of the same name which specifies editor/debugger settings for the program. Some complex types of program (usually handled by an add-in) can have sub-directories which contain their data as well as one or more files in the project directory.
There is also a “Backup” sub-directory in which backups of the project are stored.
WARNING
Although many of the files which form part of the project are text files the user should not edit them directly using a text editor as this may cause compatibility problems between the project and the controller. All changes should be made using Motion Perfect.
Project Check
A project check is performed every time Motion Perfect connects in “Sync Mode” and if the user initiates a project check from the main menu. The programs in the project are checked against those on the controller and if there are any differences the “Resolve Program Differences” dialog is displayed so the user can resolve the differences.
RESOLVING DIFFERENCES
The “Resolve Program Differences” dialog can perform several different operations to resolve differences.
The synchronization operation is carried out when the user clicks on the “Synchronize” button which is only enabled
Once a set of operations has been selected which will resolve all differences.
The synchronization operations available depend on the types of program in the project and on the controller.
It is possible that a program copied from the project onto the controller will still cause a project check failure if the controller supports different keywords to those supported by the controller on which the program was written. This problem can be resolved by saving the copy on the controller into the project or manually resolving the differences.
PROBLEMS LOADING PROGRAMS
Even though it appears that differences can be resolved by loading the project or some of its programs onto the controller it is still possible to get a mismatch between the controller and the project. This is usually due to different TrioBASIC keywords being supported on the controller to those supported on the controller on which the program was written. This can cause variables to become keywords, keywords to become variables or keywords to change.
All the letters in a keyword are always upper case whereas all the letters in a variable name are always lower case.
When this occurs a warning dialog will be displayed to show that the controller has made changes to the program.
The user now has the choice of resolving the differences using the program modifications dialog or cancelling. If you cancel it is then possible to resolve differences by doing another
project check and manually resolving the differences using the “Resolve Differences” tool.
MODIFICATIONS DIALOG
This shows the original program source (on the PC) on the left and the changes made to it on the right. The user can resolve the differences by either using the controller version of the program or by clicking on the “Resolve” button which steps through the differences to allow the used to make a decision for each one using the “Resolve” dialog.
RESOLVE DIALOG
The new value for the word to resolve is automatically filled in using the value obtained from the controller.
The user can type any valid keyword, variable name, or number to replace the word in the source file.
Clicking on “OK” makes the change and clicking on “Cancel” cancels the whole resolution process.
Program Types
Motion Perfect supports several different program types as follows:
Creating a New Program
A new program can be created by Selecting “Program / New” from the main menu or by selecting “New” from the “Programs” item in the controller menu.
The “New Program” dialog is launched. This allows the user to select the type of program required and enter a name. Clicking on “OK” will create the new program.
This is only available while connected in Sync Mode.
Program Editor
The Program Editor is used to edit TrioBASIC program files and text files which form part of a Motion Perfect project and to provide debugging facilities for TrioBASIC programs.
Editing a TrioBASIC program
Editing a text file
The editor performs in a similar way to most modern text editors. Editing functions are available for all supported program/file types, debugging functions and special formatting functions are only available when editing a TrioBASIC program.
EDITING FUNCTIONS
Editing functions are available from the Edit Toolbar:
The available editing functions are as follows and apply to the current program/file being edited:
Some editing functions are available on the Editor Context Menu.
DEBUGGING FUNCTIONS
Debugging functions are available from the Debug Toolbar
The available debugging functions are as follows and apply to the current program being edited:
Some debugging functions are available on the Editor Context Menu.
OPERATION
Although the editor appears to work like any other text editor it has one main difference. Each line of text is sent to the connected controller as it is entered or edited. This means that the controller is always kept up to date with changes. The controller is used to perform syntax checking when editing a TrioBASIC program, removing any possibility that the syntax is checked against out of date rules. All compiling and debugging operations are also carried out on the actual controller.
The general appearance of the editor can be customized using the Program Editor pages in the main Options Dialog.
WATCHING VARIABLES
The values of variables can be watched while a program is running or being stepped. This is done using the “Watch Variables” tool, which can be used to monitor both local and VR variables.
To add a variable to the watch list, select the variable name (including index if a VR) in the editor, then select “Watch Variable” from the context menu or click on the icon in the editor toolbar. Alternatively, if the “Watch Variables” tool is open, select the variable name then drag and drop it into the “Watch Variables” tool.
Connection Dialogue
The connection dialog allows the user to configure a communications interface in order to connect to a controller. Ethernet, Serial, PCI and USB interfaces are supported by Motion Perfect. It is possible to select a communications interface and configure it manually or choose from recently used connections.
RECENT CONNECTIONS
To choose a recent connection, click on the “Recent” button and choose a connection from the drop-down list.
ETHERNET
It is possible to change the server IP address (IP address of the controller) and the IP port on which it communicates.
By default a controller will expect a connection from Motion Perfect to be made on port 23.
SERIAL
It is possible to select the COM interface and the configuration (serial link parameters) from a choice of Slow (9600,e,7,2) and Fast (38400,e,8,1), these being the default settings for series 2 & 3 Trio Motion Coordinators.
PCI
It is possible to select the board number. Board numbers are allocated when the PC is started up and is enumerated between 0 and the one less than the number of Trio PCI cards connected.
USB
It is possible to select the device number. Device numbers are allocated when the PC is started up and when devices are added or removed. It is normally enumerated between 0 and the one less than the number of Trio USB devices connected. Because of the nature of the internal scanning process which enumerates USB devices and the possibility that devices are added or removed after the initial scan has completed, a given device may not always have the same device number.
It is recommended that only one Trio USB device be connected to a PC at any one time.
Initial Connection
To make the initial connection to a controller:
1. Make sure that your controller is powered up and connected to the computer
2. Start Motion Perfect 3. Once it has started up the initial screen should be displayed.
3. Select “ Connect in Direct mode” from the “Controller” menu. As Motion Perfect has not been connected before the “Connection Error” dialog will be displayed.
4. Click on the “OK” button. The “Connection” dialog will then be displayed.
5. Select the communications interface used by your controller (this will usualyl be Ethernet), then enter it’s parameters. For an Ethernet connection this will be the IP address (defailt 192.168.0.250) and the TCP port (default 23).
6. Click on the “Apply & Connect” button. The “Connect” will close and Motion Perfect will go into Direct Mode with an active Terminal tool.
Motion Perfect will remember the last used connection parameters and will automatically try and use them when reconnecting in Direct Mode in the future.
Recent Work Dialogue
The “Recent Work Dialog” lists recently used projects and connections to allow the user to quickly switch to a different, recently used, project or connection. When a project is selected the “Details” pane on the right of the dialog shows the contents of the project, otherwise, if a connection is selected it shows connection details. Clicking on the load button will load the selected project or connect using the selected connection.
Tools
Motion Perfect 3 has several tools which are used to monitor the controller and interact with it. Some tools are built into Motion Perfect, others are implemented as add-ons. The add-on mechanism allows the easy addition of extra tools in the future. Most tools are available in both “Tool Mode” and “Sync Mode”.
BUILT-IN TOOLS
ADD-ON TOOLS
Terminal
The “Terminal” tool allows the user to interact directly with the controller, either with the command line (channel 0) or with user programs (channel 5, 6 or 7). Characters typed on the keyboard are sent to the controller and characters output by the controller are displayed in the terminal window.
TERMINAL MENU
The menu controls terminal logging and scripting.
TERMINAL LOGGING
When logging is active all the data displayed on the terminal is also written to a file. The name of the log file is displayed in the status bar at the bottom of the terminal window.
TERMINAL SCRIPTING (ONLY AVAILABLE ON CHANNEL 0)
INTRODUCTION
Motion Perfect has built in support for simple terminal scripting. This allows the user to write files of commands and then send the file contents to the controller in a single operation. In addition to the commands to be sent to the controller there are some extra commands which are used by Motion Perfect to control the running of the script.
INTERACTION WITH THE CONTROLLER
Command lines are sent to the controller one at a time in sequence. Motion Perfect sends a command then waits to receive a prompt (>>) before sending the next one.
To not wait for a prompt put the two character sequence \& on the end of the line. These extra characters are not sent to the controller.
SCRIPT COMMANDS
Script commands control the running of the script. All script commands start with two colons. The following commands are valid:
e.g.:
::Timeout 55
sets the timeout to 55 seconds
TESTS
Special support has been added in order to enable the use of scripts for testing purposes. The response from a command can be tested by Motion Perfect and the results written to a log file. A test is written on the line after the one whose response is to be tested and consists of a single ^ character followed by a list of alternative responses separated by single | characters. The comparison is done as a string comparison after all leading and training spaces have been removed.
e.g.:
^12.0000|13.0000
gives a PASS if the returned string is “12.0000” or “13.0000”, otherwise a FAIL. The PASS or FAIL state of each test is logged in the log file and a summary of passes and failures is given at the end.
EDITING SCRIPTS
To edit or write a new script, select “Script / Edit” from the terminal window menu.
RUNNING SCRIPTS
To run a script normally, select “Script / Run” from the terminal window menu. This does not produce a log of what has happened.
To run a script with full logging, select “Script/Run logged” from the terminal window menu. The log will contain a full log of what has happened including test results.
To run a script in test mode, select “Script/Run Test” from the terminal window menu. This will produce a log containing only test failures and a PASS/FAIL summary.
CONTEXT MENU
Entries allow the user to clear the terminal display, and copy and paste text in the terminal window
Axis Parameters
The Axis Parameters window enables the user to monitor and change the motion parameters for any axis on the controller. The display is made up of collapsible groups of parameters. This is done to make locating a parameter in the display easer and also allows the hiding of whole groups of parameters so that only parameters of interest are shown. It is also possible to individually show or hide individual parameters.
Parameters which can be edited have the normal edit box background and those which are read-only have a greyed-out background.
VIEWS
There are two main views; filtered view which shows selected parameters (see above) and all parameter view which allows the selection of individual parameters for the filtered view. Normally the filtered view is used. The view is selected by using the “all parameters” toggle button on the left of the window’s toolbar.
The “all parameters” view has a check box next to each parameter and group. If the box is checked then the corresponding parameter or group is displayed in the filtered view, otherwise it is hidden.
EDITING A PARAMETER
To enter a new value foe a parameter:
1. select its cell in the grid
2. type a new value
To edit a parameter:
1. double click on its cell in the grid
Digital I/O Viewer
The digital I/O viewer is used to show the states of the digital inputs and outputs of the controller (both local and remote).
The display divides the I/O address space up into blocks of 8 lines. Usually all the lines in a block are the same type. The types available and their associated colours are shown in the table below:
Type Colour
Input Green
Output Orange
Input/Output Yellow
Virtual Input/Output Cyan
It is possible to change which banks are displayed by clicking on the “Configuration” button
which then displays the configuration dialog.
Using this dialog the user can select which banks of I/O lines to display.
Each i/0 line can be given a description. The description can be shown or hidden by clicking on the “Show/ Hide Descriptions” button
or
.
Analogue I/O Viewer
The analogue input viewer is used to show the values measured on the analogue inputs of the controller (both local and remote).
The tool normally displays inputs selected by the user. This defaults to showing all inputs until the user has selected which inputs to show. The value shown for each input is the raw value decoded by the hardware.
Clicking on the “Show All Inputs” button
in the toolbar toggles the display between the normal (filtered) display and the “All Inputs” display.
In “All Inputs” display mode there is a check box for each input to determine which inputs are displayed in normal mode. When in normal mode only the inputs which are checked will be displayed.
Table Viewer
The Table Viewer tool allows the user to view and edit ranges of TABLE memory.
VIEWING A RANGE
To add a range of TABLE values to the display click on the “New Range” button in the toolbar. This will bring up the “Select Range” dialog to allow the user to specify the range required.
After a range has been added to the viewer it can be edited by clicking on the corresponding range display in the tree (blue numbers), collapsed or expanded by clicking on the corresponding arrow in the tree, or deleted by on the corresponding red cross in the tree.
EDITING A VALUE
A value can be overwritten by clicking on it and entering a new value. A value can be edited by double clicking on it. In both of these cases the value is written to the controller when the “Enter” key is pressed. Pressing the “Esc” key will abort the edit. Changes can be made whilst programs are running.
REFRESHING THE VALUES DISPLAYED
The displayed valued can be updated automatically using periodic polling of the controller or manually when the user clicks on the refresh button
. Automatic refresh is controlled by the “Periodic update” button.
Clicking on the periodic update button changes its state from “Polling”
to “Not Polling”
. The update rate can be changes on the “General” tab of the main application options dialog.
VR Viewer
The VR Viewer tool allows the user to view and edit ranges of VR values.
VIEWING A RANGE
To add a range of VRs to the display click on the “New Range” button in the toolbar. This will bring up the “Select Range” dialog to allow the user to specify the range required.
After a range has been added to the viewer it can be edited by clicking on the corresponding range display in the tree (blue numbers), collapsed or expanded by clicking on the corresponding arrow in the tree, or deleted by on the corresponding red cross in the tree.
EDITING A VALUE
A value can be overwritten by clicking on it and entering a new value. A value can be edited by double clicking on it. In both of these cases the value is written to the controller when the “Enter” key is pressed. Pressing the “Esc” key will abort the edit. Changes can be made whilst programs are running.
REFRESHING THE VALUES DISPLAYED
The displayed valued can be updated automatically using periodic polling of the controller or manually when the user clicks on the refresh button . Automatic refresh is controlled by the “Periodic update” button.
Clicking on the periodic update button changes its state from “Polling”
to “Not Polling”
. The update rate can be changes on the “General” tab of the main application options dialog.
Watch Variables
The “Watch Variables” tool allows the user to look at the values of program internal variables and global variables while a program is running or stepping.
ADDING VARIABLES
The methods of adding variables to be watched is covered in the “Program Editor” section under “Watching Variables”.
VARIABLE INFORMATION
The entry for each variable contains the name of the variable, its present value (blank if not yet read) and its context. The context is either “VR” denoting a global VR variable or the program name and the process on which it is running.
UPDATING
The displayed values can be automatically updated periodically. Periodic updating enabled or disabled by clicking on the “Toggle Periodic Updating” button (
when enabled,
when disabled).
Clicking on the refresh button
will cause the values to be updated regardless of the state of periodic updating.
CHANGING VALUES
Values can be edited by double clicking on the value in the grid and pressing the “Return” key. The act of pressing the “Return” key sends the value to the controller.
Options Dialogue
The options dialog has several pages of options for various tools in Motion Perfect. The page displayed is controlled by a tree control on the left of the dialog.
The following can be selected from the tree:
• General
• Program editor
• Language
• Project synchronization
• Diagnostics
• Axis Parameters Tool
• Plug-ins
Plugin options pages. These depend on which plugins are installed but may include:
• Oscilloscope
• IEC61131-3 Editing
• HMI Editing
Options – Axis Parameters Tool
AXISSTATUS VISUALIZATION
This controls how the AXISSTATUS parameter is displayed in the parameter grid. The parameter can be displayed in one of three ways:
• Legacy Format – This is the same as Motion Perfect 2 and shows each known status bit as an alphabetic character, lower case green for clear, upper case red for set.
• Numeric Set Flag Format – This shows all known set status bits as their bit number. No clear bits are shown.
• Mixed Set Flag Format – This shows all known set bits as an alphabetic character and all unknown set bits as their bit number. No clear bits are shown.
Unknown flag bits can occur when new features are added to a controller
Options - Diagnostics
This page give options for diagnostics functions used to aid Trio Motion Technology in finding and rectifying faults in Motion Perfect.
Diagnostic functions should only be enabled on instruction from Trio Motion Technology as they reduce the application’s performance and can lead to the application being less reliable.
Options – General
Options are available for the following:
TOKEN TABLE CACHING
When “Cache TOKENTABLE response locally” is checked, token table data for each controller type and system version used is stored on the PC. The token data is used by Motion Perfect to check that certain TrioBASIC commands are supported on the controller. If the token table data is not cached locally then it has to be read from the controller every time Motion Perfect connects in Tool Mode or Sync Mode.
Token table caching should be left enabled in order to speed up the connection process. The only time when it may need to be disabled is if special versions of controller system software (provided by Trio Motion Technology) are used on a controller.
DISPLAY CONFIGURATION ON OPENING EMPTY AXIS TOOL
When checked, opening a tool which displays axis date will open an axis selection dialog if no axes have been previously selected.
REFRESH RATES
This allows the user to select the update rates used by various tools and monitoring processes. If a tool is set to update too frequently it may interfere with the operation of other tools due to the limited bandwidth of the communications link,
Options – IEC 61131 Editing
This allows the user to select options for the IEC61131-3 program editors. Some sections are common to all IEC61131-3 editors, others specific to the IEC61131-3 program type.
Options - Language
This allows the user to choose which of the available languages will be used by Motion Perfect to display text in the user interface. English (UK) will always be available, the availability of other languages may vary with application version.
Options – Oscilloscope
This allows the user to change the display parameters used by the oscilloscope including:
• Background colour
• Grid colour and line thickness
• Trace colour, line thickness and data point size
• Cursor colour and line thickness
• Font used to display text
• Scale matching for X/Y plots
• Data set buffering for X/Y plots
Options – Plug-ins
This page lists all the installed plug-ins and allows the user to enable or disable each one by means of a check box.
Options – Program Editor
The program editor options are controlled using three different pages:
PROGRAM EDITOR – GENERAL PAGE
This page specifies the options for automatic assistance whilst editing:
Tab width – the number of spaces to use for tabs
Code start column – the start column for line of TrioBASIC code when auto-formatting (label definition lines always start in column 0).
Auto-tab on enter – When checked enters spaces at the start of the new line to match the start column of the current line.
Long variable names warning – if checked the user is warned if a variable name is longer than the unique name size supported by the controller.
Variable names can be longer than the unique name size but the controller only checks the first
“unique name size” characters for uniqueness.
Keyword assist – If checked the user is presented with a list of possible keywords as a keyword (or variable name) is being typed in.
Command template – If checked, when the user types a command which has parameters in brackets, a template is displayed to remind the user of the parameters.
PROGRAM EDITOR – FONTS PAGE
This page allows the user to specify which font is to be used in the editor (including its weight and size). It also specifies the colours used for editing and debugging including syntax highlighting of TrioBASIC programs.
PROGRAM EDITOR – PRINTING PAGE
This page controls how program listings are printed.
PRINT IN COLOUR
If this is checked then the printout is coloured using the same syntax highlighting colouring scheme as the editor screen display. Otherwise the printout is done in monochrome.
Options – Project Synchronization
This allows the user to select a program to use to compare the difference between the copy a program on the controller and the one in the project. I allows the user to configure any program which can compare text files. A list of common text file comparison programs is given in the drop down list.
Clicking on the “Custom” button will display the “Program Compare custom tool” dialog which allows the user to specify any suitable program already installed on the PC and which command line arguments are to be used.
If you do not have a suitable text file compare program installed on your computer, WinMerge can be downloaded free of charge from winmerge.org
Diagnostics
Motion Perfect has some built-in diagnostics which are designed to provide useful information in diagnosing some communications problems and possibly problems with Motion Perfect functionality. Diagnostic functions should not be used unless requested to do so by Trio Motion Technology, as enabling diagnostics increases the load on the application and can, in some cases, lead to unreliability.
See “Options – Diagnostics”
Jog Axes
The Jog Axes tool allows the user to move the axes on the Motion Coordinator.
This tool 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 performed.
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 identical to that used for Jog Reverse is performed.
JOG SPEED
This is the speed at which the jog will be performed. This window 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. Both real and virtual I/O lines can be used for jogging. The value -1
is shown when no input has been allocated for jogging.
The jog function depends on the state of the jog inputs as follows:
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.
Oscilloscope
The software oscilloscope can be used to trace axis and motion parameters, aiding 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 sections 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 program running on the controller. However, in manual mode it starts recording data immediately.
CONTROLS
There are four groups of controls, one for each of the oscilloscope’s four channels, a group of horizontal function controls and a group to control up to four cursors.
OSCILLOSCOPE CHANNEL CONTROLS
The controls for each of the four channels are grouped together and are surrounded by a coloured rectangle if the channel is ON, or a coloured bar to the left of the group if the channel is OFF. The colour is the same as the trace for that channel.
The group contains controls for channel operating mode, parameter selection and scaling.
PARAMETER
The parameters which the oscilloscope can record and display 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 pulldown 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 digital 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.
OPERATING MODE
The channel operating mode controls how the trace is displayed and scaled
VERTICAL SCALING
In automatic mode the oscilloscope calculates the most appropriate scale when it has finished recording, prior to displaying the trace. The value shown is the value calculated by
the oscilloscope.
In manual mode the user selects the scale per grid division. The vertical scale is changed by pressing the up/down scale buttons on the left side of the current scale text box.
CHANNEL TRACE VERTICAL OFFSET
There are three controls which control the vertical offset of the trace:
The Vertical Offset buttons are used to move a trace vertically on the display. This control is of particular use when two or more traces are identical, in which case they overlay each other and only the uppermost trace will be seen on the display.
The Zero Offset button clears the vertical offset.
The auto-zero button, when active (in the down position), applies automatic vertical offset to the channel. The vertical offset and Zero Offset buttons are disabled (greyed out). This is equivalent toAC coupling on a conventional oscilloscope.
When not active the vertical offset manually set using the Vertical Offset buttons is applied. The vertical offset and Zero Offset buttons are enabled.
OSCILLOSCOPE HORIZONTAL CONTROLS
The oscilloscope horizontal controls appear towards the bottom of the oscilloscope control panel. From here you can control such aspect as the timebase, triggering modes and memory used for the captured data.

































































































