Programiranje robota Epson E2S651 in uporaba

Programiranje robota
Epson E2S651
in uporaba robotskega vida
Epson E2S651
E2S651 je robot tipa SCARA srednje velikosti. Najpomembnejše prednosti so hitrost,
natančnost in preprosta namestitev ter programiranje (PC-based kontroler). V tabeli je nekaj
specifikacij:
Model robota
E2S651
Oblika
SCARA 4 Axis AC Servo
Maksimalna obremenitev
5 KG
Doseg osi
Hitrost
T1+T2
650mm
Z
170/320mm (150/300mm clean)
U
+/- 360
T1+T2 (combined)
6300 mm/s
Z
1100 mm/s
U
1870 deg/s
Ponovljivost T1+T2
+/-0.015mm
Z
+/-0.01mm
U
+/-0.020 deg
Čas cikla
0.477 s
Vztrajnostni moment (U os 5Kg )
0.120 Kg*m2
Masa
20Kg; 22Kg multi-mount
Uporabniška vodila
15 Electric, 3 Pneumatic, Hollow Quill
Epson RC+
Krmilnik robota je zasnovan na indusrijskem PC-ju. Osi robota krmilijo neodvisni namenski
procesorji, uporabniški vmsnik Epson RC+, ki predstavlja delovno okolje za vse robote
Epson, pa teče pod operacijskim sistemom Windows 2000. Vse komponente krmilnika,
vključno s končnimi stopnjami ojačevalnikov, se nahajajo v standardnem 19” ohišju. Pisanje
robotskih aplikacij poteka v programskem jeziku SPEL, ki nudi tudi široke možnosti
komunikcije in vpenjanja v aplikacije, razvite s splošnonamenskimi programskimi jeziki
(vmesnik ActiveX, TCP/IP itd.). Izgled vmesnika RC+ prikazuje slika:
Iz menuja Project izberite opcijo New... in vtipkajte ime vašega projekta. Odpre se okno
main.prg, kamor lahko začnete pisati vaš program. V orodni vrstici kliknite gumb Robot
Control Panel:
. Odpre se naslednje okno:
S tipko ON prižgete motorje robota, ki je s tem pripravljen za premikanje. V fazi
programiranja in testiranja naj bo zavoljo vaše varnosti in morebitnih poškodb opreme zaradi
napak VEDNO VKLOPLJENA OPCIJA POWER LOW! Opcija Power High je namenjena
doseganju polne dinamike robota v industrijskem okolju, kjer je robot v zaščitni kletki in
njegovo gibanje programsko omejeno, tako da ne more priti do trka z okoljem. Hitrosti so
velike in poškodbe ob morebitnem trku hude!
Sedaj v orodni vrstici kliknite gumb Jog and Teach:
. Odpre se okno:
S puščicami vodite robot v izbrani smeri, koordinatni sistem, v katerem se robot giba pa
izberete v zgornjem desnem delu okna (World, Tool, Joint). Korak premika izberete v
razdelku Jog Distance, v razdelku Points pa robot s klikom na gumb Teach naučite točko, v
kateri se trenutno nahaja. V eni datoteki s točkami je lahko shranjenih 1000 točk, če vam to ne
zadostuje, lahko določite več datotek s točkami. Jasno je, da robot lahko premikate samo s
prižganimi motorji.
Ko robot naučite vsaj dveh točk, lahko začnete s pisanjem “primi-odloži” programa. Zaprite
okno Jog and Teach in se postavite v okno main.prg. Če to okno ni odprto, ga odprete s File
Æ Open... Æ main.prg. Vsak program, napisan v jeziku SPEL ima naslednjo strukturo:
Function
...
Fend
V nadaljevanju je povzetek funkcij, ki jih boste potrebovali, podrobnejši opis pa najdete v
priročnikih v elektronski obliki v direktoriju c:\EpsonRC\manuals.
Napišite kratek program, ki vsebuje 2 točki, robot naj na prvi točki pobere objekt in ga odloži
na drugi: v okolju Epson RC+ iz menuja Project izberite New, vpišite poljubno ime in odpre
se programsko okno Main.prg, kamor začnete pisati program. Pred pisanjem je potrebno robot
naučiti 2 točki, ki bosta uporabljeni kot začetna in končna točka. Izberite Jog&Teach
,
premaknite robot na želeno začetno točko, nato pa naučite točko z gumbom Teach P0. Nato
robot premaknite na končno točko, premaknite drsnik na P1 in potrdite s Teach P1.
Najpreprostejši primer Pick&Place programa
Motor On
PowerLow
Speed 10
Accel 20, 20
Off 0
Jump P0
On 0
Jump P1
Off 0
‘prijemalo je na digitalnem izhodu št. 0
Matlab in umetni vid
Matlab s svojo široko paleto funkcij omogoča tudi učinkovito delo z umetnim vidom. Glavno
orodje tu predstavljata Image Acquisition Toolbox in Image Processing Toolbox. Kot že ime
pove, prvi skrbi za zajem slike in videa ter strojno podporo, slednji pa za nadaljnjo obdelavo,
razpoznavanje vzorcev, transformacije, ugotavljanje najrazličnejših lasnosti slik itd. Poleg
tega pa je še vedno moč uporabljati vse Matlabove matrične funkcije, saj je slika
predstavljena kot matrika; sivinske slike predstavljajo 2-D m x n matrike, barvne slike pa so
predstavljene kot 3-D m x n x 3 matrike, kjer tretja dimenzija predstavlja posamezno RGB
komponento.
V našem primeru je uporabljena industrijska Firewire kamera, ki predstavlja nov standard v
strojnem vidu, saj takšne kamere odlikuje visoka hitrost prenosa podatkov in hitra ter
enostavna priključitev. Ker je kamera digitalna, ni potreben t.i. frame grabber, Firewire
standard (IEEE-1394) pa zagotavlja široko kompatibilnost, pogosto je za delovanje dovolj že
generični gonilnik operacijskega sistema. Kamera je črno-bela (256 sivinskih odtenkov),
ločljivosti 640 x 480. Čeprav so cenovno čedalje bolj dostopne tudi barvne kamere višje
ločljivosti, je taka konfiguracija (p)ostala nekakšen standard strojnega vida, saj zagotavlja
optimalno razmerje med ločljivostjo in hitrostjo obdelave signala. V industriji, kjer je hitrost
odločilni dejavnik, se marsikje dela samo z binarnimi slikami.
Kalibracija
Vaša naloga je kalibracija kamere glede na robot. V bistvu je to iskanje ustrezne homogene
transformacije med koordinatnim sistemom (v nadaljevanju k.s.) objekta in referenčnim k.s.
Situacijo prikazuje slika:
EndEff
T_cam2ref
T_grip2obj
T_obj2cam
Označimo:
T_grip2obj: lega prijemala glede na objekt
T_obj2cam: lega objekta glede na k.s. kamere
T_cam2ref: k.s. kamere glede na referenčni k.s.
EndEff: Lega vrha (prijemala) glede na referenčni k.s.
Lego vrha glede na referenčni k.s. dobimo z množenjem matrik:
EndEff = T_cam2ref * T_obj2cam * T_grip2obj
Ta EndEff predstavlja tisto lego vrha, v kateri prijemalo zagrabi predmet. Ker je smisel
robotskega vida, da lego objekta ugotovimo s kamero, je treba lego vrha izraziti preko zgornje
enačbe in ne kar direktno glede na referenčni k.s. robota.
Kalibracijski objekt je list papirja s tremi črnimi pikami, od katerih ena predstavlja
koordinatno izhodišče, ostali dve pa x in y smer k.s.:
Razdalja 0-x oz. 0-y znaša 180 mm, kar boste potrebovali pri pretvorbi koordinat iz slikovnih
elemntov v milimetre.
Delo v Matlabu pričnete tako, da se najprej postavite v vaš delovni direktorij
(c:\MATLAB7\work\OR_vaje\) in zaženete Camera Calibration Toolbox, ki bo v pomoč pri
kalibraciji kamere:
>> Calib_gui
Toolbox vsebuje funkcije za eksperimentlno ugotavljanje parametrov kamere oz.
uporabljenega objektiva (uporaba kalibracijskih vzorcev itd.) Potopek je že opravljen, zato
kliknite gumb Load in s tem naložite rezultate zadnje kalibracije. Toolbox zapustite z Exit.
Prestavite se v direktorij, kamor se shranjujejo slike:
c:\MATLAB7\work\OR_vaje\images_temp\
Vtipkajte ukaz:
>> snapcalib
Če je kamera pravilno priključena, se na zaslon izpišejo parametri kamere, takoj zatem pa se
pojavi okno z živo sliko, kakršno vidi kamera. Postavite kalibracijski list v vidno polje
kamere, tako da bodo na sliki vse tri točke. Sliko zajamete s tipko <Enter>, shrani se kot
calib_image.tif, opravi se transformacija za odstranjevanje popačenja objektiva in popravljena
slika se shrani kot calib_image_rect.tif. Vtipkajte:
>> select_dots
Prikaže se binarna verzija vaše kalibracijske slike, na kateri z dvojnim klikom izberete pike
(1-izhodišče, 2-x-smer, 3-y-smer). Koordinate točk v slikovnih elementih se shranijo v vektor
g. Pri izbiranju točk ni potrebna velika točnost, pomembno je le, da kliknete v območje pike,
saj program nato sam izračuna središče.
Napišite m-datoteko, ki iz tega vektorja sestavi homogeno transformacijo, ki predstavlja lego
k.s. na kalibracijskem listu v k.s. kamere (matrika T_obj2cam).
Da bi lahko s pomočjo robotskega vida iskali in pobirali objekte, potrebujemo še matriko
T_cam2ref, ki predstavlja lego kamere v referenčnem k.s. in matriko T_grip2obj, ki
predstavlja lego vrha (prijemala) glede na objekt. V trenutku, ko prijemalo zagrabi objekt,
morata biti k.s. objekta in vrha poravnana, torej mora biti transformacija T_grip2obj enaka
enotski matriki 4x4, zato jo lahko iz nadaljnjih izračunov preprosto izpustimo. Enačba za lego
vrha se tako poenostavi:
EndEff = T_cam2ref * T_obj2cam
Glede na to, da je kamera fiksirana glede na referenčni k.s., ima matrika T_cam2ref
konstantne vrednosti. Ker lego vrha robota lahko vedno natančno odčitamo iz enkoderjev, do
te matrike ne bo težko priti: v prijemalo robota namestite kalibracijako konico, izključite
motorje in robot ročno pripeljite nad točke na kalibracijskem listu (najprej nad točko, ki
predstavlja izhodišče k.s., nato še nad točko, ki predstavlja x-smer. (y-smer ni potrebna.))
Odprite okno Jog&Teach ter za obe točki odčitajte x in y koordinate in jih vpišite v matlab
kot vektor gr. (gr = [x0, y0, x1, y1]). Sedaj imamo vse potrebne podatke za izračun matrike
T_Cam2ref, ki jo dobimo z množenjem EndEff in inverza matrike T_Obj2cam.
Primer programske kode m-datoteke za izračun kalibracijske matrike v matlabu:
kf=180/sqrt((g(2,1)-g(1,1))^2+(g(2,2)-g(1,2))^2)
% faktor pretvorbe pixel/mm
g1=g*kf
fi=atan((g(2,2)-g(1,2))/(g(2,1)-g(1,1)))
% kot rotacije k.s.
T_obj2cam=[cos(fi), -sin(fi),0, g1(1,1); sin(fi), cos(fi), 0,
0,0,1,0;0,0,0,1]
gr=[x0, y0, x1, y1]
% odčitajte vrednosti iz okna Jog&Teach
dc=sqrt((gr(2,1)-gr(1,1))^2+(gr(2,2)+gr(1,2))^2)
fic=atan((gr(2,2)-gr(1,2))/(gr(2,1)-gr(1,1)))
EndEff=[cos(fic), -sin(fic),0, gr(1,1); sin(fic), cos(fic), 0,
0,0,1,0;0,0,0,1]
T_cam2ref=EndEff*inv(T_obj2cam)
g1(1,2);
gr(1,2);
Izbrane SPEL funkcije
Motor Statement
Turns motor power for all axes on or off for the current robot.
Syntax
Motor ON | OFF
Parameters
ON | OFF The keyword ON is used to turn the Motor Power on. The keyword OFF is used to turn
Motor Power Off.
Description
The Motor On command is used to turn Motor Power On and release the brakes for all axes. Motor
Off is used to turn Motor Power Off and set the brakes.
On a multi-robot system, use the Robot command to select the current robot before executing the
Motor command.
In order to move the robot, motor power must be turned on. Incremental encoder robots also require
Mcal to be executed once after the system is started.
After an emergency stop, or after an error has occurred that requires resetting with the Reset
command, execute Reset, and then execute Motor On.
Motor On automatically sets the following items:
Power Low
Fine Default values
Speed Default values
SpeedS Default values
Accel Default values
AccelS Default values
See Also
Brake, Power, Reset, Robot, SFree, SLock
Motor Example
The following examples are done from the monitor window:
> Motor On
> Motor Off
Power Statement
Switches Power Mode to high or low and displays the current status.
Power Syntax
(1) Power { High | Low }
(2) Power
Parameters
High | Low The setting can be High or Low. The default is Low.
Return Values
Displays the current Power status when parameter is omitted.
Description
Switches Power Mode to High or Low. It also displays the current mode status.
Low - When Power is set to Low, Low Power Mode is On. This means that the robot will run slow
(below 250 mm/sec) and the servo stiffness is set light so as to remove servo power if the robot
bumps into an object. This is the normal mode of operation for teaching points.
High - When Power is set to High, Low Power Mode is Off. This means that the robot can run at full
speed with the full servo stiffness. This is the normal mode of operation for running actual
applications.
The following operations will switch to low power mode. In this case, speed and acceleration settings
will be limited to low values.
Notes
Low Power Mode (Power Low) and Its Effect on Max Speed:
In low power mode, motor power is limited, and effective motion speed setting is lower than the default
value. If, when in Low Power mode, a higher speed is specified from the Monitor window (directly) or
in
a program, the speed is set to the default value. If a higher speed motion is required, set Power High.
High Power Mode (Power High) and Its Effect on Max Speed:
In high power mode, higher speeds than the default value can be set.
Speed Statement
Specifies or displays the arm speed for the point to point motion instructions Go, Jump and Pulse.
Syntax
(1) Speed percent, [ departSpeed], [approSpeed ]
(2) Speed
Parameters
percent Integer expression between 1-100 representing the arm speed as a percentage
of the maximum speed.
departSpeed Integer expression between 1-100 representing the depart motion speed for the
Jump instruction.
approSpeed Integer expression between 1-100 representing the approach motion speed for
the Jump instruction.
Return Values
Displays current Speed value when used without parameters.
Description
Speed specifies the arm speed for all point to point motion instructions. This includes motion caused
by the Go, Jump and Pulse robot motion instructions. The speed is specified as a percentage of
maximum speed with the range of acceptable values between 1-100. (1 represents 1% of the
maximum speed and 100 represents 100% of maximum speed). Speed 100 represents the maximum
speed possible.
Depart and approach speed values apply only to the Jump instruction. If omitted, each defaults to the
percent value.
The speed value initializes to its default value when any one of the following is performed:
Accel Statement
Sets (or displays) the acceleration and deceleration rates for the Go, Jump and Pulse robot motion
instructions.
Syntax
(1) Accel accel, decel [, departAccel, departDecel, approAccel, approDecel ]
(2) Accel
Parameters
accel Integer expression between 1-100 representing a percentage of maximum acceleration
rate.
decel Integer expression between 1-100 representing a percentage of the maximum
deceleration rate.
departAccel Optional. Depart acceleration for Jump. Valid Entries are 1-100
departDecel Optional. Depart deceleration for Jump. Valid Entries are 1-100
approAccel Optional. Approach acceleration for Jump. Valid Entries are 1-100
approDecel Optional. Approach deceleration for Jump. Valid Entries are 1-100
Return Values
When parameters are omitted, the current Accel parameters are displayed.
Description
Accel specifies the acceleration and deceleration for all Point to Point type motions. This includes
motion caused by the Go, Jump and Pulse robot motion instructions.
Each acceleration and deceleration parameter defined by the Accel instruction may be an integer
value from 1-100. This number represents a percentage of the maximum acceleration (or
deceleration) allowed.
The Accel instruction can be used to set new acceleration and deceleration values or simply to
print the current values. When the Accel instruction is used to set new accel and decel values, the
first 2 parameters (accel and decel ) in the Accel instruction are required.
The optional departAccel, departDecel, approAccel, and approDecel parameters are effective for
the Jump instruction only and specify acceleration and deceleration values for the depart motion at
the beginning of Jump and the approach motion at the end of Jump.
On Statement
Turns on the specified output and after a specified time can turn it back off.
Syntax
On { bitNumber | outputLabel }, [ time ], [ parallel ]
Parameters
bitNumber Integer expression whose value is between 0 - 511. Tells the On instruction which
Output to turn On.
outputLabel Output label.
time Optional. Specifies a time interval in seconds for the output to remain On. After the time
interval expires, the Output is turned back off. (Minimum time interval is 0.01 seconds)
parallel Optional. When a timer is set, the parallel parameter may be used to specify when the
next command executes:
0 - immediately after the output is turned on
1 - after the specified time interval elapses. (default value)
Description
On turns On (sets to 1) the specified output.
If the time interval parameter is specified, the output bit specified by outnum is switched On, and then
switched back Off after the time interval elapses.
The parallel parameter settings are applicable when the time interval is specified as follows:
1: Switches the output On, switches it back Off after specified interval elapses, then executes the next
command. (This is also the default value for the parallel parameter. If this parameter is omitted, this is
the same as setting the parameter to 1.)
0: Switches the output On, and simultaneously executes the next command.
Notes
Output bits Configured as remote
If an output bit which was set up as remote is specified, an error will occur. Remote output bits are
turned On or Off automatically according to system status. For more information regarding remote,
refer to the EPSON RC+ User's Guide. The individual bits for the remote connector can be set as
remote or I/O from the EPSON RC+ remote configuration dialog accessible from the setup menu.
Outputs and When an Emergency Stop Occurs
EPSON RC+ has a feature which causes all outputs to go off when an E-Stop occurs. This feature is
set or disabled from one of the Option Switches. To configure this go to the SPEL Options tab on the
System Configuration dialog accessible from the Setup Menu.
Off Statement
Turns Off the specified output and after a specified time can turn it back on.
Syntax
Off { bitNumber | outputLabel }, [ time ], [ parallel ]
Parameters
bitNumber Integer expression whose value is between 0 - 511. Tells the Off instruction which
Output to turn Off.
outputLabel Output label.
time Optional. Specifies a time interval in seconds for the output to remain Off. After the time
interval expires, the Output is turned back on. The minimum time interval is 0.01 seconds
and maximum time interval is 10 seconds.
parallel Optional. When a timer is set, the parallel parameter may be used to specify when the
next command executes:
0 - immediately after the output is turned off
1 - after the specified time interval elapses. (default value)
Description
Off turns off (sets to 0) the specified output.
If the time interval parameter is specified, the output bit specified by bitNumber is switched off, and
then switched back on after the time interval elapses. If prior to executing Off, the Output bit was
already off, then it is switched On after the time interval elapses.
The parallel parameter settings are applicable when the time interval is specified as follows:
1: Switches the output off, switches it back on after specified interval elapses, then executes the next
command. (This is also the default value for the parallel parameter. If this parameter is omitted, this is
the same as setting the parameter to 1.)
0: Switches the output off, and simultaneously executes the next command.
Notes
Output bits Configured as Remote Control output
If an output bit which was set up as a system output is specified, an error will occur. Remote control
output bits are turned on or off automatically according to system status.
Outputs and When an Emergency Stop Occurs:
EPSON RC+ has a feature which causes all outputs to go off when an E-Stop occurs. This feature is
set or disabled from the SPEL Options tab on the System Configuration dialog accessible from the
Setup Menu.
Jump Statement
Moves the arm from the current position to the specified destination point using point to point motion
by first moving in a vertical direction up, then horizontally and then finally vertically downward to arrive
on the final destination point.
Syntax
Jump destination [CarchNumber] [LimZ zLimit ] [searchExpr] [!...!]
Parameters
destination The target destination of the motion using a point expression.
archNumber Optional. The arch number (archNumber) specifies which Arch Table entry to use for
the Arch type motion caused by the Jump instruction. archNumber must always be
proceeded by the letter C. (Valid entries are C0-C7.)
zLimit Optional. This is a Z limit value which represents the maximum position the Z joint
will travel to during the Jump motion. This can be thought of as the Z Height Ceiling
for the Jump instruction. Any valid Z joint Coordinate value is acceptable.
searchExpr Optional. A Sense, Till or Find expression.
Sense | Till | Find
Sense Sw(expr) = {On | Off}
Till Sw(expr) = {On | Off}
Find Sw(expr) = {On | Off}
!...! Optional. Parallel Processing statements can be added to the Jump instruction to
cause I/O and other commands to execute during motion.
Description
Jump moves the arm from the current position to destination using what is called Arch Motion. Jump
can be thought of as 3 motions in 1. For example, when the Arch table entry defined by archNumber is
7, the following 3 motions will occur.
1) The move begins with only Z-joint motion until it reaches the Z joint height calculated by the
Arch number used for the Jump command.
2) Next the arm moves horizontally (while still moving upward in Z) towards the target point
position until the upper Z Limit (defined by LimZ ) is reached. Then the arm begins to move
downward in the Z direction (while continuing X, Y and U joint motion) until the final X, and Y
and U joint positions are reached.
3) The Jump instruction is then completed by moving the arm down with only Z-joint motion until
the target Z-joint position is reached.
The coordinates of destination (the target position for the move) must be taught previously before
executing the Jump instruction. The coordinates cannot be specified in the Jump instruction itself.
Acceleration and deceleration for the Jump is controlled by the Accel instruction. Speed for the move
is controlled by the Speed instruction.
Go Statement
Moves the arm using point to point motion from the current position to the specified point or X,Y,Z,U,
V, W position. The Go instruction can move any combination of 1-6 joints at the same time.
Syntax
Go destination [CP] [searchExpr] [!...!]
Parameters
destination The target destination of the motion using a point expression.
CP Optional. Specifies continuous path motion.
searchExpr Optional. A Till or Find expression.
Till | Find
Till Sw(expr) = {On | Off}
Find Sw(expr) = {On | Off}
!...! Optional. Parallel Processing statements can be added to execute I/O and other
commands during motion.
Description
Go simultaneously moves all joints of the robot arm using point to point motion. The destination for the
Go instruction can be defined in a variety of ways:
- Using a specific point to move to. For example: Go P1.
- Using an explicit coordinate position to move to. For example: Go XY(50, 400, 0, 0).
- Using a point with a coordinate offset. For example: Go P1 +X(50).
- Using a point but with a different coordinate value. For example: Go P1 :X(50).
The Speed instruction determines the arm speed for motion initiated by the Go instruction. The Accel
instruction defines the acceleration.
The Go instruction cannot check whether or not there is an area in which the arm cannot physically
move to prior to starting the move itself. Therefore, it is possible for the controller to find a prohibited
position along the way to a target point. In this case, the arm may abruptly stop which may cause
shock and a servo out condition of the arm. Even though the target position is within the range of the
arm, there are some moves which will not work because the arm cannot physically make it to some of
the intermediate positions required during the move.
The Go instruction always causes the arm to decelerate to a stop prior to reaching the final destination
of the move.
Notes
Difference between Go and Move
The Move instruction and the Go instruction each cause the robot arm to move. However, the primary
difference between the 2 instructions is that the Go instruction causes point to point motion where as
the Move instruction causes the arm to move in a straight line. The Go instruction is used when the
user is primarily concerned with the orientation of the arm when it arrives on point. The Move
instruction is used when it is important to control the path of the robot arm while it is moving.
Difference between Go and Jump
The Jump instruction and the Go instruction each cause the robot arm to move in a point to point type
fashion. However, the JUMP instruction has 1 additional feature. Jump causes the robot end effector
to first move up to the LimZ value, then in a horizontal direction until it is above the target point, and
then finally down to the target point. This allows Jump to be used to guarantee object avoidance and
more importantly to improve cycle times for pick and place motions.
Proper Speed and Acceleration Instructions with Go
The Speed and Accel instructions are used to specify the speed and acceleration of the manipulator
during motion caused by the Go instruction. Pay close attention to the fact that the Speed and Accel
instructions apply to point to point type motion (like that for the Go instruction) while linear and circular
interpolation motion uses the SpeedS and AccelS instructions.
Wait Statement
Causes the program to Wait for a specified amount of time or until the specified input condition (using
MemSw or Sw) is met. (Oport may also be used in the place of Sw to check hardware outputs.)
Syntax
(1) Wait time
(2) Wait inputCondition
(3) Wait inputCondition, time
Parameters
time Real expression between 0 and 2,147,483 which represents the amount of time
to wait when using the Wait instruction to wait based on time. Time is specified in
seconds. The smallest increment is .01 seconds.
Inputcondition This condition must return a value of True (1) or False (0). The following functions
and operators may be used in the inputCondition:
Functions: Ctr, Cnv_QueLen, In, InW, Lof, MemIn, MemSw, Lof,
MCalComplete, Motor, OPort, Out, OutW, Sw
Operators: And, Or, Xor, +, *
Other: Parenthesis for prioritizing operations, and variables
Description
(1) Wait with Time Interval:
When used as a timer, the Wait instruction causes the program to pause for the amount of time
specified and then continues program execution.
(2) Wait with Input Condition (without time interval):
When used as a conditional Wait interlock, the Wait instruction causes the program to wait until a
specified condition (based on memory bits or hardware inputs) is satisfied. If after TMOut time
interval has elapsed and the Wait condition has not yet been satisfied, an error occurs. The user
may also check multiple conditions with a single Wait instruction by using the And, Or, or Xor
instructions. (Please review the Example section for Wait.)
(3) Wait with Input Condition and Time Interval:
Specifies Wait condition and time interval. After either Wait condition is satisfied, or the time
interval has elapsed, program control transfers to the next command. Use Tw to verify if the Wait
condition was satisfied or if the time interval elapsed.
Notes
Specifying a Timeout for Use with Wait
When the Wait instruction is used without a time interval, a timeout can be specified which sets a time
limit to wait for the specified condition. This timeout is set through using the TMOut instruction. Please
refer to this instruction for more information. (The default setting for TMOut is 0 which means no
timeout.)