Handle LOTS of signals
Boteon
✭
in RobotStudio
Hi!
I'm facing this situation: i want to be able to set specific virtual signals without huge TEST-CASE structures.
I'll try yo explain this better:
I'm receiving from an external source (e.g. the flexpendant or an external software via socket) the number of the signal i want to change. In order to maintain this structure flexible i want to manage something like 1000 signals equally divided in input and output ones.
Now, the number i received has to correspond to a specific signal. I would like to identify this signal without using a huge test-case structure. Is it possible in any ways? The name or the label of the signals are not important for my purpose.
Thanks,
Matteo
I'm facing this situation: i want to be able to set specific virtual signals without huge TEST-CASE structures.
I'll try yo explain this better:
I'm receiving from an external source (e.g. the flexpendant or an external software via socket) the number of the signal i want to change. In order to maintain this structure flexible i want to manage something like 1000 signals equally divided in input and output ones.
Now, the number i received has to correspond to a specific signal. I would like to identify this signal without using a huge test-case structure. Is it possible in any ways? The name or the label of the signals are not important for my purpose.
Thanks,
Matteo
0
Comments
-
Interesting problem. Never done it in production, but making a string from the number then aliasing to that output seems to work in a virtual test.
PROC SignalNameFromNum()
!made virtual digital outputs = "do_61", "do_62", "do_63"
VAR signaldo aliasOutput;
VAR num signalNumber;
VAR string SignalName;
signalNumber:=62;
SignalName:="do_"+NumToStr(signalNumber,0);
AliasIO SignalName, aliasOutput;
SetDO aliasOutput, 1;
ENDPROC
2 -
Wow, brilliant solution! I didn't consider AliasIO because i thought it would accept only Signado variables. I'll try it. Thanks!!0
Categories
- All Categories
- 5.5K RobotStudio
- 396 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 250 ScreenMaker
- 2.8K Robot Controller
- 316 IRC5
- 61 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 801 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 5 Job listings