PMAC Product Guide the optional second {constant} must be at least as great as the first {constant} -- it represents the number of the end of the range. {address} is an integer constant from 0 to 65,535 ($0 to $FFFF if specified in hex). {offset} is an integer constant from 0 to 23, representing the starting (least significant) bit of the word to be used in the M-Variables, or 24 to specify the use of all 24 bits. {width} (optional) is an integer constant from the set {1, 4, 8, 12, 16, 20, 24}, representing the number of bits from the word to be used in the M-Variables; if {width} is not specified, a value of 1 is assumed.
{format} (optional) is a letter from the set [U, S, D, C], specifying how PMAC is to interpret this value: (U=Unsigned integer, S=Signed integer, D=Binary-coded Decimal, C=Complementary binary- coded decimal); if {format} is not specified, U is assumed. This command causes PMAC to define the specified M-Variable or range of M-Variables to point to a location in one of the two halves (X or Y) of PMAC’s data memory. In this form, the variable can have a width of 1 to 24 bits and can be decoded several different ways, so the bit offset, bit width, and decoding format must be specified (the bit width and decoding format do have defaults).
The definition consists of the letter X or Y , an optional colon ( : ), the word address, the starting bit number (offset), an optional bit width number, and an option format-specifying letter. Legal values for bit width and bit offset are inter-related. The table below shows the possible values of {width} , and the corresponding legal values of {offset} for each setting of {width} . {width} {offset} 1 0 -- 23 4 0,4,8,12,16,20 8 0,4,8,12,16 12 0,4,8,12 16 0,4,8 20 0,4 24 0 The format is irrelevant for 1-bit M-Variables and should not be included for them. If no format is specified, U is assumed. Examples:
Machine Output 1 M1->Y:$FFC2,8,1 ; 1-bit (full spec.) M1->Y$FFC2,8 ; 1-bit (short spec.) Encoder 1 Capture/Compare Register M103->X:$C003,0,24,U ; 24-bit (full spec.) M103->X$C003,24 ; 24-bit (short spec.) DAC 1 Output Register M102->Y:$C003,8,16,S ; 16-bit value M102->Y49155,8,16,S ; same, decimal address 180 Online Commands