Link Type - Math Compares/Errors

Link Type:

EQ (hex 0x10, dec 16) - Equals
NEQ (hex 0x11, dec 17) - Not Equals
MathOK (hex 0x12, dec 18) - No Math Error
MathERR (hex 0x13, dec 19) - Math Error
LES (hex 0x14, dec 20) - Less Than or Equal, Signed
LTS (hex 0x15, dec 21) - Less Than, Signed
GTS (hex 0x16, dec 22) - Greater Than, Signed
GES (hex 0x17, dec 23) - Greater Than or Equal, Signed
LEU (hex 0x18, dec 24) - Less Than or Equal, Unsigned
LTU (hex 0x19, dec 25) - Less Than, Unsigned
GTU (hex 0x1A, dec 26) - Greater Than, Unsigned
GEU (hex 0x1B, dec 27) - Greater Than or Equal, Unsigned
LEP (hex 0x1C, dec 28) - Less Than or Equal, Position
LTP (hex 0x1D, dec 29) - Less Than, Position
GTP (hex 0x1E, dec 30) - Greater Than, Position
GEP (hex 0x1F, dec 31) - Greater Than or Equal, Position

Link Value:

Value to compare against (unused by MathOK and MathERR)

Range:

-32,768 to 32,767 for EQ, NEQ, LES, LTS, GTS, GES
0 to 65,535 for LEU, LTU, GTU, GEU
Valid 16-bit Position
for LEP, LTP, GTP, and GEP

 

Note: These link types are available only in firmware version 20011113 and later.

 

This family of link types is used to analyze the results of the RMC's three math commands: Add (+), Subtract (-), and MulDiv ('). These link types evaluate the results of the last math command that was issued on the axis running the event sequence. Therefore, these link types can be used any time after the math command is issued (including on the same step) up until another math command is issued on that axis.

All of these link types are non-blocking. That is, if the condition they check for is true, then they jump to the step referenced by the Link Next field. However, if the condition they check for is false, then they jump to the next step.

These link types can be divided into three groups:

If there is any chance of an overflow in the math operation, then you must first use a MathERR or MathOK link type to handle the case where there was an overflow, and then do any compares you want to do with the value. Comparing an overflowed value will likely give incorrect or unexpected results.

Note: The Link Value is always treated as a constant when used in a comparison. However, you are not limited to comparing with a constant. You can use math commands to compute a value or copy a register into the Link Value field of the step that has the comparison link type.

Using with the Link Type and Link Value Dialog Box

  1. Under Link Type Category, select System-wide (Basic, non-axis).

  2. Under Link Type, select Math Compares/Errors.

  3. Under Link Condition, select whether you want to jump on a successful math operation, an overflow, or on a comparison.

  4. If you selected to jump on a comparison, then select the comparison type (=, <, >, etc.) and enter the value to compare with.

  5. If you selected a relational comparison (any comparison other than equal or not equal), then select the type of the result and compare values (signed, unsigned, or position units).

  6. If you selected a relational comparison for position values, then select the axis whose position unit range you want to use.

Note: This axis is encoded in bits 4-6 of the step's Mode word. Therefore, changing this value will change the Mode for the event step. Ensure that this is acceptable for the command on that event step. If it is not, then you will need to move the link type to another step.

Using without the Link Type and Link Value Dialog Box

  1. In the Link Type field, enter one of the link types listed at the top of this topic. You must enter it in hexadecimal.

  2. For the MathERR and MathOK link types, enter 0 for the Link Value. Otherwise, enter the value you want to compare with.

 


Copyright (c) 1997-2015 by Delta Computer Systems, Inc.