4MELFA-BASIC IV
 Detailed explanation of command words   4-236
Plt (Pallet)
[Function]
Calculates the position of grid in the pallet.
[Format]
[Terminology]
<Pallet No.>  Select a pallet No. between 1 and 8 that has already been defined with a Def Plt command. 
Specify this argument using a constant or a variable.
<Grid No.> The position number to calculate in the palette.  Specify this argument using a constant 
or a variable.
[Reference Program]
10 Def Plt 1,P1,P2,P3,P4,4,3,1 ' The definition of the four-point pallet. (P1,P2,P3,P4)
11 ' 
12 M1=1 ' Initialize the counter M1.
13 *LOOP
14   Mov PICK, 50 ' Moves 50 mm above the work unload position.
15   Ovrd 50
16   Mvs PICK
17   HClose 1 ' Close the hand.
18   Dly 0.5 ' Wait for the hand to close securely (0.5 sec.) 
19   Ovrd 100
20   Mvs,50 ' Moves 50 mm above the current position.
21   PLACE = Plt 1, M1  ' Calculates the M1th position
22   Mov PLACE, 50 ' Moves 50 mm above the pallet top mount position.
23   Ovrd 50
24   Mvs PLACE
25   HOpen 1 ' Open the hand.
26   Dly 0.5
27   Ovrd 100
28   Mvs,50 ' Moves 50 mm above the current position.
29   M1=M1+1 ' Add the counter.
30   If M1 <=12 Then *LOOP ' If the counter is within the limits, repeats from *LOOP.
31   Mov PICK,50
32 End
[Explanation]
(1) The position of grid of a pallet defined by the Def Plt statement is operated.
(2) The pallet Nos. are from 1 to 8, and up to 8 can be defined at once.
(3) Note that the position of the grid may vary because of the designated direction in the pallet definition.
(4) If a grid No. is designated that exceeds the largest grid No. defined in the pallet definition statement, an 
error will occur during execution.
(5) When using the pallet grid point as the target position of the movement command, an error will occur if 
the point is not enclosed in parentheses as shown above. Refer to Page 98, "4.1.2 Pallet operation" for 
detail.
[Related instructions]
Def Plt (Define pallet)
Plt[]<Pallet No.> , <Grid No.>