Pallet.CalcPos
Function
To return a position designated by the pallet target position number.
Syntax
Pallet.CalcPos(number of vertical partitions,number of horizontal partitions,pallet height,
pallet 4-corner position P1,pallet 4-corner position P2,pallet 4-corner position P3,
pallet 4-corner position P4,pallet target position number[, pallet stacking position] [, Robot Number])
Guaranteed entry
- Number of vertical partitions
- Specify a number of partitions of the pallet in vertical direction by integer type data.
- Number of horizontal partitions
- Specify a number of partitions of the pallet in horizontal direction by integer type data.
- Pallet height
- Specify the height of 1 pallet step by single precision real number type data. If pallets are piled up successively, enter a positive value. If pallets successively diminish in number, enter a negative value. If the number of pallets remains unchanged, enter 0.
- Pallet 4-corner position P1
- Specify a pallet top position, i.e. the first position in both vertical and horizontal directions, by position type data.
- Pallet 4-corner position P2
- Specify a position which is the first in vertical direction but the last in horizontal direction, by position type data.
- Pallet 4-corner position P3
- Specify a position which is the last in vertical direction but the first in horizontal direction, by position type data.
- Pallet 4-corner position P4
- Specify a pallet last position, i.e. the last position in both vertical and horizontal directions, by position type data.
- Pallet target position number
- Specify which number the position is from the pallet top by integer type data.
- Pallet stacking position
- Specify which number the pallet is from the top pallet by integer type data.
- Robot Number
- This option is available in Ver.1.9.* or higher.
When the cooperative control function is used, specify the robot number range by integer type data. Available range is from 0 (Robot0) to 1 (Robot1). This is omittable. This should be "0" (Robot0) if it is omitted.
In this section, direction from P1 to P2 is called "Horizontal direction", direction from P1 to P3 is called "Vertical depiction"
Return value
Return a target position by position type data.
Description
A position can be acquired by specifying pallet conditions including the step number from the pallet top.
Pallet conditions are specified by the number of vertical partitions (N), the number of horizontal partitions (M), pallet height and pallet 4-corner positions (P1 to P4).
Pallet position numbers are assigned from P1 to P2 and after P2, subsequent numbers are assigned from P1 plus 1 to P3 horizontally as indicated in the figure.

Related Terms
-
Attention
-
Example
'!TITLE "Acquiring Coordinate Position of Pallet Target Position Number"
' Acquire coordinate position designated by pallet target position number and display it on
the message output window
Sub Sample_PalletCalcPos
Dim aaa As Position
Dim bbb As Position
Dim ccc As Position
Dim ddd As Position
Dim eee As Position
Dim fff As Position
Dim ggg As Position
' Assign position indicating pallet four corner position P1 to aaa
aaa = P( 600, -100, 50, -180, 0, 180, 5 )
' Assign position indicating pallet four corner position P2 to bbb
bbb = P( 600, 100, 50, -180, 0, 180, 5 )
' Assign position indicating pallet four corner position P3 to ccc
ccc = P( 400, -100, 50, -180, 0, 180, 5 )
' Assign position indicating pallet four corner position P4 to ddd
ddd = P( 400, 100, 50, -180, 0, 180, 5 )
' Assign coordinate position of pallet target position number 1 to eee
eee = Pallet.CalcPos( 3, 5, 20, aaa, bbb, ccc, ddd, 1, 1 )
' Display coordinate position of pallet target position number 1 on the message output window
PrintDbg eee
' Assign coordinate position of pallet target position number 8 to fff
fff = Pallet.CalcPos( 3, 5, 20, aaa, bbb, ccc, ddd, 8, 1 )
' Display coordinate position of pallet target position number 8 on the message output window
PrintDbg fff
' Assign coordinate position of pallet target position number 15 to ggg
ggg = Pallet.CalcPos( 3, 5, 20, aaa, bbb, ccc, ddd, 15, 1 )
' Display coordinate position of pallet target position number 15 on the message output window
PrintDbg ggg
End Sub

