Update (2026-01-12): The user forums will be put into read-only mode on the 21st of January, 00:00 CET, to prepare for the data migration.
We're transitioning to a more modern community platform by beginning of next year. Learn about the upcoming changes and what to expect.
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.7K RobotStudio
- 402 UpFeed
- 21 Tutorials
- 16 RobotApps
- 307 PowerPacs
- 407 RobotStudio S4
- 1.8K Developer Tools
- 251 ScreenMaker
- 2.9K Robot Controller
- 368 IRC5
- 92 OmniCore
- 8 RCS (Realistic Controller Simulation)
- 859 RAPID Programming
- 43 AppStudio
- 4 RobotStudio AR Viewer
- 19 Wizard Easy Programming
- 111 Collaborative Robots
- 5 Job listings