How to set up rapid variabel monitor
Hi
Working on an Web services application for Omnicore flexpendant.
I'm trying to set up an rapid variabel monitor that executes when rapid variable value is changed but cant get it to work.
In the Application manual Omnicore App SDK 1.1 I found that with RWS.Rapid.getMonitor() it is possible. Still can't get it to work?
Working on an Web services application for Omnicore flexpendant.
I'm trying to set up an rapid variabel monitor that executes when rapid variable value is changed but cant get it to work.
In the Application manual Omnicore App SDK 1.1 I found that with RWS.Rapid.getMonitor() it is possible. Still can't get it to work?
let monitorbStart = await RWS.Rapid.getMonitor('bStartMoveTo', 'T_ROB1')
monitorbStart.addCallbackOnChanged((status) => {
if (status = false) {
// Stop movement
}
monitorbStart.unsubscribe()
});
await monitorbStart.subscribe();
What I'm doing wrong?
Please help!
What I'm doing wrong?
Please help!
0
Answers
-
Hi !As I understand it, with getMonitor() you can subscribe to controller state and mode changes. To subscribe to RAPID variable change, I'm using RWS.Rapid.getData() instead._myVariableRef = await RWS.Rapid.getData('T_ROB1', 'myModule', 'myVariable');
await _myVariableRef.addCallbackOnChanged((newValue) =>
{
// do something with newValue
});
await _myVariableRef.subscribe()Fritz
0
Categories
- All Categories
- 5.5K RobotStudio
- 396 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 250 ScreenMaker
- 2.8K Robot Controller
- 316 IRC5
- 61 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 798 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 5 Job listings