Forum Migration Notice
We're transitioning to a more modern community platform by the end of this year. Learn about the upcoming changes and what to expect.
Is there a way of setting digital outputs using a string variable?
I am currently setting up a simulation in which the robot has to pick 90 parts from a draw, im looking for a quick way to hide the parts as the robot picks them in a simulation.
Rather than writing a long "TEST" function, i was hoping i could do something like
Var String outputname := "HidePart";
PROC SetDO()
Set outputname + PickNumber;
ENDPROC
This way if i configured a the signals as "HidePart1", "HidePart2".... etc. it would be a simple way of setting the correct output in the rapid?
Sorry if this isn't clearly explained but figured someone would know a quick way of doing it.
Thanks in advance for your help
Regards
Rather than writing a long "TEST" function, i was hoping i could do something like
Var String outputname := "HidePart";
PROC SetDO()
Set outputname + PickNumber;
ENDPROC
This way if i configured a the signals as "HidePart1", "HidePart2".... etc. it would be a simple way of setting the correct output in the rapid?
Sorry if this isn't clearly explained but figured someone would know a quick way of doing it.
Thanks in advance for your help
Regards
Tagged:
0
Answers
-
Hello,You can use GetDataVal:
VAR signaldo doOutput; GetDataVal "MyOuputCommonName"+ValToStr(nIndex),doOutput; SetDO doOutput,high;
☑️2024 - RobotStudio® User Group1 -
thats perfect, Thanks for your advice
0
Categories
- All Categories
- 5.6K RobotStudio
- 401 UpFeed
- 21 Tutorials
- 15 RobotApps
- 306 PowerPacs
- 407 RobotStudio S4
- 1.8K Developer Tools
- 250 ScreenMaker
- 2.9K Robot Controller
- 365 IRC5
- 84 OmniCore
- 8 RCS (Realistic Controller Simulation)
- 854 RAPID Programming
- 37 AppStudio
- 4 RobotStudio AR Viewer
- 19 Wizard Easy Programming
- 110 Collaborative Robots
- 5 Job listings