Pm designer operation manual – B&B Electronics WOP-2121V-N4AE - Manual User Manual
Page 447

14
PM Designer Operation Manual
14-38
CHAPTER 14 USING MACROS
GET_VOL_INFO
Format
P1
= GET_VOL_INFO(P2,P3 )
Data Type
U
Function
Gets the information of volume P2 and saves the result in P3. The completion code is saved in
P1.
P1 (I)
The word to receive the completion code of the operation. If the completion code is 0, the
operation succeeded; Otherwise the operation failed.
P2 (I/C)
The drive ID.
ID
Drive
0 Current
drive
3 Drive
C
4 Drive
D
5 Drive
E
P3 (I)
The starting location of the memory block that is used as a Volume Information Block to receive
the operation result. The structure of the Volume Information Block is shown below:
Data Item
Data Type/Size
Word No.
Volume name
Byte array with 32 elements
0 through 15
Volume size
32-bit Unsigned Integer
16 and 17
Free size
32-bit Unsigned Integer
18 and 19
Drive ID
16-bit Unsigned Integer
20
The volume name is a null-terminated character string. The maximum allowable size is 31
characters.
Both the unit of volume size and the unit of free size are 1024 bytes.
A Volume Information Block requires 21 words.
Example 1
$U100
= GET_VOL_INFO(
0
,
$U0
)
/* Get the volume information of the current drive. The
volume name will be stored in $U0 through $U15. The size of the drive will be stored in $U16 and
$U17. The free size of the drive will be stored in $U18 and $U19. The ID of the current drive will
be stored in $U20. */