Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

VAL3 Version s6.x - VAL3 XML Format

Download as pdf or txt
Download as pdf or txt
You are on page 1of 15

SPECIFICATIONS DU FORMAT VAL3 - XML

FAVERGES

01.07.2004

Contents
1. Document Purpose............................................................................................................................. 1
2. VAL3 Architecture .............................................................................................................................. 1
3. fileS specification................................................................................................................................ 2
3.1.
Project file.................................................................................................................................. 2
3.1.1.
Example............................................................................................................................ 3
3.2.
Data file ..................................................................................................................................... 3
3.2.1.
aio type ............................................................................................................................. 4
3.2.2.
bool type ........................................................................................................................... 4
3.2.3.
config for Scara (Rs) ......................................................................................................... 4
3.2.4.
config for Anthropomorphic Arm (Rx/Tx)........................................................................... 5
3.2.5.
Special config.................................................................................................................... 5
3.2.6.
dio type ............................................................................................................................. 6
3.2.7.
frame type......................................................................................................................... 6
3.2.8.
joint type for Scara Arm (Rs)............................................................................................. 7
3.2.9.
joint type for anthropomorphic Arm (Rx/Tx) ...................................................................... 7
3.2.10. Special Joint...................................................................................................................... 8
3.2.11. mdesc type........................................................................................................................ 8
3.2.12. num type ........................................................................................................................... 9
3.2.13. Point for Scara arm (Rs) ................................................................................................... 9
3.2.14. Point for anthropomorphic arm (Rx/Tx)........................................................................... 10
3.2.15. Special Point................................................................................................................... 11
3.2.16. sio type ........................................................................................................................... 11
3.2.17. string type ....................................................................................................................... 11
3.2.18. tool type .......................................................................................................................... 11
3.2.19. trsf type ........................................................................................................................... 12
3.2.20. Example of file ................................................................................................................ 13
3.3.
Program file ............................................................................................................................. 14
3.3.1.
Example:......................................................................................................................... 14

1.

DOCUMENT PURPOSE

This paper presents the XML specification for the VAL3 up to s5.2 version.
Each VAL3 file (project, data and program) is saved in an XML format
2. VAL3 ARCHITECTURE
A VAL3 project is organized with 3 kinds of file. The project file that contents the project parameters and
the list of all the files (data and program) concerning by the project. All the files must be in the same
directory and the directory must have the same name of the project file name.
1/15
STUBLI FAVERGES
Place Robert Stubli - BP 70
74210 FAVERGES FRANCE
Tl 33 (0)4 50 65 60 60- Fax 33(0)4 50 65 60 70
www.staubli.com - ISO 9001

S.C.A au Capital 7 718 400


R.C.S Annecy B 325 720 720
N Identification T.V.A FR 80 325 720 720
NAF 295 G

SPECIFICATIONS DU FORMAT VAL3 - XML


FAVERGES

01.07.2004

The file extensions are:


PJX for project file
DTX for data file
PGX for program file
Example: a project named dummy with two programs start and stop
C:\

usrapp
dummy
dummy.pjx
dummy.dtx
start.pgx
stop.pgx

3. FILES SPECIFICATION
All the files are stored in XML.
The encoding code is iso-8859-1 for version VAL3 before s6.* and utf-8 for VAL3 version s6.* and
after.
Example:
<?xml version="1.0" encoding="utf-8" ?>

CAUTION: all the tags and attributes are case sensitive.


3.1. Project file
The project file lists all the files of the project.
The main tag is project and the namespace is ProjectNameSpace
The tag for the parameters is parameters and has the following attributes:
version specify the version of the VAL3 for this project
stackSize specify the size of the stack of each task of project (must be greater than 0)
millimeter unit is true if the unit is millimeter, false for inch
Then three sections are presents to define the project files.
The program section contains all the program files and the tag is programSection
Each program file is declared with the tag program and the attribute file for the name of the file.
<program file="start.pgx" />

The data section contains the data file and the tag is dataSection
The data file is declared with the tag data and the attribute file for the name of the file.
CAUTION: Only one data file is supported.
2/15

SPECIFICATIONS DU FORMAT VAL3 - XML


FAVERGES

01.07.2004

<data file="dummy.dtx" />

