Forum Migration Notice
Update (2026-01-21): The user forums are now in read-only mode pending the data migration.
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.
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.
How to solve Error trying to use cameradev as a parameter
XNOR
✭
RobotWare 6.09.02.00:
So I'm trying to use cameradev as a parameter in a routine. Per the datatype details:
So I'm trying to use cameradev as a parameter in a routine. Per the datatype details:
>>
Data of the type cameradev must not be defined in the program. However, if it is then an error message will be displayed as soon as an instruction or function that refers to this cameradev is executed. The data type can, on the other hand, be used as a parameter when declaring a routine.
>>
Obviously there are plenty of built in routines and functions that use cameradev as a parameter already.
So what happens is I'm trying to use as follows:
PROC rLoadVisionProg(cameradev CamName ,string ProgName)
...
ENDPROC
And I'll get a semantic error: Type error(83): cameradev not value type
Tagged:
0
Best Answer
-
Digging deep into the Kernal manual I found the solution in the 'DATA TYPE VALUE CLASSES' section. There is a table that shows 'Possible and impossible combinations of object usage and type value class'. It indicated for parameters of type Non-value or semi-value you need to prefix with a VAR declaration.
So this worked when I added VAR in front:
PROC rLoadVisionProg(VAR cameradev CamName, string ProgName)
1
Answers
-
It might be the case that they use it as a switch parameter.
The special type, switch, may (only) be assigned to optional parameters and provides a means to use switch arguments, that is arguments that are only specified by names (not values).
Lee Justice0 -
Good job, thanks for sharing.Lee Justice0
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
