PC SDK: How to check if variable is persistent?
I was bitten by the fact that RapidData.ValueChanged only works for persistent variables.
(No warning/log/whatnot from the code. Just no output...)
It took me a while to find the fine-print regarding that method
Anyway, I figured I could check if it is persistent or not, and thus warn (or start polling) if not.
The IsTaskPers property _seems_ to check only for TASK PERS vs PERS, not PERS, if I can read the doc right (see below). The last remark muddles things a bit.
Is there any other way I can check for PERS to prevent the same mistake in the future?
Cheers,
/Marcus
"
public bool IsTaskPers { get; }
Checks whether the RAPID data is declared PERS or TASKPERS.
Only of interest for persistent data.
Property Value Boolean
true if the RAPID data is declared TASKPERS;
otherwise false.
Remarks
Will return false if used with RapidData that is not
declared as persistent (but constant for example).
"
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)
- 800 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 5 Job listings