The libraries section contains the libraries and the tag is aliasSection
The library is declared with the tag alias and its attributes;
1. The name for the name of the alias.
2. The interface for the path of the library.
3. The autoload that is true if library must be loaded with the project.
4. The password that specifies password for encrypted library. (optional attribute)
Example:
<alias name="io" interface="io" autoload="true" password="" />

3.1.1. Example
<?xml version="1.0" encoding="utf-8" ?>
<project xmlns="ProjectNameSpace" >
<parameters version="~VAL3:v4.0" stackSize="5000" millimeterUnit="true" />
<programSection>
<program file="start.pgx" />
<program file="stop.pgx" />
</programSection>
<dataSection>
<data file="main.dtx" />
</dataSection>
<aliasSection>
<alias name="io" interface="io" autoload="true" />
<alias name="lib" interface="lib1" autoload="true" />
</aliasSection>
</project>

3.2. Data file


The data file lists all the data of the project.
The main tag is dataList and the namespace is DataNameSpace
Then one section for each type contains all the data of this type.
CAUTION: the section must be in alphabetic order.
Each data has a name and a visibility.
The name is an attribute called name and is limited to 15 characters. A name must begin with a character
between [a-z] or [A-Z] or _. After the first only following characters are authorized [a-z] [A-Z]
[0-9] _

The visibility of a data is public for data that can be accessed by other project or private for data that is
reserved for the owner project. The attribute name is public

3/15

SPECIFICATIONS DU FORMAT VAL3 - XML


FAVERGES

01.07.2004

Each value of the data is stored inside the data element with special tag for each type (see below). In
each value element an index attribute specify the row of the element in the array. This index is a zero
based index. Its forbidden to have two values with the same index value in the same data.
The size of a data (array or not) is determined by the number of values. If it has more than one value, its
an array.
CAUTION: Except for the type aio, dio and sio a data must contain at least one value.
3.2.1. aio type
The tag for all aio data is aioSection. The tag for an aio data is aio.
An aio has no value. So a special attribute size permits to specify an array (greater than 1) or simple
data.
The size must be greater than 0.
<aioSection>
<aio size="1" name="aAio1" public="false" />
<aio size="3" name="aAioArray" public="false" />
</aioSection>

3.2.2. bool type


The tag for all boolean data is boolSection. The tag for a boolean data is bool.
The tag for the value of a boolean is valueBool. The content of the value is an attribute name value.
CAUTION: the constant true and false must be in lower case.
<boolSection>
<bool name="bBool1" public="false">
<valueBool value="false" index="0" />
</bool>
<bool name="bBoolArray" public="false">
<valueBool value="false" index="0" />
<valueBool value="true" index="1" />
<valueBool value="false" index="2" />
</bool>
</boolSection>

3.2.3. config for Scara (Rs)


The tag for all Scara config data is configRsSection. The tag for a Scara config data is configRs.
The tag for the value of a Scara config data is valueConfigRs. The content of the value is a sub
element of valueConfigRs named configRsValue. This sub element contains one attribute:
shoulder shoulder position, can be
ssame, sfree, righty, lefty

4/15

SPECIFICATIONS DU FORMAT VAL3 - XML


FAVERGES

01.07.2004

<configRsSection>
<configRs name="cConfigRs1" public="false">
<valueConfigRs index="0">
<configRsValue shoulder="ssame" />
</valueConfigRs>
</configRs>
<configRs name="cConfigRs2" public="false">
<valueConfigRs index="0">
<configRsValue shoulder="ssame" />
</valueConfigRs>
<valueConfigRs index="1">
<configRsValue shoulder="sfree" />
</valueConfigRs>
</configRs>
</configRsSection>

3.2.4. config for Anthropomorphic Arm (Rx/Tx)


The tag for all Rx/Tx config data is configSection. The tag for a Rx/Tx config data is config.
The tag for the value of a Rx/Tx config data is valueConfig. The content of the value is a sub element
of valueConfig named configValue. This sub element contains three attributes:
shoulder shoulder position, can be
ssame, sfree, righty, lefty
elbow
elbow position, can be
esame, efree, epositive, enegative
- wrist
wrist position, can be
wsame, wfree, wpositive, wnegative
<configSection>
<config name="cConfig1" public="false">
<valueConfig index="0">
<configValue shoulder="sfree" elbow="efree" wrist="wfree" />
</valueConfig>
</config>
<config name="cConfigArray" public="false">
<valueConfig index="0">
<configValue shoulder="sfree" elbow="efree" wrist="wfree" />
</valueConfig>
<valueConfig index="1">
<configValue shoulder="ssame" elbow="esame" wrist="zsame" />
</valueConfig>
</config>
</configSection>

