Example - Using Variables for Joystick

The example below reads the voltage of an A-B joystick and assigns it to variables VA and VB to drive the motors at proportional velocities, where

10 Volts = 3000 rpm = 200000 c/sec Speed/Analog input = 200000/10 = 20000

Instruction

Interpretation

#JOYSTIK

Label

JG 0,0

Set in Jog mode

BGAB

Begin Motion

#LOOP

Loop

VX=@AN[1]*20000

Read joystick A

VY=@AN[2]*20000

Read joystick B

JG VA,VB

Jog at variable VA,VB

JP#LOOP

Repeat

EN

End

Operands

Operands allow motion or status parameters of the DMC-3425 to be incorporated into programmable variables and expressions. Most DMC-3425 commands have an equivalent operand - which are designated by adding an underscore (_) prior to the DMC-3425 command. The command reference indicates which commands have an associated operand.

Status commands such as Tell Position return actual values, whereas action commands such as KP or SP return the values in the DMC-3425 registers. The axis designation is required following the command.

Instruction

POSA=_TPA VAR1=_KPA*2 JP #LOOP,_TEA>5 JP #ERROR,_TC=1

Interpretation

Assigns value from Tell Position A to the variable POSA. Assigns value from KPA multiplied by two to variable, VAR1. Jump to #LOOP if the position error of A is greater than 5 Jump to #ERROR if the error code equals 1.

Operands can be used in an expression and assigned to a programmable variable, but they cannot be assigned a value. For example: _TPA=2 is invalid.

Special Operands

The DMC-3425 provides a few additional operands that give access to internal variables that are not accessible by standard DMC-3425 commands.

Operand

_BGn

_BN

_DA

_DL

_DM

Function

*Returns a 1 if motion on axis ‘n’ is complete, otherwise returns 0. *Returns serial # of the board.

*Returns the number of arrays available

*Returns the number of available labels for programming *Returns the available array memory

DMC-3425

Chapter 7 Application Programming131

Page 139
Image 139
Galil DMC-3425 user manual Special Operands, Example Using Variables for Joystick, Instruction

DMC-3425 specifications

The Galil DMC-3425 is a sophisticated motion controller known for its versatility and high performance in various industrial applications. Designed primarily for multi-axis control, it is well-suited for robotics, CNC machinery, and automated manufacturing systems.

One of the standout features of the DMC-3425 is its ability to control up to 32 axes simultaneously, providing unparalleled flexibility for complex motion tasks. This capability is enhanced by its advanced motion algorithms that ensure smooth and precise movements, essential for high-quality manufacturing and assembly processes. The controller supports a variety of motor types, including servo, stepper, and brushless motors, making it compatible with a wide range of existing equipment.

In terms of connectivity, the DMC-3425 offers an extensive selection of communication options. It supports Ethernet, RS-232, and RS-485 interfaces, allowing for seamless integration with various industrial networks, including EtherCAT and CANopen. This connectivity is vital for real-time data exchange and remote monitoring, enhancing overall system efficiency.

The controller is powered by Galil's innovative software architecture, which includes the DMC programming language. This user-friendly language enables engineers to create complex motion profiles easily, with support for trajectory generation, coordinate transformations, and PID control. The DMC-3425 also features built-in commands for motion profiling, including linear and circular interpolation, allowing for sophisticated path planning.

Moreover, the DMC-3425 comes equipped with an integrated programming environment that facilitates rapid application development. Users can simulate motion profiles before implementation, reducing downtime and minimizing errors. This environment is designed for quick learning, making it accessible even for those new to motion control.

Additionally, the Galil DMC-3425 features a robust safety architecture. It includes over-temperature detection, emergency stop inputs, and configurable limits for position and speed, ensuring safe operation in various environments.

Overall, the Galil DMC-3425 is a powerful and flexible motion controller that combines advanced technologies with user-friendly design. Its ability to handle multiple axes, extensive connectivity options, and comprehensive programming environment make it a top choice for manufacturers seeking to enhance automation and improve productivity in their operations.