
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
- 398 UpFeed
- 19 Tutorials
- 13 RobotApps
- 299 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 250 ScreenMaker
- 2.8K Robot Controller
- 324 IRC5
- 63 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 813 RAPID Programming
- 5 AppStudio
- 3 RobotStudio AR Viewer
- 19 Wizard Easy Programming
- 105 Collaborative Robots
- 5 Job listings