what is the delay time of an alias signal
svoldgaard
✭✭
I have an alias signal, that I set in rapid.
I needs to be sure, that the signal is set, so another task can response to it, before continue in the current task.
What is the delaytime, before the other task can read the value of the signal and can I use:
I needs to be sure, that the signal is set, so another task can response to it, before continue in the current task.
What is the delaytime, before the other task can read the value of the signal and can I use:
Set sdoBlockMag;
WaitDO sdoBlockMag,1;
bLidReady{MagNo}:=FALSE;
and be sure, that "bLidReady{MagNo}:=FALSE;" is not executed, before another task can see the updated value of sdoBlockMag?
and be sure, that "bLidReady{MagNo}:=FALSE;" is not executed, before another task can see the updated value of sdoBlockMag?
Tagged:
0
Answers
-
Have the other task set a signal acknowledging that it sees the change of state. Or use TestAndSet function for boolean flag.Lee Justice0
-
I would perhaps use traps in the other task to monitor sdoBlockMag and set a bool variable that is shared between task:
TASK 1:
PERS bool bBlockMag; ! This is the shared variable between tasks
PROC rMyProc
bBlockMag:=FALSE; ! Reset shared var to ensure fresh update from TASK 2
Set sdoBlockMag;
WaitUntil bBlockMag;
bLidReady{MagNo}:=FALSE;
bBlockMag:=FALSE; ! Reset shared var to avoid wrong logic going forward
ENDPROC
TASK 2:LOCAL VAR intnum iMonitorBlockMag;PERS bool bBlockMag:=FALSE; ! This is the shared variable between tasksPROC rConnectTrap()IDelete iMonitorBlockMag;CONNECT iMonitorBlockMag WITH tBlockMag;ISignalDO sdoBlockMag,1,iMonitorBlockMag;ENDPROCTRAP tBlockMag
! ..............
! Do your logic here
! .................bBlockMag:=TRUE;ENDTRAP
0
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