Wepall API 🤖
Wepall API is a powerful robotic language translation tool. In the world of robotics we can find a huge collection of robots that differ in the language in which they communicate, either by brand or by their controller version. Generally, it is necessary to understand and handle these languages in order to be able to program the robot, requiring prior learning or knowledge. This tool proposes an abstraction of these languages, taking care of the robot's code. Through a standard programming language the tool will translate the commands into those appropriate for the brand of robot that we have previously specified.
In this page we are going to focus on explaining how to handle the language of the API and how to get a program in a specific robot language. The API request is made via a JSON file which contains objects through tags. It can be done in any way the user prefers, either through an editor or a programming language.
Access to the API
For example you can connect to the API via curl with a POST method and a JSON body in Wepall API terminology.
curl -X POST "https://api.wepall.com/api" -H "accept: text/plain" -H "Content-Type: application/json" -d "{\"RobotBrand\":\"abb\",\"RobotController\":\"r-30i\",\"Instructions\":[{\"MethodName\":\"label\",\"Params\":[{\"Type\":\"label\",\"Name\":\"begin\",\"Value\":\"begin\"}]},{\"MethodName\":\"goto\",\"Params\":[{\"Type\":\"label\",\"Name\":\"begin\",\"Value\":\"begin\"}]},{\"MethodName\":\"Assign\",\"Params\":[{\"Type\":\"number\",\"Name\":\"asignado\",\"Value\":\"0\",\"Scope\":\"local\"},{\"Type\":\"number\",\"Value\":\"1\"}]},{\"MethodName\":\"Assign\",\"Params\":[{\"Type\":\"number\",\"Name\":\"layerIndex\",\"Value\":\"0\",\"Scope\":\"local\"},{\"Type\":\"number\",\"Value\":\"1\"}]}],\"ProgramName\":\"Test\"}"
Access to the Wepall API is through an endpoint by performing a POST to the following address:
- api.wepall.com/api
- api.wepall.com/api/many
You can test with our swagger tool to make your queries or use some REST application. In the case of the /many endpoint needs a list of program objects and not just one..
Program Type
{
"RobotBrand": "fanuc",
"RobotController": "r-30i",
"Instructions": [
......
],
"ProgramName": "Test"
}
The root of the JSON used to write the secuence is the Program. This class is made up of a number of parameters:
- RobotBrand: Type string tag. Brand name of the robot for which the code is intended.
- RobotController: Type string tag. Some brands have different controllers that can differentiate the programming language, it should be specified whenever necessary.
- Instructions: Type list of methods. List of instructions making up the program.
- ProgramName: Type string tag. Name of the program.
Robot brand value | Robot Controller value |
---|---|
"hyundai" | "hi5" | "hi6" |
"motoman" | "nx100" | "dx100" | "dx200" | "fs100" | "yrc1000" |
"fanuc" | "r-30i" | "r-30iplus" | "rj3" |
"kuka" | "none" |
"kawasaki" | "none" |
"techman robot" | "mone" |
"abb" | "none" |
"ur" | "none" |
Parameter Type
Parameters provide information needed to implement methods. They can take three basic forms.
- Type: Type string tag. It is used in the three general types and determines the type of the parameter.
Variable
A variable is a data type used to storage information and can be change throughout time. We can have variables of different data types, which we will explain later. To create a variable we need the following parameters:
- Name: Type string tag. Name of the variable, identifies and differentiates from the rest. Unnamed variables can be created.
- Value: Type string tag. Value destined to the variable, has different formats depending on the type.
- Scope: Type string tag. Can be declared as two values "global" and "local". This affects the visibility of the variable in the final robot language, it may be used in only one program file or in all of them. If not specified, "local" is taken as the default value.
- Store: Type string tag. Can be declared as two values "persist" and "nopersist". Affects the volatility of the variable in the final language. A context switch in the program may or may not erase the contents of the variable. This section depends very much on the language of the robot. If not specified, "nopersist" is taken as the default value.
The parameters presented above are those belonging to a variable but some of them have a specific format.
Pose
{
"Type" : "Pose",
"Name" : "pose1",
"Value" : "c;-11111;-887723;835920;-136265;179381;-89263;nuf000"
}
Type: "pose"
Value: <poseType>; "<X-A1>;<Y-A2>;<Z-A3>;<W-A4>;<P-A5>;<R-A6>;<config>"
- "c;<X>;<Y>;<Z>;<W>;<P>;<R>;<config>"
- "a;<A1>;<A2>;<A3>;<A4>;<A5>;<A6>;<config>"
Syntax Definition Value PoseType Type representation of the pose, can be Cartesian and axial. "c" or "a" X X-value of the point. Number (μm) Y Y-value of the point. Number (μm) Z Z-value of the point. Number (μm) W Rotation in X-value of the point. Number (μm) P Rotation in Y-value of the point. Number (μm) R Rotation in Z-value of the point. Number (μm) A<N> Axial value in the in the N joint. Number (μm) config Robot body configuration. Needs 6 values chained. <n|f><u|l><f|b><-1|0|1><-1|0|1><-1|0|1>
When we talk about the configuration of the body we must understand what each value represents.
- No Flip and Flip (n|f):
- Flip: Wrist turned, positioned upwards relative to the arm.
- No Flip: Wrist not rotated, positioned downward relative to the arm.
- Up and Low (u|l):
- Up: J3 axle forward arm positioned upwards.
- Low: J3 axle forward arm positioned downwards.
- Front and Back (f|b):
- Arm positioned forward.
- Arm positioned backwards.
- Limitation of rotation in the fourth axis (-1|0|1): ⇩
- Limitation of rotation in the fifth axis (-1|0|1): ⇩
- Limitation of rotation in the sixth axis (-1|0|1):
- -1: -539º → -180º
- 0: -179º → 179º
- 1: 180 → 539º
Boolean
{
"Type" : "bool",
"Name" : "b1",
"Value" : "True"
}
- Type: "bool"
- Value: <True|False>
Data type with two possible values: true or false.
Label
{
"Type" : "label",
"Name" : "label1",
"Value" : "labelMove"
}
- Type: "label"
- Value: "<internalLabelName>"
Data type that content a string name of a label.
Signal
{
"Type" : "signal",
"Name" : "AOTestAnalog",
"Value" : "AO8;105"
}
Type: "signal"
Value: "<signalType><size>;<port>"
Signal type | Value |
---|---|
Digital | d |
Analog | a |
Group | g |
Size: Number of ports covered by the signal.
Port: Number of initial port of the signal.
The values that align the signals are boolean for digital signals, decimal for analogue signals and number for group signals.
Number
{
"Type": "number",
"Name": "layerIndex",
"Value": "0",
"Scope": "local"
}
- Type: "number"
- Value: "<number>"
Data type to represent an integer.
Decimal
This example want to create a decimal with value of 60:
{
"Type": "decimal",
"Name": "blend1",
"Value": "60000"
}
- Type: "decimal"
- Value: "<decimal * 1000>"
Data type to represent a decimal.
Text
{
"Type": "text",
"Value": "Request next product/s to PLC"
}
- Type: "text"
- Value: "<internalValueString>"
Data of type string of text.
Trigger
{
"Type": "trigger",
"Value": "69:signal:DOToolMainOn:do1;1:Number::3:500"
}
{
"Type": "trigger",
"Value": "0:signal:DOToolMainOn:do1;1:bool::false"
}
{
"Type": "trigger",
"Value": "26:CloseTool"
}
- Type: "trigger"
- Value:
- "<distance>:<targetType>:<targetName>:<targetValue>:<sourceType>:<sourceName>:<sourceValue>:<ms>"
- "<distance>:<targetType>:<targetName>:<targetValue>:<sourceType>:<sourceName>:<sourceValue>"
- "<distance>:<nameFuntion>"
There are three different types of triggers. All of them have a distance but can vary in what makes the trigger. In two of them an assignment can be triggered, one with an activation pulse and one without it. The last case is a trigger that executes a call to a function/program.
Expression
{
"Type": "expression",
"Left": {
"Type": "expression",
"Left": {
"Type": "signal",
"Name": "DIForceCyle",
"Value": "DI0;1005"
},
"Right": {
"Type": "bool",
"Value": "True"
},
"Operator": "eq"
},
"Right": {
"Type": "expression",
"Left": {
"Type": "Decimal",
"Name": "AIForceCyle",
"Value": "2"
},
"Right": {
"Type": "signal",
"Name": "GoForceCyle",
"Value": "Go4;4"
},
"Operator": "eq"
},
"Operator": "and"
}
It is used in certain types of methods and consists of three specific parts.
Left: Type Parameter tag. Used for logical expressions and embedding them.
Right: Type Parameter tag. Used for logical expressions and embedding them.
Operator: Type string tag. Can be a boolean symbol or conditional symbol.
- Boolean symbols
Value Equivalent symbol Explanation Example pseudocode "and" ∧ The statement A ∧ B is true if A and B are both true; otherwise, it is false. variableOpen ∧ variableProduct "or" ∨ The statement A ∨ B is true if A or B (or both) are true; if both are false, the statement is false. variableOpen ∨ variableProduct "not" ¬ The statement ¬A is true if and only if A is false. ¬variableOpen - Conditional symbols
Value Equivalent symbol Explanation Example pseudocode "eq" == Checks if two values are equal. variableOpen == True "ne" != Checks if two values are different. variableOpen != True "gt" > Checks if the left value is greater than the second value. variableNProduct > 5 "get" >= Checks if the left value is greater than the second value or equal. variableNProduct >= 4 "lt" < Checks if the left value is lower than the second value. variableNProduct < 5 "let" <= Checks if the left value is lower than the second value or equal. variableNProduct <= 4
Method list
{
"Type": "methodlist",
"Instructions": [
{
"MethodName": "Assign",
"Params": [
{
"Type": "number",
"Name": "layerIndex",
"Value": "0"
},
{
"Type": "signal",
"Name": "GIForcedLayer",
"Value": "GI4;1007"
}
]
},
{
"MethodName": "Assign",
"Params": [
{
"Type": "number",
"Name": "cycleIndex",
"Value": "0"
},
{
"Type": "signal",
"Name": "GIForcedCycle",
"Value": "GI4;1002"
}
]
},
{
"MethodName": "setsignal",
"Params": [
{
"Type": "signal",
"Name": "DOForced",
"Value": "do1;101"
},
{
"Type": "bool",
"Value": "true"
}
]
}
]
}
A parameter can be a list, this is because different methods may need a list of commands as an argument to be executed. The methods are explained in later sections.
Method Type
A method corresponds to a specific Wepall API language instruction and is loaded into the Program list.
- MethodName: Type string tag. Name of the Wepall API instruction.
- Params: List of Params. There are methods without the need for a parameter list.
Mathematical operations
Add and Addto
{
"MethodName": "Add",
"Params": [
{
"Type": "decimal",
"Name": "dec5",
"Value": "2050"
},
{
"Type": "decimal",
"Name": "dec6",
"Value": "6000"
},
{
"Type": "decimal",
"Name": "dec7",
"Value": "0000"
}
]
}
{
"MethodName": "Addto",
"Params": [
{
"Type": "number",
"Name": "num1",
"Value": "5"
},
{
"Type": "number",
"Name": "num2",
"Value": "12"
}
]
}
Methods for adding numbers of either "integer" or "decimal" type. Add needs three integer or decimal arguments and Addto needs two.
- Add: Adds the first and second arguments and stores them in the third argument.
- Addto: Add the number of the first and second arguments and store it in the first argument.
Sub and Subto
{
"MethodName": "Sub",
"Params": [
{
"Type": "decimal",
"Name": "dec5",
"Value": "20670"
},
{
"Type": "decimal",
"Name": "dec6",
"Value": "8500"
},
{
"Type": "decimal",
"Name": "dec7",
"Value": "0"
}
]
}
{
"MethodName": "Subto",
"Params": [
{
"Type": "number",
"Name": "num1",
"Value": "20"
},
{
"Type": "number",
"Name": "num2",
"Value": "5"
}
]
}
Methods for subtracting numbers of "integer" or "decimal" type. Sub needs three integer or decimal arguments and Subto needs two.
- Sub: Subtracts the first and second arguments and stores them in the third argument.
- Subto: Subtracts the number of the first and second arguments and store it in the first argument.
Div and Divto
{
"MethodName": "Div",
"Params": [
{
"Type": "decimal",
"Name": "dec5",
"Value": "50670"
},
{
"Type": "decimal",
"Name": "dec6",
"Value": "7600"
},
{
"Type": "decimal",
"Name": "dec7",
"Value": "0"
}
]
}
{
"MethodName": "Divto",
"Params": [
{
"Type": "number",
"Name": "num1",
"Value": "60"
},
{
"Type": "number",
"Name": "num2",
"Value": "20"
}
]
}
Methods for dividing numbers of "integer" or "decimal" type. Div needs three integer or decimal arguments and Divto needs two.
- Div: Divides the first and second arguments and stores them in the third argument.
- Divto: Divides the number of the first and second arguments and store it in the first argument.
Mult and Multo
{
"MethodName": "Mult",
"Params": [
{
"Type": "decimal",
"Name": "dec5",
"Value": "40600"
},
{
"Type": "decimal",
"Name": "dec6",
"Value": "5200"
},
{
"Type": "decimal",
"Name": "dec7",
"Value": "0"
}
]
}
{
"MethodName": "Multo",
"Params": [
{
"Type": "number",
"Name": "num1",
"Value": "5"
},
{
"Type": "number",
"Name": "num2",
"Value": "8"
}
]
}
Methods for multiplying numbers of "integer" or "decimal" type. Mult needs three integer or decimal arguments and Multto needs two.
- Mult : Multiplies the first and second arguments and stores them in the third argument.
- Multo: Multiplies the number of the first and second arguments and store it in the first argument.
Signals
Setsignal
{
"MethodName": "Setsignal",
"Params": [
{
"Type": "signal",
"Name": "GOTotalLayers",
"Value": "go8;10"
},
{
"Type": "number",
"Value": "7"
}
]
}
Changes the state of a signal. It needs two arguments, one corresponds to the signal we are going to use and the other is the target value.
Setsignalpulse
{
"MethodName": "SetsignalPulse",
"Params": [
{
"Type": "signal",
"Name": "GOCurrentCycle",
"Value": "do1;10"
},
{
"Type": "bool",
"Value": "true"
},
{
"Type": "number",
"Value": "500"
}
]
}
Changes the value of a signal for a specified period in milliseconds. It needs three variables, one for the signal, one for the value that the signal will take and finally a type number corresponding to the milliseconds of the pulse.
Extra code lines
Comment
{
"MethodName": "comment",
"Params": [
{
"Type": "text",
"Value": "Request product/s to PLC"
}
]
}
Enter a comment in the destination code. Requires a text variable.
EmptyLine
{
"MethodName": "EmptyLine"
}
Enter an empty line in the final code.
Movement
Trigger
{
"MethodName": "trigger",
"Params": [
{
"Type": "trigger",
"Value": "69:signal:DOToolMainOn:do1;1:Number::3:500"
}
]
}
Creates a trigger for a movement. Needs an variable of type trigger.
Movelinear
{
"MethodName": "Movelinear",
"Params": [
{
"Type": "pose",
"Name": "Pose3",
"Value": "c;1903060;1192850;395790;180;90;0;nuf000",
"Scope": "GlObAl"
}
]
}
Makes a linear movement to a point. Requires a Pose variable.
Movelinearuntil
{
"MethodName": "Movelinearuntil",
"Params": [
{
"Type": "pose",
"Name": "Pose3",
"Value": "c;1903060;1192850;395790;180;90;0;nuf000",
"Scope": "GlObAl"
},
{
"Type": "expression",
"Left": {
"Type": "Decimal",
"Name": "AIForceCyle",
"Value": "2"
},
"Right": {
"Type": "signal",
"Name": "GoForceCyle",
"Value": "Go4;4"
},
"Operator": "eq"
}
]
}
It makes a linear movement until a condition is met. Requires a Pose variable and an Expression.
Movejoint
{
"MethodName": "Movejoint",
"Params": [
{
"Type": "pose",
"Name": "PosePick",
"Value": "c;1903060;1192850;395790;180;90;0;nuf000",
"Scope": "global"
}
]
}
Makes a joint movement to a point. Requires a Pose variable.
Movejointuntil
{
"MethodName": "Movejointuntil",
"Params": [
{
"Type": "pose",
"Name": "PosePick",
"Value": "c;1903060;1192850;395790;180;90;0;nuf000",
"Scope": "global"
},
{
"Type": "expression",
"Left": {
"Type": "Decimal",
"Name": "AIForceCyle",
"Value": "2"
},
"Right": {
"Type": "signal",
"Name": "GoForceCyle",
"Value": "Go4;4"
},
"Operator": "eq"
}
]
}
It makes a joint movement until a condition is met. Requires a Pose variable and an Expression.
Movecircular
{
"MethodName": "Movecircular",
"Params": [
{
"Type": "pose",
"Name": "Poseway",
"Value": "c;1503060;1492850;395790;180;90;0;nuf000",
"Scope": "global"
},
{
"Type": "pose",
"Name": "PosePick",
"Value": "c;1903060;1192850;395790;180;90;0;nuf000",
"Scope": "global"
}
]
}
Circular motion towards a point. It needs two points, the first is a waypoint to establish the circular motion, the second is the destination point.
Waitings
Waittime
{
"MethodName": "Waittime",
"Params": [
{
"Type": "number",
"Value": "1000"
}
]
}
Wait for a time in the execution of the program. It needs a variable number that corresponds to the waiting time.
Waitsignal
{
"MethodName": "Waitsignal",
"Params": [
{
"Type": "signal",
"Name": "GoToolMainActive",
"Value": "go16;0"
},
{
"Type": "Number",
"Value": "5"
}
]
}
Wait until a signal contains the specified value. It needs a signal variable and another variable with the expected value.
Waitinplace
{
"MethodName": "Waitinplace"
}
Wait until the robot has performed the current movement.
Pause
{
"MethodName": "Pause"
}
Pauses code execution.
Change robot constants
Tool
{
"MethodName": "Tool",
"Params": [
{
"Type": "number",
"Value": "1"
}
]
}
Changes the robot's current tool to that of the specified number. Requires a number argument.
Frame
{
"MethodName": "Frame",
"Params": [
{
"Type": "number",
"Value": "1"
}
]
}
Changes the robot's current frame or base to that of the specified number. Requires a number argument.
Setspeedj
{
"MethodName": "Setspeedj",
"Params": [
{
"Type": "decimal",
"Value": "60000"
}
]
}
Changes the speed of the joint motion of the robot. It needs a variable of type number, the value must be between 0 and 100 as it is a percentage.
Setspeedl
{
"MethodName": "Setspeedl",
"Params": [
{
"Type": "decimal",
"Value": "60000"
}
]
}
Changes the speed of the linear motion of the robot. It needs a variable of type number, the value must be between 0 and 100 as it is a percentage.
Setaccelj
{
"MethodName": "Setaccelj",
"Params": [
{
"Type": "decimal",
"Value": "60000"
}
]
}
Changes the acceleration of the joint motion of the robot. It needs a variable of type number, the value must be between 0 and 100 as it is a percentage.
Setaccell
{
"MethodName": "Setaccell",
"Params": [
{
"Type": "decimal",
"Value": "60000"
}
]
}
Changes the acceleration of the linear motion of the robot. It needs a variable of type number, the value must be between 0 and 100 as it is a percentage.
Setblendj
{
"MethodName": "Setblendj",
"Params": [
{
"Type": "decimal",
"Value": "60000"
}
]
}
Changes the blend of the joint motion of the robot. It needs a variable of type number, the value must be between 0 and 100 as it is a percentage.
Setblendl
{
"MethodName": "Setblendl",
"Params": [
{
"Type": "decimal",
"Value": "60000"
}
]
}
Changes the blend of the linear motion of the robot. It needs a variable of type number, the value must be between 0 and 100 as it is a percentage.
Variables
Assign
{
"MethodName": "Assign",
"Params": [
{
"Type": "Pose",
"Name": "home",
"Value": "c; 1; 2; 33; 404; 505; 6; nuf000",
"Scope": "local"
},
{
"Type": "Pose",
"Value": "c;-15151515;-887723;835920;-136265;179381;-89263;nuf000"
}
]
}
Assigns a specific value to a variable, the types must be compatible. It needs a variable to which the value is assigned and another with the target value.
Assigncurrentpose
{
"MethodName": "Assigncurrentpose",
"Params": [
{
"Type": "Pose",
"Name": "poseCurrent",
"Value": "c;-11111;-887723;835920;-136265;179381;-89263;nuf000"
}
]
}
Assigns to a Pose the value of the robot's current position. It needs a pose variable to store the value.
Assigncomponent
{
"MethodName": "Assigncomponent",
"Params": [
{
"Type": "Pose",
"Name": "component",
"Value": "c;-11111;-887723;835920;-136265;179381;-89263;nuf000"
},
{
"Type": "decimal",
"Value": "6543"
},
{
"Type": "number",
"Value": "2"
}
]
}
Changes the value of a component of the coordinate or axis that make up a Pose. It needs a pose variable which is the one that will mutate its value, a decimal variable which is the target value and finally a number variable which is the number of the coordinate or axis to change in the pose.
Getcomponent
{
"MethodName": "Getcomponent",
"Params": [
{
"Type": "Pose",
"Name": "component",
"Value": "c;-11111;-887723;835920;-136265;179381;-89263;nuf000"
},
{
"Type": "decimal",
"Name": "targetComp",
"Value": "0"
},
{
"Type": "number",
"Value": "2"
}
]
}
Stores the value of a component of a pose in a decimal variable. You need a pose variable to get the value from, a decimal variable to store the component in, and finally a variable that determines the component to copy.
Copycomponent
{
"MethodName": "Copycomponent",
"Params": [
{
"Type": "pose",
"Name": "Pose200",
"Value": "c;-222222;-887723;835920;-136265;179381;-89263;nuf000"
},
{
"Type": "pose",
"Name": "Pose100",
"Value": "c;-150000;-598890;456000;-115000;145000;-129045;nuf000"
},
{
"Type": "number",
"Value": "2"
}
]
}
Change the value of a component of the coordinate or axis that make up a Pose through another pose. It needs a pose variable which is the one that will mutate its value, another pose variable which contains the target value and finally a number variable which is the number of the coordinate or axis to change in the first pose.
Flow control
Abort
{
"MethodName": "Abort"
}
It throws an error message and closes the program.
End
{
"MethodName": "End"
}
Terminates the current subprogram or function, returns to a higher-level program.
If
{
"MethodName": "If",
"Params": [
{
"Type": "expression",
"Left": {
"Type": "expression",
"Left": {
"Type": "signal",
"Name": "DIForceCyle",
"Value": "DI0;1005"
},
"Right": {
"Type": "bool",
"Value": "True"
},
"Operator": "eq"
},
"Right": {
"Type": "expression",
"Left": {
"Type": "Decimal",
"Name": "AIForceCyle",
"Value": "2"
},
"Right": {
"Type": "signal",
"Name": "GoForceCyle",
"Value": "Go4;4"
},
"Operator": "eq"
},
"Operator": "and"
},
{
"Type": "methodlist",
"Instructions": [
{
"MethodName": "Assign",
"Params": [
{
"Type": "number",
"Name": "layerIndex",
"Value": "0"
},
{
"Type": "signal",
"Name": "GIForcedLayer",
"Value": "GI4;1007"
}
]
},
{
"MethodName": "Assign",
"Params": [
{
"Type": "number",
"Name": "cycleIndex",
"Value": "0"
},
{
"Type": "signal",
"Name": "GIForcedCycle",
"Value": "GI4;1002"
}
]
},
{
"MethodName": "setsignal",
"Params": [
{
"Type": "signal",
"Name": "DOForced",
"Value": "do1;101"
},
{
"Type": "bool",
"Value": "true"
}
]
}
]
}
]
}
Creates an if command in the program with a expression and a list of commands to be executed if the condition is met.
Else
{
"MethodName": "Else",
"Params": [
{
"Type": "methodlist",
"Instructions": [
{
"MethodName": "Assign",
"Params": [
{
"Type": "number",
"Name": "cycleIndex",
"Value": "0"
},
{
"Type": "number",
"Value": "1"
}
]
},
{
"MethodName": "setsignal",
"Params": [
{
"Type": "signal",
"Name": "GOCurrentCycle",
"Value": "go1;101"
},
{
"Type": "number",
"Value": "1"
}
]
}
]
}
]
}
Creates an else command in the program with a list of commands to execute, it is always inserted after an if command and will be executed if the if condition is not met.
While
{
"MethodName": "While",
"Params": [
{
"Type": "expression",
"Left": {
"Type": "bool",
"Name": "isEOL",
"Value": "True"
},
"Right": {
"Type": "bool",
"Value": "True"
},
"Operator": "eq"
},
{
"Type": "methodlist",
"Instructions": [
{
"MethodName": "Assign",
"Params": [
{
"Type": "number",
"Name": "cycleIndex",
"Value": "0"
},
{
"Type": "number",
"Value": "1"
}
]
},
{
"MethodName": "setsignal",
"Params": [
{
"Type": "signal",
"Name": "GOCurrentCycle",
"Value": "go1;101"
},
{
"Type": "number",
"Value": "1"
}
]
}
]
}
]
}
Creates a command loop with an exit condition. It needs an expression for the output condition and a list of methods for execution.
Loop
{
"MethodName": "Loop",
"Params": [
{
"Type": "methodlist",
"Instructions": [
{
"MethodName": "Assign",
"Params": [
{
"Type": "number",
"Name": "cycleIndex",
"Value": "0"
},
{
"Type": "number",
"Value": "1"
}
]
},
{
"MethodName": "setsignal",
"Params": [
{
"Type": "signal",
"Name": "GOCurrentCycle",
"Value": "go1;101"
},
{
"Type": "number",
"Value": "1"
}
]
}
]
}
]
}
I create an execution loop with an execution list. It needs a list of commands as an argument.
Label
{
"MethodName": "label",
"Params": [
{
"Type": "text",
"Value": "part1"
}
]
}
Create a label tag in the target program to mark a part of the code. It needs a label variable.
Goto
{
"MethodName": "label",
"Params": [
{
"Type": "text",
"Value": "part1"
}
]
}
Switches the execution of the program to the beginning of the specified label. Requires a label variable.
Call
{
"MethodName": "call",
"Params": [
{
"Type": "text",
"Value": "goHome"
}
]
}
Calls the execution of a function or subprogram. Requires a text variable with the name of the function to be called.
Program examples
Under construction
Notes on languages
This section explains the possible special cases of the translator in his or her different languages.
Under construction.
ABB
Reserved variables
There are different variables that are created automatically by the api and that the user should not name in the same way.
- Trigger
- auxPoseUntil
Pose restrictions
ABB does not have different robot body configurations, only one for palletising. This configuration places the robot elbow at the top and the head parallel to the floor.
Moveuntil
There is no reasonable translation for the Movejointuntil command and it is not implemented. In the case of Movelinearuntil nested expressions are not allowed and the variable in such an expression must be a digital input signal. The expected value of the variable is negligible because the command will cause the robot to stop when the state of the signal changes, regardless of its value.
Trigger
Call triggers do not exist at ABB.
Errors
The Wepall API uses the following error codes:
Error Code | Meaning |
---|---|
400 | Bad Request -- Your request is invalid. |
401 | Unauthorized -- Your API key is wrong. |
403 | Forbidden -- Restricted language. |
404 | Not Found -- The robot or controller does not exist. |
405 | Method Not Allowed -- It is possible that the method you are asking for does not exist or does not have all its parameters. |
406 | Not Acceptable -- You requested a format that isn't json. |
410 | Gone -- The language has been removed from the server. |
429 | Too Many Requests -- You're requesting too many translations. |
500 | Internal Server Error -- We had a problem with our server. Try again later. |
503 | Service Unavailable -- We're temporarily offline for maintenance. Please try again later. |