DM POSX[7]

Defines an array names POSX with seven entries

DM SPEED[100]

Defines an array named speed with 100 entries

DM POSX[0]

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. Examples:

DM SPEED[10]

Dimension Speed Array

SPEED[1]=7650.2

Assigns the first element of the array, SPEED the value 7650.2

SPEED[1]=

Returns array element value

POSX[10]=_TPX

Assigns the 10th element of the array POSX the returned value from the tell

 

position command.

CON[2]=@COS[POS]*2

Assigns the second element of the array CON the cosine of the variable POS

 

multiplied by 2.

TIMER[1]=TIME

Assigns the first element of the array timer the returned value of the TIME

 

keyword.

Using a Variable to Address Array Elements

An array element number can also be a variable. This allows array entries to be assigned sequentially using a counter.

For example:

#A

Begin Program

COUNT=0;DM POS[10]

Initialize counter and define array

#LOOP

Begin loop

WT 10

Wait 10 msec

POS[COUNT]=_TPX

Record position into array element

POS[COUNT]=

Report position

COUNT=COUNT+1

Increment counter

JP #LOOP,COUNT<10

Loop until 10 elements have been stored

EN

End Program

The above example records 10 position values at a rate of one value per 10 msec. The values are stored in an array named POS. The variable, COUNT, is used to increment the array element counter. The above example can also be executed with the automatic data capture feature described below.

Uploading and Downloading Arrays to On Board Memory

Arrays may be uploaded and downloaded using the QU and QD commands.

QU array[],start,end,delim QD array[],start,end

where array is an array name such as A[].

158 • Chapter 7 Application Programming

DMC-1700/1800

Page 166
Image 166
Galil DMC-1800, DMC-1700 user manual Assignment of Array Entries, Using a Variable to Address Array Elements

DMC-1800, DMC-1700 specifications

The Galil DMC-1700 and DMC-1800 are advanced motion controllers widely recognized for their high performance and versatility in the automation and robotics industries. These controllers are designed to meet the demands of complex motion control applications, providing users with enhanced features and innovative technologies that optimize motion precision and efficiency.

One of the main features of the Galil DMC-1700 is its ability to handle up to 8 axes of motion control. This capability makes it suitable for a range of applications, from simple point-to-point movements to intricate trajectories in multi-axis systems. In contrast, the DMC-1800 extends this functionality, supporting up to 64 axes, making it ideal for large-scale automation environments.

Both models leverage Galil's powerful programming interface, which simplifies the development of motion control applications. The DMC-1700 and DMC-1800 controllers utilize a high-level programming language that supports advanced motion commands, including linear interpolation, circular interpolation, and complex motion profiles. This feature allows users to implement sophisticated motion sequences seamlessly.

In terms of connectivity, the Galil DMC series offers multiple communication options, including Ethernet, RS-232, and CAN bus, ensuring compatibility with various hardware and enabling easy integration into existing systems. The controllers also come equipped with digital and analog I/O ports, providing flexibility for sensor feedback and actuator control.

The advanced technology incorporated into both the DMC-1700 and DMC-1800 includes on-board PID control, which ensures precise motion control through closed-loop feedback. This results in improved stability and accuracy, particularly in high-speed applications. Additionally, the controllers offer extensive diagnostics and monitoring capabilities, allowing for real-time performance analysis and troubleshooting.

Another notable characteristic of these motion controllers is their compact design, which offers space-saving advantages while maintaining high processing power. Their robust construction and ability to operate in challenging environments make them suitable for a wide range of industrial applications, from CNC machining to assembly lines.

In conclusion, the Galil DMC-1700 and DMC-1800 motion controllers stand out due to their high-performance capabilities, advanced programming features, and flexibility in connectivity. With their ability to handle complex motion control tasks efficiently, these controllers are invaluable tools for engineers and manufacturers looking to enhance their automation processes. By integrating Galil's innovative motion control technology, industries can achieve greater precision, speed, and reliability in their operational workflows.