Intelligent Motion Systems 17 Network Card User Manual


 
30
Flags
Flags show the status of an event or condition. A flag will only have one of two possible states: either 1 or 0. Unlike variables,
there are only factory defined flags.
Factory Defined Flags
Factory defined flags are predefined at the factory and cannot be deleted. When a FD (Factory Defaults) instruction is given, these
flags will be returned to their factory default state. There are two types of factory defined flags:
. Read/Writable: This type of flag is user alterable. They are typically used to set a condition or mode of operation
for the MDrive Motion Control. For example: EE = 1 would enable encoder operation, or EE = 0 would disable the
encoder functions.
. Read Only: Read Only flags cannot be modified by the user. They only give an indication of an event or condition.
Typically this type of flag would be used in a program in conjunction with the BR (Branch Instruction) to generate
an if/then event based upon a condition. For Example: the following line of code in a program BR SP, MV = 0
would cause a program to branch to a subroutine named “SP” when the MV, the read only moving flag, is false.
Keywords
Keywords are used in conjunction with the PR and IP instructions to indicate or control variables and flags. For instance, PR UV
would print the state of all the user-defined variables to the screen. IP would restore all the factory variables from the EEPROM.
Most Commonly Used Variables and Commands
Variables
P
P indicates the position in either steps or encoder counts depending upon the enable/disable state of encoder functions.
. P takes its reading from C1 (Counter 1) when encoder functions are disabled. The reading is taken from C2 (Counter 2) when
encoder functions are enabled.
. To read the position, type PR P or PR C1/C2 then hit enter
. To zero the position, type P=0 then hit enter
VI
Initial velocity in steps per second.
. To read the initial velocity, type PR VI then hit enter
. To write to the Initial velocity, type VI=500 then hit enter
VM
Maximum or final velocity in steps per second.
. To read the final velocity, key-in PR VM then hit enter
. To write to the final velocity, key-in VM=5000 then hit enter
A
Acceleration in steps per second
2
.
. To read the acceleration, key-in PR A then hit enter
. To write to the acceleration, key-in A=7500 then hit enter
D
Deceleration in steps per second
2
.
. To read the deceleration, key-in PR D then hit enter
. To write to the deceleration, key-in D=A then hit enter