Autofeed select
                    I have created a function in a select but actually want the function to be different. I am now searching on wd for the weld data but actually want to search on welddata so that I can include all the weld data not only the welddata that are defined like wd.
PERS welddata teste123:=[5,0,[0,0,0,100,0,0,0,0,0,0],[0,0,0,100,0,0,0,0,0,0]];
                
                        Appstudio code:
    PERS welddata test123:=[5,0,[0,0,0,100,0,0,0,0,0,0],[0,0,0,100,0,0,0,0,0,0]];const module = "mRW_GoFaData";
  const task = "T_ROB1";
  const result = [];
  for (let i = 1; i <= 100; i++) {
    const name = "wd" + i;
    try {
      const type = await API.RAPID.getVariableType(module, name, task);
      if (type === "welddata") {
        result.push(`${name}|${name}`);
      }
    } catch (e) {
      // Variabele bestaat niet, doorgaan
    }
  }
  this.optionItems = result.join(";");
Rapid code:
Rapid code:
    !---------------- Welddata -------------------
PERS welddata wd1:= [12,7.5,[1.7,3.1,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0]];
PERS welddata wd2:= [9.5,1.6,[0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0]];
PERS welddata wd3:= [5,0,[0,0,0,100,0,0,0,0,0,0],[0,0,0,100,0,0,0,0,0,0]];
PERS welddata wd4:= [5,0,[0,0,0,100,0,0,0,0,0,0],[0,0,0,100,0,0,0,0,0,0]];
PERS welddata wd5:= [5,0,[0,0,0,100,0,0,0,0,0,0],[0,0,0,100,0,0,0,0,0,0]];
PERS welddata wd6:= [5,0,[0,0,0,100,0,0,0,0,0,0],[0,0,0,100,0,0,0,0,0,0]];
PERS welddata wd7:= [5,0,[0,0,0,100,0,0,0,0,0,0],[0,0,0,100,0,0,0,0,0,0]];
PERS welddata wd8:= [5,0,[0,0,0,100,0,0,0,0,0,0],[0,0,0,100,0,0,0,0,0,0]];
PERS welddata wd9:= [5,0,[0,0,0,100,0,0,0,0,0,0],[0,0,0,100,0,0,0,0,0,0]];
PERS welddata wd10:=[5,0,[0,0,0,100,0,0,0,0,0,0],[0,0,0,100,0,0,0,0,0,0]];
PERS welddata wd60:=[5,0,[0,0,0,100,0,0,0,0,0,0],[0,0,0,100,0,0,0,0,0,0]];
PERS welddata wd1:= [12,7.5,[1.7,3.1,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0]];
PERS welddata wd2:= [9.5,1.6,[0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0]];
PERS welddata wd3:= [5,0,[0,0,0,100,0,0,0,0,0,0],[0,0,0,100,0,0,0,0,0,0]];
PERS welddata wd4:= [5,0,[0,0,0,100,0,0,0,0,0,0],[0,0,0,100,0,0,0,0,0,0]];
PERS welddata wd5:= [5,0,[0,0,0,100,0,0,0,0,0,0],[0,0,0,100,0,0,0,0,0,0]];
PERS welddata wd6:= [5,0,[0,0,0,100,0,0,0,0,0,0],[0,0,0,100,0,0,0,0,0,0]];
PERS welddata wd7:= [5,0,[0,0,0,100,0,0,0,0,0,0],[0,0,0,100,0,0,0,0,0,0]];
PERS welddata wd8:= [5,0,[0,0,0,100,0,0,0,0,0,0],[0,0,0,100,0,0,0,0,0,0]];
PERS welddata wd9:= [5,0,[0,0,0,100,0,0,0,0,0,0],[0,0,0,100,0,0,0,0,0,0]];
PERS welddata wd10:=[5,0,[0,0,0,100,0,0,0,0,0,0],[0,0,0,100,0,0,0,0,0,0]];
PERS welddata wd60:=[5,0,[0,0,0,100,0,0,0,0,0,0],[0,0,0,100,0,0,0,0,0,0]];
PERS welddata teste123:=[5,0,[0,0,0,100,0,0,0,0,0,0],[0,0,0,100,0,0,0,0,0,0]];
            Tagged:
            
        
0  
            Comments
- 
            Hallo, I do not have an idea for AppStudio but you might use SetDataSearch/GetDataVal from Rapid.You can use for all welddata(or any other type) and do some restrictions for the specific name etc.matti0
- 
            is it possible to create a process in rapid that puts all the welding data in an array regardless of the name?
 0
- 
            Hallo, DataSearch is to find all variables of a certain type in a module/task/controller.An array is a declaration, so it can't be done during Rapid-execution.But you can declare an empty array and assign with what you have found with DataSearch, I think.To make an array of record-like structures like welddata or robtarget has the disadvantage, that you can't pick components from that structures in the the data-window on flex-pendant easily.matti0
- 
            Hi ...Jur148 ...Wouldn't a RECORD solve your problem??RECORD objectWd string name; num index; welddata wd; ENDRECORPERS objectWd wd{2}:=[['wd1',1,[12,7.5,[1.7,3.1,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0]]],['wd2',2,[12,7.5,[1.7,3.1,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0]]]];Good Job0
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
- 363 IRC5
- 80 OmniCore
- 8 RCS (Realistic Controller Simulation)
- 853 RAPID Programming
- 31 AppStudio
- 4 RobotStudio AR Viewer
- 19 Wizard Easy Programming
- 110 Collaborative Robots
- 5 Job listings


