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
- 390 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 249 ScreenMaker
- 2.7K Robot Controller
- 304 IRC5
- 59 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 3 RobotStudio AR Viewer
- 772 RAPID Programming
- 17 Wizard Easy Programming
- 105 Collaborative Robots
- 4 Job listings