3.2.5. Special config


Then, a special empty section must be placed.

5/15

SPECIFICATIONS DU FORMAT VAL3 - XML


FAVERGES

01.07.2004

<configVrbSection />

3.2.6. dio type


The tag for all dio data is dioSection. The tag for a dio data is dio.
A dio has no value. So a special attribute size permits to specify an array (greater than 1) or simple data.
The size must be greater then 0.
<dioSection>
<dio size="1" name="dDio1" public="false" />
<dio size="21" name="dDioArray" public="false" />
</dioSection>

3.2.7. frame type


The tag for all frame data is frameSection. The tag for a joint data is frame.
The frame father is stored in a sub element tagged fFather with three attributes:
- alias
alias of the library where the frame father is. Empty if in the same project
name of the father frame.
- name
- fatherIndex zero based index of the value if the father is an array. zero if not an array
The tag for the value of a frame data is valueFrame. The content of the value is a sub element of
valueFrame named tfValue. This sub element contains the same attributes as a trsfVvalue.
A special frame named world is the root of the frame hierarchy and so has no father. The attribute name
of the fFather element must be empty.
<frameSection>
<frame name="world" public="false" privilege="0">
<fFather alias="" name="" fatherIndex="0" />
<valueFrame index="0">
<tfValue x="0" y="0" z="0" rx="0" ry="0" rz="0" />
</valueFrame>
</frame>
<frame name="fFrame1" public="false">
<fFather alias="" name="world" fatherIndex="0" />
<valueFrame index="0">
<tfValue x="0" y="0" z="0" rx="0" ry="0" rz="0" />
</valueFrame>
<valueFrame index="1">
<tfValue x="0" y="0" z="0" rx="0" ry="0" rz="0" />
</valueFrame>
</frame>
</frameSection>

6/15

SPECIFICATIONS DU FORMAT VAL3 - XML


FAVERGES

01.07.2004

3.2.8. joint type for Scara Arm (Rs)


The tag for all joint data for Scara is jointRsSection. The tag for a joint Scara data is jointRs.
The tag for the value of a joint Scara data is valueJointRs. The content of the value is a sub element of
valueJointRs named jointRsValue. This sub element contains four attributes j1, j2, j3, j4
<jointRsSection>
<jointRs name="jJointRs1" public="false">
<valueJointRs index="0">
<jointRsValue j1="0" j2="0" j3="0" j4="0" />
</valueJointRs>
</jointRs>
<jointRs name="jJointRs2" public="false">
<valueJointRs index="0">
<jointRsValue j1="0" j2="0" j3="0" j4="0" />
</valueJointRs>
<valueJointRs index="1">
<jointRsValue j1="1" j2="2" j3="3" j4="4" />
</valueJointRs>
</jointRs>
</jointRsSection>

3.2.9. joint type for anthropomorphic Arm (Rx/Tx)


The tag for all joint data for Rx/Tx is jointSection. The tag for a joint Rx/Tx data is joint.
The tag for the value of a joint Rx/Tx data is valueJoint. The content of the value is a sub element of
valueJoint named jointValue. This sub element contains six attributes j1, j2, j3, j4, j5,
j6.
<jointSection>
<joint name="jJoint1" public="false">
<valueJoint index="0">
<jointValue j1="0" j2="0" j3="0" j4="0"
</valueJoint>
</joint>
<joint name="jJointArray" public="false">
<valueJoint index="0">
<jointValue j1="0" j2="0" j3="0" j4="0"
</valueJoint>
<valueJoint index="1">
<jointValue j1="0" j2="0" j3="0" j4="0"
</valueJoint>
<valueJoint index="2">
<jointValue j1="0" j2="0" j3="0" j4="0"
</valueJoint>
</joint>
</jointSection>

j5="0" j6="0" />

j5="0" j6="0" />

