Supervision of flanks
Comments
-
There are at least two ways to do this on IRC5
1) Use the Interrupt/TRAP mechanism in RAPID to take some action in response to the transition of your signal from 0 to 1.
2) Create a FlexPendant SDK application that "subscribes" to the IO changed event for your signal, then take some action when the signal changes AND its value is 1.
Method 1 is simpler and likely faster than method 2 because you can configure the interrupt to happen based upon your desired state change, i.e. 0 to 1, and also the change event does not need to be broadcast to a client device (the FlexPEndant).
Russell Drown0 -
Thanks Russ.
I went with the first alternative (trap routine), but of course im having probs also with this. My problem is the trap routine is never carried out. I connect the intvariable with the traproutine in Mainroutine and i deactivate it immediately. then i want to activate it in my Grip Routine and again deactivate in release routine. Can you see something wrong?
Here is the code:
In Datamodule:
VAR intnum DetailMissingCylFwd;
VAR intnum DetailMissingCylBack;In Mainmodule:
PROC Main()
CONNECT DetailMissingCylBack WITH DetailLost;
IsignalDI iGripperCylBack,1,DetailMissingCylBack;
CONNECT DetailMissingCylFwd WITH DetailLost;
IsignalDI iGripperCylForward,1,DetailMissingCylFwd;
isleep DetailMissingCylBack;
isleep DetailMissingCylFwd;ENDPROC
PROC Grip()
(code for gripping)
iwatch DetailMissingCylFwd;
iwatch DetailMissingCylback;ENDPROC
PROC Release()
(code for releasing)
isleep DetailMissingCylBack;
isleep DetailMissingCylFwd;
ENDPROC0 -
Found it...
The signal to trigg my interrupt was already 1 when the interrupt was activated.
Thanks.
0
Categories
- All Categories
- 5.5K RobotStudio
- 397 UpFeed
- 18 Tutorials
- 13 RobotApps
- 299 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 250 ScreenMaker
- 2.8K Robot Controller
- 319 IRC5
- 63 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 804 RAPID Programming
- 4 AppStudio
- 3 RobotStudio AR Viewer
- 19 Wizard Easy Programming
- 105 Collaborative Robots
- 5 Job listings