EasyManua.ls Logo

Emerson EZMotion - Program Math Functions; Program Array Access; Motion Instructions

Emerson EZMotion
268 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Safety
Information
Introduction Installation
PowerTools
Pro Software
Communications
How
Motion
Works
How I/O
Works
Configuring
an
Application
Programming
Starting and
Stopping
Motion
Starting and
Stopping
Programs
Parameter
Descriptions
Drive
Parameters
Used by
EZMotion
Diagnostics Glossary Index
EZMotion User/Programming Guide 165
Revision A8 www.controltechniques.com
9.8.2 Program Math Functions
ArcSin
This trig function can be used in formulas from within a program. Example: var.var0 = ArcSin(var.var1). Returns the
trigonometric ArcSin in degrees. The ArcSin is the angle whose Sine is the given number.
ArcTan
This trig function can be used in formulas from within a program. Example: var.var0 = ArcTan(var.var1). Returns the
trigonometric ArcTan in degrees. The ArcTan is the angle whose Tan is the given number.
ArcCos
This trig function can be used in formulas from within a program. Example: var.var0 = ArcCos(var.var1). Returns the
trigonometric ArcCos in degrees. The ArcCosine is the angle whose cosine is the given number.
Cos
This trig function can be used in formulas from within a program. Example: var.var0 = Cos(var.var1). Returns the
trigonometric cosine in degrees. Cos(x) x is in degrees and accurate to 6 decimal places.
Modulus
Returns the remainder (Modulus) resulting when a numerator is divided by a denominator. The result has the same sign as the
denominator. The floating-point operators are NOT rounded to integers as would be in the Mod operator.
The exact mathematical function for the Modulus function is as follows:
Modulus(x,y) = x - [(FLOOR (x/y)) * y]
Where FLOOR is defined as rounding the argument down to the next whole integer value towards negative infinity.
Example: FLOOR(-3.5715) = -4 or FLOOR(3.5715) = 3
The FLOOR function itself is not available to the user within a user program.
Example 1: Modulus(5,1.4) Returns 0.8
Example 2: Modulus(5,-1.4) Returns -0.6
Example 3: Modulus(-5,1.4) Returns 0.6
Example 4: Modulus(-5,-1.4) Returns -0.8
Sin
This trig function can be used in formulas from within a program. Example: var.var0 = Sin(var.var1). Returns the
trigonometric sine in degrees. Sin(x) x is in degrees and accurate to 6 decimal places.
Tan
This trig function can be used in formulas from within a program. Example: var.var0 =Tan(var.var1). Returns the
trigonometric tangent in degrees. Tan(x) x is in degrees and accurate to 6 decimal places.
9.8.3 Program Array Access
Cam[ ].Follower
This instruction allows the user to write a value to a specified cam table follower element number. In the following example
Cam table 1, follower element 2 will be changed to the value of 3.
Example:
Cam[1,2].Follower =3
Cam[ ].Interpolation
This instruction allows the user to write a value to a specified cam table follower element number. In the following example
Cam table 1, Interpolation element 2 will be changed to the value of 3.
Example:
Cam[1,2].Interpolation =3
Cam[ ].Master
This instruction allows the user to write to a specified cam table master element number. In the following example: Cam table
0, master element 3 will be changed to 7.
Example:
Cam [0,3].Master=7
9.8.4 Motion Instructions
Dwell For Time
This motion instruction is used to pause program execution for a very precise amount of time.
It operates as a motion instruction - similar to an index, home or jog. Like all other motion instructions it will not start until the
preceding motion instruction has completed. A "Wait for Index.AnyCommandComplete" is not required. Likewise, any
subsequent motion commands will wait and start after the dwell has completed. The total time required to complete a
sequence of indexes and "Dwell For Time" instructions is extremely repeatable.
The "Dwell For Time" instruction is in units of seconds with a resolution of milliseconds (0.000 seconds).
If you want to pause the program while an index is executing you should use a Wait for Time instruction described below.
A comment is automatically inserted after the Dwell For Time instruction that notes that the dwell time is in units of seconds.
The comment starts with the apostrophe ' character.

Table of Contents

Related product manuals