Motion Coordinator
Technical Reference Manual
Trio BASIC Commands 8-59
Input / Output Commands
Example:
A rotating shaft has a cam operated switch which has to be changed for different
size work pieces. There is also a proximity switch on the shaft to indicate TDC of
the machine. With a mechanical cam the change from job to job is time consuming
but this can be eased by using the
PSWITCH
as a software 'cam switch'. The proxim-
ity switch is wired to input 7 and the output is fired by output 11. The shaft is con-
trolled by axis 0 of a 3 axis system. The motor has a 900ppr encoder. The output
must be on from 80° after TDC for a period of 120°. It can be assumed that the
machine starts from TDC.
The
PSWITCH
command uses the unit conversion factor to allow the positions to be
set in convenient units. So first the unit conversion factor must be calculated and
set. Each pulse on an encoder gives four edges which the controller counts, there-
fore there are 3600 edges/rev or 10 edges/°. If we set the unit conversion factor to
10 we can then work in degrees.
Next we have to determine a value for all the
PSWITCH
parameters.
This can all be put together to form the two lines of Trio BASIC code that set up the
position switch:
switch:
UNITS AXIS(0)=10' Set unit conversion factor (°)
REPDIST=360
REP_OPTION=ON
PSWITCH(0,ON,0,11,ON,80,200)
opst:
Selects the state to set the output to, if 1 then output set
ON
else set it
OFF
setpos:
The position at which output is set, in user units
rspos:
The position at which output is reset, in user units
sw
The switch number can be any one we chose that is not in use so for the
purpose of this example we will use number 0.
en
The switch must be enabled to work, therefore this must be set to 1.
axis
We are told that the shaft is controlled by axis 0, thus axis is set to 0.
opno
We are told that output 11 is the one to fire, so set opno to 11.
opst
When the output is set it should be on so set to 1.
setpos
The output is to fire at 80° after TDC hence the set position is 80 as we
are working in degrees.
rspos
The output is to be on for a period of 120° after 80° therefore it goes
off at 200°. So the reset position is 200.
Содержание Motion Coordinator Euro 205
Страница 1: ...Trio Motion Technology Motion Coordinator Technical Reference Manual Sixth Edition 2004 Revision 4...
Страница 4: ......
Страница 11: ...C H A P T E R CHAPTER0INTRODUCTION...
Страница 12: ......
Страница 27: ...C H A P T E R CHAPTER0HARDWARE OVERVIEW...
Страница 28: ......
Страница 35: ...Motion Coordinator Technical Reference Manual Hardware Overview 2 9 Motion Coordinator MC202...
Страница 47: ...Motion Coordinator Technical Reference Manual Hardware Overview 2 21 Motion Coordinator Euro205 X...
Страница 75: ...C H A P T E R CHAPTER0INSTALLATION...
Страница 76: ......
Страница 88: ...3 14 Installation EMC Considerations Trio Motion Technology...
Страница 89: ...C H A P T E R CHAPTER0DAUGHTER BOARDS...
Страница 90: ......
Страница 126: ...4 38 Daughter Boards Profibus Daughter Board Trio Motion Technology...
Страница 127: ...C H A P T E R CHAPTER0EXPANSION MODULES...
Страница 128: ......
Страница 158: ...5 32 Expansion Modules Communications Adaptors Trio Motion Technology...
Страница 159: ...C H A P T E R CHAPTER0SYSTEM SETUP AND DIAGNOSTICS...
Страница 160: ......
Страница 173: ...C H A P T E R CHAPTER 0PROGRAMMING...
Страница 174: ...7 2 Programming Trio Motion Technology...
Страница 190: ...7 18 Programming Command Line Interface Trio Motion Technology...
Страница 191: ...C H A P T E R CHAPTER0TRIO BASIC COMMANDS...
Страница 192: ......
Страница 200: ...8 10 Trio BASIC Commands Trio Motion Technology VERIFY 8 178 VFF_GAIN 8 178 VP_SPEED 8 179...
Страница 254: ...8 64 Trio BASIC Commands Input Output Commands Trio Motion Technology...
Страница 372: ...8 182Trio BASIC Commands Axis Parameters Trio Motion Technology...
Страница 373: ...C H A P T E R CHAPTER 0PROGRAMMING EXAMPLES...
Страница 374: ......
Страница 389: ...C H A P T E R CHAPTER0SUPPORT SOFTWARE...
Страница 390: ......
Страница 443: ...Motion Coordinator Technical Reference Manual Support Software 10 55 Creating and Running a program...
Страница 472: ...10 84Support Software Project Autoloader Trio Motion Technology...
Страница 473: ...C H A P T E R CHAPTER0FIBRE OPTIC NETWORK...
Страница 474: ......
Страница 486: ...11 14Fibre Optic Network Network Specification Trio Motion Technology...
Страница 487: ...C H A P T E R CHAPTER0USING THE TRIO ACTIVEX CONTROL...
Страница 488: ......
Страница 518: ...12 32Using the Trio ActiveX Control Events Trio Motion Technology...
Страница 519: ...C H A P T E R CHAPTER0COMMUNICATIONS PROTOCOLS...
Страница 520: ......
Страница 551: ...A P P E N D I X CHAPTER 0REFERENCE...
Страница 552: ......