EN UG-020 Link 6 user guide r1.0
174
10 Tap to add a global variable in the currently selected namespace.
Related topics
on page 164
on page 245
Examples of JSON statements
JavaScript Object Notation (JSON) is a key-value format for representing structured data. It is
text-based, which makes it readable. There are a few things to know about its syntax.
Defining strings
Use double quotation marks around strings.
Examples:
1
{"name":"John"}
2
{"age":30}
3
{"sale":true}
1
meaningful_variable_name = {
2
"employee":{"name":"John", "age":30, "city":"Montreal"}
3
}
Access the value John by writing
${meaningful_variable_name.employee.name}
Define a variable named
var
as an array of values.
1
{"n":[0,1,2,3,4,5]}
The result of
${var.n[0]}
is 0 and of
${var.n[3]}
is 3.
Defining iterators
When you define a variable as an iterator, it must be defined as type Number. The first index is
always 0.
${var.n[${i}]}
outputs the value of each iteration over the array.
Adding a variable to the global namespace
Variables can be added to the global
from the
Variables
page.
About this task
Variables that belong to the global namespace are accessible as
Persistent Variables
in the
Select Variable
page.
Procedure
1.
Tap
Programming
>
Variables
.
The
Variables
page launches.
+1 514-277-3777
kinovarobotics.com
© 2022 Kinova inc. All rights reserved.
Summary of Contents for Link 6
Page 1: ...Link 6 user guide Optional gripper shown ...
Page 8: ......