Keyword
Function
_BGn
*Returns a 1 if motion on axis ‘n’ is complete, otherwise returns 0.
_BN
*Returns serial # of the board.
_DA
*Returns the number of arrays available
_DL
*Returns the number of available labels for programming
_DM
*Returns the available array memory
_HMn
*Returns status of Home Switch (equals 0 or 1)
_LFn
Returns status of Forward Limit switch input of axis ‘n’ (equals 0 or 1)
_LRX
Returns status of Reverse Limit switch input of axis ‘n’ (equals 0 or 1)
_UL
*Returns the number of available variables
TIME
Free-Running Real Time Clock (off by 2.4% - Resets with power-on).
Note: TIME does not use an underscore character (_) as other keywords.
* - These keywords have corresponding commands while the keywords _LF, _LR, and TIME do not have any
associated commands. All keywords are listed in the Command Reference.
Examples of Keywords:
v1=_LFX
Assign V1 the logical state of the Forward Limit Switch on the X-axis
v3=TIME
Assign V3 the current value of the time clock
v4=_HMW
Assign V4 the logical state of the Home input on the W-axis
Arrays
For storing and collecting numerical data, the DMC-42x0 provides array space for 24000 elements. The arrays are
one dimensional and up to 30 different arrays may be defined. Each array element has a numeric range of 4 bytes
of integer (2
31
) followed by two bytes of fraction (+/-2,147,483,647.9999).
Arrays can be used to capture real-time data, such as position, torque and analog input values. In the contouring
mode, arrays are convenient for holding the points of a position trajectory in a record and playback application.
Defining Arrays
An array is defined with the command DM. The user must specify a name and the number of entries to be held in
the array. An array name can contain up to eight characters, starting with an alphabetic character. The number of
entries in the defined array is enclosed in [ ].
Example:
DM posx[7]
Defines an array names 'posx' with seven entries
DM speed[100]
Defines an array named speed with 100 entries
DA posx[]
Frees array space
Assignment of Array Entries
Like variables, each array element can be assigned a value. Assigned values can be numbers or returned values
from instructions, functions and keywords.
Array elements are addressed starting at count 0. For example the first element in the 'posx' array (defined with
the DM command, DM posx[7]) would be specified as posx[0].
Values are assigned to array entries using the equal sign. Assignments are made one element at a time by
specifying the element number with the associated array name.
NOTE:
Arrays must be defined using the command, DM, before assigning entry values.
Chapter 7 Application Programming ▫ 126
DMC-42x0 User Manual
Содержание DMC-42 0 Series
Страница 85: ...Chapter 6 Programming Motion 81 DMC 42x0 User Manual Figure 6 14 ECAM cycle with Z axis as master...
Страница 195: ...ICM 2900 PCB Layout Appendices 191 DMC 42x0 User Manual...
Страница 205: ...CB 50 100 Drawings Appendices 201 DMC 42x0 User Manual...
Страница 206: ...Appendices 202 DMC 42x0 User Manual...
Страница 207: ...Appendices 203 DMC 42x0 User Manual...
Страница 208: ...Appendices 204 DMC 42x0 User Manual...
Страница 209: ...Appendices 205 DMC 42x0 User Manual...
Страница 210: ...Appendices 206 DMC 42x0 User Manual...
Страница 211: ...Appendices 207 DMC 42x0 User Manual...
Страница 214: ...CB 50 80 Drawing Appendices 210 DMC 42x0 User Manual...
Страница 215: ...Appendices 211 DMC 42x0 User Manual...