j5="0" j6="0" />

j5="0" j6="0" />

7/15

SPECIFICATIONS DU FORMAT VAL3 - XML


FAVERGES

01.07.2004

3.2.10. Special Joint


Then, a special empty section must be placed.
<jointVrbSection />

3.2.11. mdesc type


The tag for all mdesc data is mdescSection. The tag for a joint data is mdesc.
The tag for the value of a mdesc data is valueMdesc. The content of the value is a sub element of
valueMdesc named mdescValue. This sub element contains attributes:
- accel
Maximum permitted revolute acceleration as a % of the nominal acceleration of
the robot

vel

Maximum permitted revolute speed as a % of the nominal speed of the robot.

decel

Maximum permitted revolute deceleration as a % of the nominal deceleration of


the robot

tmax

Maximum permitted translational speed of the tool centre point, in mm/s or


inches/s depending on the unit of length of the application

rmax

Maximum permitted rotational speed of the tool centre point, in degrees per
second

blend

Blend mode: off (no blending), or joint (blending)

leave

In joint blend mode, distance between the target point at which blending starts
and the next point, in mm or inches, depending on the unit of length of the
application

reach

In joint blend mode, distance between the target point at which blending stops
and the next point, in mm or inches, depending on the unit of length of the
application

8/15

SPECIFICATIONS DU FORMAT VAL3 - XML


FAVERGES

01.07.2004

<mdescSection>
<mdesc name=" mMdesc1" public="true" >
<valueMdesc index="0">
<mdescValue
accel="100" vel="100" decel="100"
tmax="99999" rmax="9999"
blend="off" leave="51" reach="50" />
</valueMdesc>
</mdesc>
<mdesc name=" mMdescArray" public="true" >
<valueMdesc index="0">
<mdescValue
accel="100" vel="100" decel="100"
tmax="99999" rmax="9999"
blend="off" leave="51" reach="50" />
</valueMdesc>
<valueMdesc index="2">
<mdescValue
accel="10" vel="1 decel="10"
tmax="99999" rmax="9999"
blend="off" leave="51" reach="50" />
</valueMdesc>
</mdesc>
</mdescSection>

3.2.12. num type


The tag for all numeric data is numSection. The tag for a numeric data is num.
The tag for the value of a numeric is valueNum. The content of the value is an attribute name value.
<numSection>
<num name="nNum1" public="false">
<valueNum value="0" index="0" />
</num>
<num name="nNumArray" public="false">
<valueNum value="0" index="0" />
<valueNum value="87" index="1" />
<valueNum value="45" index="2" />
</num>
</numSection>

3.2.13. Point for Scara arm (Rs)


The tag for all point data of an Scara is pointRsSection. The tag for a point (Scara) data is pointRs.
The point Scara father is stored in a sub element tagged pRsFather with three attributes:
- alias
alias of the library where the frame father is. Empty if in the same project
- name
name of the father frame.
- fatherIndex zero based index of the value if the father is an array. zero if not an array
The tag for the value of a point (Scara) data is valuePointRs. The content of the value is two sub
element of valuePointRs named:
9/15

SPECIFICATIONS DU FORMAT VAL3 - XML


FAVERGES
-

01.07.2004

trsf value of the point (see trsfValue)


cpRsValue config value of the point (see configRsValue)

tpRsValue

<pointRsSection>
<pointRs name="pPointRs1" public="false">
<pRsFather alias="" name="fFrame2" fatherIndex="0" />
<valuePointRs index="0">
<tpRsValue x="0" y="0" z="0" rx="0" ry="0" rz="0" />
<cpRsValue shoulder="ssame" />
</valuePointRs>
</pointRs>
<pointRs name="pPointRs2" public="false">
<pRsFather alias="" name="World" " fatherIndex="0" />
<valuePointRs index="0">
<tpRsValue x="0" y="0" z="0" rx="0" ry="0" rz="0" />
<cpRsValue shoulder="sfree" />
</valuePointRs>
<valuePointRs index="1">
<tpRsValue x="0" y="0" z="0" rx="0" ry="0" rz="0" />
<cpRsValue shoulder="ssame" />
</valuePointRs>
</pointRs>
</pointRsSection>

3.2.14. Point for anthropomorphic arm (Rx/Tx)


