RAPID: Use signal as parameter in a procedure
in RobotStudio
The RAPID reference manual states about signalxx type: "The data type can, on the other hand, be used as a parameter when declaring a
routine."
I have a routine that uses a signalgo as an input parameter, but RobotStudio throws an error when I check the program.
Am I doing something wrong or is what I'm trying to do not possible?
0
Comments
-
What is the error?0
-
Maybe we can help to you when we see error code0
-
Was it "signalgo not value type"?I've had the same issues. I finally got around it (probably not the most efficient way) by doing a test of the GI:TEST GInputDnum(giProgramNum)CASE 1:rFD4_Blade1;CASE 2:rFD4_Blade2;CASE 3:rFD4_Blade3;ENDTESTIn my case I was calling routines directly as a result of the test, but I would imagine you could assign a value to a num data type, then use that num as an input parameter. Of course, that would be difficult and a lot of code if you have a large range of possible GI values, but it worked for me in my situation.-Bria0
-
Hi,
if you use a signal as parameter for a routine, you have to user the argument "VAR" before the datatype in the routine header.
Example:
PROC TestSignal(VAR signalgo signal)
setgo signal,2;
ENDPROC
Regards
Micky
1
Categories
- All Categories
- 5.5K RobotStudio
- 396 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 249 ScreenMaker
- 2.7K Robot Controller
- 310 IRC5
- 59 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 785 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 4 Job listings