TrioBASIC is multi-tasking programming language used by the Trio multi-tasking Motion Coordinator range of programmable motion controllers. The syntax is similar to that of other BASIC family languages.
A PC running the Microsoft Windows™ operating system is used to develop and test the application programs which co-ordinate all the required motion and machine functions using Trio’s Motion Perfect software. Motion Perfect provides all editing and debugging functionality needed to write and debug applications written in TrioBASIC. The completed application does not require the PC in order to run.
One of the many strengths of TrioBASIC is that a program written for the entry level MC302X Motion Coordinator can be run, with only minimal modification on the highest performance Motion Coordinator, the MC464. This portability extends even to users requiring upgrades for older Motion Coordinators where the core functions of a program written in TrioBASIC over a decade ago will still run on the latest hardware platforms.
All standard program constructs are provided; variables, loops, input/output, maths and conditions. Extensions to this basic instruction set exists to permit a wide variety of motion control facilities, such as single axis moves, synchronised multi-axis moves and unsynchronised multi-axis moves as well as the control of the digital I/O.
All Trio controllers feature TrioBASIC. Multiple programs can be constructed and run simultaneously to make programming of complex applications much easier.
click here for the: TrioBASIC datasheet v2.pdf
An example of TrioBasic is MOVELINK which can be used in synchronization of conveyors, flying shears, thread chasing and taping and coil winding.
In this example, a flying shear cuts a long sheet of paper into cards every 150mm whilst moving at the speed of the material.
The shear is able to travel up to 1.2 metres of which 1m is used in this example.
The paper distance is measured by an encoder, the unit conversion factor being set to give units of metres on both axes.
(Note that axis 7 is the link axis (master axis))
The program for this example is:
MOVELINK(0,150,0,0,7) 'dwell (no movement) for 150mm
MOVELINK(0.3,0.6,0.6,0,7) 'accelerate to paper speed
MOVELINK(0.7,1.0,0,0.6,7) 'track the paper then decelerate
WAIT LOADED 'wait until acceleration movelink is finished
OP(8,ON) 'activate cutter
MOVELINK(-1.0,8.4,0.5,0.5,7) 'retract cutter back to start
WAIT LOADED OP(8,OFF) 'deactivate cutter at end of outward stroke
IEC 61131-3 is a vendor-independent standardised programming language for industrial automation. The standard is already well established in Europe and is rapidly gaining popularity in North America and Asia as the programming standard for industrial control.
The adoption of IEC 61131-3 by the industry is driven by the needs of control and automation designers to reduce the creation time, labour cost, and maintenance of control software.
Using the IEC 61131-3 vendor-independent programming language standard can have a major impact on control projects and applying a standard programming language has a positive impact on the software life-cycle; including specification, software design, testing, installation, operation, and maintenance.
The impact on maintenance is important since control software maintenance, including upgrades, can cost more than the initial programming.
Click here for the Trio Application note on Getting Started with IEC 61131
Click here for the: IEC61131 datasheet v1.pdf
In IEC 61131-3, five standard programming languages are defined, including syntax and semantics, so that once you have learned the five languages, you can use a wide variety of systems based on the standard. Motion Perfect v3 supports 4 of the five languages:
The less popular Instruction List (IL) is not supported because it is less relevant to motion control programming.
Motion Perfect v3 has a full function text and graphical editor with context specific toolbox and variable definitions. The function block editor has drag-and-drop capability to make programming easy and intuitive. User prompts allow first-time users to see exactly what is required when inter-connecting functions and variables.
In de-bug mode, the variable values are shown in place on the diagram, giving immediate feedback to the programmer about the state of the program. Other Motion Perfect v3 tools can be open at the same time as the IEC 61131-3 pages, so inputs, outputs axis parameters and global variables can all be viewed in real-time during the debug process.
A dedicated library of Motion Functions provides the IEC 61131-3 program full access to Trio’s established motion software which has stood the test of time and been proven in thousands of applications. All the functions that are available in TrioBASIC are also accessible from the IEC 61131-3, using any of the supported programming languages. Whether it is simple point to point, interpolated moves or gears and cams, the IEC 61131-3 programmer can do it.
Below is a flying shear example (as used in the TrioBASIC section) using the FDB language.
Each IEC 61131-3 task can be set independently to run at its own tick rate, or to be run continuously. Important tasks that are running fast motion can be set to run at intervals of just a few milliseconds, while less important background tasks can be run with a cycle time of 20, 30, 50 and more msecs.
In this way the whole system can be balanced and cycle times set for best operation. The cyclic processing of IEC 61131-3 tasks is familiar to established PLC programmers, whether using ladder, structured text or function block.