The tag for all point data of an Rx/Tx is pointSection. The tag for a point (Rx/Tx) data is point.
The point Rx/Tx father is stored in a sub element tagged pFather with three attributes:
- alias
alias of the library where the frame father is. Empty if in the same project
- name
name of the father frame.
- fatherIndex zero based index of the value if the father is an array. zero if not an array
The tag for the value of a point (Rx/Tx) data is valuePoint. The content of the value is two sub element
of valuePoint named:
tpValue trsf value of the point (see trsfValue)
cpValue config value of the point (see configValue)
<pointSection>
<point name="pPoint1" public="false">
<pFather alias="" name="fFrame1" fatherIndex="0" />
<valuePoint index="0">
<tpValue x="0" y="0" z="0" rx="0" ry="0" rz="0" />
<cpValue shoulder="sfree" elbow="efree" wrist="wfree" />
</valuePoint>
</point>
<point name="pPointArray" public="false">
<pFather alias="" name="world" fatherIndex="0" />

10/15

SPECIFICATIONS DU FORMAT VAL3 - XML


FAVERGES

01.07.2004

<valuePoint index="0">
<tpValue x="0" y="0" z="0" rx="0" ry="0" rz="0" />
<cpValue shoulder="sfree" elbow="efree" wrist="wfree" />
</valuePoint>
<valuePoint index="1">
<tpValue x="0" y="0" z="0" rx="0" ry="0" rz="0" />
<cpValue shoulder="sfree" elbow="efree" wrist="wfree" />
</valuePoint>
<valuePoint index="2">
<tpValue x="0" y="0" z="0" rx="0" ry="0" rz="0" />
<cpValue shoulder="sfree" elbow="efree" wrist="wfree" />
</valuePoint>
</point>
</pointSection>

3.2.15. Special Point


Then, a special empty section must be placed.
<pointVrbSection />

3.2.16. sio type


The tag for all sio data is sioSection. The tag for a sio data is sio.
A sio has no value. So a special attribute size permits to specify an array (greater than 1) or simple data.
The size must be greater then 0.
<sioSection>
<sio size="1" name="sSio1" public="false" />
<sio size="21" name="sSioArray" public="false" />
</sioSection>

3.2.17. string type


The tag for all string data is stringSection. The tag for a string data is string.
The tag for the value of a string is valueString. The content of the value is an attribute name value.
<stringSection>
<string name="sString1" public="false">
<valueString value="a string" index="0" />
</string>
<string name="sString1" public="false">
<valueString value="string one" index="0" />
<valueString value="string two" index="1" />
</string>
</stringSection>

3.2.18. tool type


The tag for all tool data is toolSection. The tag for a joint data is tool.
11/15

SPECIFICATIONS DU FORMAT VAL3 - XML


FAVERGES

01.07.2004

The tool father is stored in a sub element tagged tFather with three attributes:
- alias
alias of the library where the frame father is. Empty if in the same project
- name
name of the father frame.
- fatherIndex zero based index of the value if the father is an array. zero if not an array
The tag for the value of a tool data is valueTool. The content of the value is two sub elements
ttValue trsf value of the point (see trsfValue)
io
element for the i/o definition it contains 5 attributes:
alias must be io
name name of the io
ioIndex index of the io if in an array
open open stabilization time
close closing stabilization time
A special tool named flange is the root of the frame hierarchy and so has no father. The attribute name
of the tFather element must be empty.
<toolSection>
<tool name="flange" public="false" privilege="0">
<tFather alias="" name="" fatherIndex="0" />
<valueTool index="0">
<ttValue x="0" y="0" z="0" rx="0" ry="0" rz="0" />
<io alias="io" name="valve1" ioIndex="0" open="0" close="0" />
</valueTool>
</tool>
<tool name="tlTool1" public="false">
<tFather alias="" name="flange" fatherIndex="0" />
<valueTool index="0">
<ttValue x="1" y="0" z="0" rx="0" ry="0" rz="0" />
<io alias="io" name="valve1" ioIndex="0" open="0" close="0" />
</valueTool>
<valueTool index="1">
<ttValue x="1" y="0" z="0" rx="0" ry="0" rz="0" />
<io alias="io" name="valve1" ioIndex="0" open="0" close="0" />
</valueTool>
</tool>
</toolSection>

