Welcome, Guest. Please login or register.
Did you miss your activation email?
February 08, 2012, 01:33:01 AM
Home Help Login Register
News: Any Problems or Experience with Industrial Robots ?
Register and place your Question / Answer to worldwide Robotexperts right here !

+  Robotforum | Support for Robotprogrammer and Users
|-+  Industrial Robot Help and Discussion Center
| |-+  Kawasaki Robots
| | |-+  timers
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Print
Author Topic: timers  (Read 632 times)
MIYAM
Jr. Member
**
Offline Offline

Posts: 54


« on: January 13, 2010, 10:14:00 PM »

i want to use timers in my pro0gram but i dont know how to active them does anyone can help me Huh?
Logged
tony gast
Hero Member
*****
Offline Offline

Gender: Male
Posts: 700


Can I barrow a cup of robots?


« Reply #1 on: January 14, 2010, 05:09:30 AM »

TWAIT 0.25

this is a .25 second timer in as i think?
Logged

Oh, well
James
Guest
« Reply #2 on: January 14, 2010, 09:07:26 AM »

TWAIT 0.25 will suspend the program for 0.25 seconds.

Another type of timer instruction is 'STIM' which is a signal timer.

Cue wall of text from AS Language Manual:

STIM STIM timer signal=input signal number, time
Function Used to set the specified timer signal ON, when the specified input
signal is ON for the specified time.
Parameter Timer signal:
Specifies the timer signal number.
Acceptable signal numbers:
Timer signal numbers: 3001–3064
Input signal number:
Specifies the input signal number or logical expression (in whole
numbers) to monitor as a condition for setting the timer signal ON.
Time:
Specifies (in real numbers) the time, in seconds, the signal is ON
before the timer signal is set ON.
Explanation The monitored input signal must remain ON continuously for the
specified time for the timer signal to be set ON. If the input signal is
set OFF before the specified time elapses, the time count restarts
when the input signal is set ON again.
If the input signal is set OFF, the timer signal is set OFF immediately.
The input signal affects the timer signal only when the STIM
command is executed. The timer signal remains ON, when the
input signal is set OFF, until the STIM instruction is executed again.
To display the state of internal signals 3001–3128, use the IO/E
command (option).
Example When the PC program test, shown below, is executed and signal 1
is ON for 5 seconds, signal 2 is set ON.
PC program test
STIM 3001 = 1,5
SOUT 2 = 3001
>PCEXECUTE test
Logged
rdixiemiller
Jr. Member
**
Offline Offline

Gender: Male
Posts: 64


« Reply #3 on: January 14, 2010, 09:11:16 PM »

 What are you trying to do with the timers? There are quite a few ways to use them in AS language. You have (8) named timers, you can have as many User Timers as you want to make. You can use them to turn things off and on, time processes, etc.
 If you are trying to turn on an output for a specified amount of time, you would use the "Pulse" command.

ex.
 PULSE 10,5 ;  ;Turns OX 10 On for 5 seconds.

 pc_count = pc_count+1
IF pc_count==10 THEN
pc_cycle = (UTIMER(@a))/10
UTIMER @a = 0
pc_count = 0
END

This block of code is at the beginning a pc program to create a cycle timer. I use a variable display window on the IFPanel to show me the PC program cycle time.


;
IF BITS(1013,4)==0 THEN ;IF NOT(SENSOR 1 OR 2 OR 3 OR 4)
TIMER (4) = 0 ;   ;RESET TIMER 4
END
;
IF BITS(1013,3)>0 AND TIMER(4)>t4_pre THEN ;IF ANY (SENSOR 1 OR 2 OR 3) AND (TIMER 4)> VARIABLE
SIGNAL (2021);   ;(ANY SENSOR)
ELSE ;   ;IF (NOT (SENSOR 1 OR 2 OR 3))AND (TIMER 4)>SETPOINT
SIGNAL (-2021);   ;NOT (ANY SENSOR)
END
;
This block of code is used to create a de-bounce timer for a sensor set on a suction cup manipulator. Whatever value you assign to t4_pre (say .015 sec) will work to eliminate a sensor flicker. There are quite a few ways of doing this in AS language, just depends what you are trying to do.
Logged

Regards
Robert Miller
Fanuc P50, 145,155,200,ArcMate 100,120, Kawasaki FS30,MX500, old Kobelco/Kawasaki Painters
Pages: [1] Print 
« previous next »
Jump to:  


Login with username, password and session length

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!