New to Interrupts
khewes
✭
in RobotStudio
Goodmorning All,
I am trying to implement an interrupt that is tied to a toggle switch input. I want this interrupt to stop the robot in place when toggled high, and resume movement when toggled back to low. I have gotten this operation to work, however, I want this operation to be repeatable...which it is not. If the interrupt is used once, it cannot be activated again, until I restart the program. I am in teach pendant mode. Any suggestions?
Thank you,
Kris
I am trying to implement an interrupt that is tied to a toggle switch input. I want this interrupt to stop the robot in place when toggled high, and resume movement when toggled back to low. I have gotten this operation to work, however, I want this operation to be repeatable...which it is not. If the interrupt is used once, it cannot be activated again, until I restart the program. I am in teach pendant mode. Any suggestions?
Thank you,
Kris
0
Comments
-
Hello,
what error do you get, that the interrupt is already declared?
best use is that you define your interrupts at the beginning of your program, before your main loop
and that you use Iwatch en Isleep in your program to put them active or inactive when you want.
best use is also to put an Isleep in the beginning of your trap routine for your interrupt, otherwise you can nest down your interrupts when you have fast multiple flanks of your interrupt signal.
also when you declare your interrupt, put Idelete just the line before, so when the interrupt is declared, it is deleted and you can redefine the interrupt, otherwise you get an error that the interrupt already exist.
when you do "PP at main" all interrupt are deleted, that is probably why it always works only 1 time.
BR
Peter1 -
In the routine called by your interrupt:
- stop the robot motion
-WaitDI for the input to go low
then the program will carry on from where it got interrupted.
Will this for your situation?
0 -
It is important to delete your interrupt declaration at the beginning of each cycle as in the example below:PROC main()IDelete sig1int;CONNECT sig1int WITH iroutine1;ISignalDI diInput,1,sig1int;WHILE TRUE DO!continious program hereENDWHILEENDPROC
/Pavel1
Categories
- All Categories
- 5.5K RobotStudio
- 395 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 249 ScreenMaker
- 2.7K Robot Controller
- 310 IRC5
- 59 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 785 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 4 Job listings