3.2.19. trsf type


The tag for all trsf data is trsfSection. The tag for a trsf data is trsf.
The tag for the value of a trsf data is valueTrsf. The content of the value is a sub element of
valueTrsf named trsfValue. This sub element contains six attributes x, y, z, rx, ry, rz.

12/15

SPECIFICATIONS DU FORMAT VAL3 - XML


FAVERGES

01.07.2004

<trsfSection>
<trsf name="trTrsf1" public="false">
<valueTrsf index="0">
<trsfValue x="0" y="0" z="0" rx="0" ry="0" rz="0" />
</valueTrsf>
</trsf>
<trsf name="trTrsfArray" public="false">
<valueTrsf index="0">
<trsfValue x="0" y="0" z="0" rx="0" ry="0" rz="0" />
</valueTrsf>
<valueTrsf index="1">
<trsfValue x="0" y="0" z="0" rx="0" ry="0" rz="0" />
</valueTrsf>
</trsf>
</trsfSection>

3.2.20. Example of file


<?xml version="1.0" encoding="utf-8"?>
<dataList xmlns="DataNameSpace">
<aioSection />
<boolSection />
<configSection />
<dioSection />
<frameSection>
<frame name="world" public="false" privilege="0">
<fFather alias="" name="" fatherIndex="0" />
<valueFrame index="0">
<tfValue x="0" y="0" z="0" rx="0" ry="0" rz="0" />
</valueFrame>
</frame>
</frameSection>
<jointSection />
<mdescSection>
<mdesc name="nom_speed" public="true" privilege="0">
<valueMdesc index="0">
<mdescValue
accel="100" vel="100" decel="100"
tmax="99999" rmax="9999"
blend="off" leave="50" reach="50" />
</valueMdesc>
</mdesc>
</mdescSection>
<numSection />
<pointSection />
<sioSection />
<stringSection />
<toolSection>
<tool name="flange" public="false" privilege="0">
<tFather alias="" name="" fatherIndex="0" />
<valueTool index="0">

13/15

SPECIFICATIONS DU FORMAT VAL3 - XML


FAVERGES

01.07.2004

<ttValue x="0" y="0" z="0" rx="0" ry="0" rz="0" />


<io alias="io" name="valve1" ioIndex="0" open="0" close="0" />
</valueTool>
</tool>
</toolSection>
<trsfSection />
</dataList>

3.3. Program file


The program file contains the code of VAL3 program.
The main tag is programList and the namespace is ProgramNameSpace
The element for one program is tagged program. The attribute name qualifies the name of the program
and the attribute public is true if the program is visible from another project (false else).
The name is limited to 15 characters. A name must begin with a character between [a-z] or [A-Z] or _.
After the first only following characters are authorized [a-z] [A-Z] [0-9] _
An element tagged description permits to describe the program on one line.
The parameters list is described in an element named paramSection. Each parameter is an element
tagged param. It owns three attributes:
- name name of the parameter (see data file description for name convention)
- type type of the parameter (see data file description for exhaustive list )
- byVal true if the parameter is passed by value, false else.
The local variables list is described in an element named localSection. Each local variable is an
element tagged local. It owns three attributes:
- name name of the parameter (see data file description for name convention)
- type type of the parameter (see data file description for exhaustive list )
- size numeric value greater than 0 for the size of the data.
Then the element tagged source embedded an element named code contains the code of the VAL3
program. This code is XML text. That means that special characters must be tagged
- < is coded &lt;
- > is coded &gt;
- & is coded &amp;
- is coded &quot;
- is coded &apos;
3.3.1. Example:
<?xml version="1.0" encoding="utf-8"?>

14/15

SPECIFICATIONS DU FORMAT VAL3 - XML


FAVERGES

01.07.2004

<programList xmlns="ProgramNameSpace">
<program name="new1" public="false">
<description />
<paramSection>
<param name="param1" type="bool" byVal="true" />
<param name="param2" type="num" byVal="true" />
</paramSection>
<localSection>
<local name="local1" type="string" size="1" />
</localSection>
<source>
<code>
begin
putln(&quot;example de code&quot;)
end
</code>
</source>
</program>
</programList>

15/15

You might also like