Let's analyze motion file!
If you open one of your RM2 motion file, you will see lots of numbers and chars etc...
I added comments in the pose name so that i can easily see what the blocks are in the editor.
Here is what you see in the text editor.
Let's look at them!
Line1: _MOTION_FORMAT:[ POSEDEF_V1R4 ]
I'm guessing those are the definitions for the type of motion file and identifying what formatting it is.
this is the definition for number of enabled axis(slider bars)?
Those lines represents the "Start Block".
[]: this is the name of the pose, since its start block and does not have name, it's being empty.
-: this is the position of the pose block. take a look at other "MOTION_INFO" it has the same values as (x, y) noted in the name of the pose blocks.
: this is some value associated with the "arrow ->" going from the start block to the next. if you change the position of the "dot" on the arrow, the value will change.
: Not 100% sure about this but if we follow the lest of the blocks, this should be the value for the second arrow, which does not exist on the start block. I would say keep it "0" for the start block.
: This is the identification of the block which the arrow is connected to.
_STARTMOT: this is the identification for start block.
[-1]: This is the indication of the block which the second arrow is connected to. there is no second arrow on the start block, so its showing up "-1".
Line7: _MOTION_INFO:[[P0 (50,50) 50step START->P1]]------[-1]
Line8: _POSE:-[0x0000,0x0aa5,0x3e97,0xf5c8,0x0000,0X0000,0x0000,0xf55b,0xc169, ....
Those lines represents the first pose block "P1".
_MOTION_INFO: This part looks the same as the start block...
<!> Notice that this pose is connected to the second pose and mysteriously the identification indicated here says "3". Let's keep eye on this value to see if we can figure out how this work...
_POSE:: the value 50 is the number of the steps. You can chek it by looking at other pose blocks.
[0x0000,0x0aa5,0x3e97 ...: Those values are the value representing the "slider", you can check them by changing one and see the difference.
Line10: _MOTION_INFO:[[ END ]]-----[-1]-[-1]
Those lines represents the end block.... Well, why it's showing up after the first pose block???
The order of the pose blocks listed in the motion file is the order of the blocks created. When you create a new file, it will automatically creates "Start", "Pose0", and "End" blocks. Therefore, the end block comes before the second pose block. That's my guess...
Line13: [[P1 (45,133) 40step P1->P2]]------[-1]
Those lines represent the second pose block.
this pose has value "4" as the indication of the connecting pose!
Line16: _MOTION_INFO:[[P2 (49,208) 30step P2->END]]------[-1]
Those lines represent the third pose block.
Now the connection pose is "5"!
Line19: _MOTION_INFO:[[OP1 CR64 CTSUB CON255 OP1-IF1]]------[-1]
Those lines represent the operational block.
All the parameters used for operation is in the line 20.
_VARCON: indication of operation block
: indication of type of operation. In this case, its constant subtraction
: The memorry address where the calculation result is stored.
: constant value.
This block has connection pose value "6".
Line22: _MOTION_INFO:[[IF1 V64>50 YP1 NBK]]------
Those lines represent the condition block.
: this represents type of condtion its looking for. in this case, it's "Greater than".
-: values used for checking the conditions.
-: Indication of connection blocks
Line25: _MOTION_INFO:[[BK1 YP2 NEND]]------
Those lines represent the break block.
-: indicates connecting blocks.
Now, have you figure out how find out which block connects to which???
By looking at how I have them connected to in the RM2, here is the number representation of the blocks.
You should notice it by now that the numbering of the blocks are based on the order you see in the editor (order of the blocks that created).
You can see that by ordering them by how its listed in the text editor.
Wow! That's really simple isn't it???
Now you can creat a simulation software and create your robot project from your own simulator!!!