Function Command

Character: ,
Decimal: 44
Hexadecimal: 0x2C
Command Value: Destination Step (0-255)

 

Note: This command is supported in RMC100 CPU firmware dated 20010402 or newer.

 

This command performs any of a number of functions on the Actual Positions of any group of axes. The result of the function is stored in the Command Value of the Event Step specified by the Command Value. The available functions include the following:

Function

Description

Min (0)

Uses the minimum Actual Position among the selected axes.

Max (1)

Uses the maximum Actual Position among the selected axes.

Mid (2)

Uses the middle Actual Position among the selected axes.

Average (3)

Uses the average of the selected axes' Actual Positions.

 

This command uses the command fields as follows:

 Mode: Reserved (must be 0)

 Acceleration: Reserved (must be 0)

 Deceleration: Function Number (see above)

 Speed: Axes to Perform Function On (see below)

 Command Value: Destination Step

 Command: , (44 decimal, 0x2C hexadecimal)

 

The axes to include in the function are selected using the Speed command field. Bits 0 to 7 correspond to axes 0 to 7, as shown below. Set the bit corresponding to each axis you want included in the function. Bits 8-15 of the Speed command field are ignored.

 

image\ebx_-612420103.gif

Example

The user wishes to select axes 0, 1, 4 and 5. Setting each of the corresponding bits to 1, as shown below, gives the binary value 00110011.

image\ebx_1342082454.gif

The binary value 00110011must be converted to hexadecimal or decimal so it can be put into the speed parameter. This binary value converts to the hexadecimal value 0x0033 or the decimal value 51.

Tip:
The Windows calculator is an easy way to convert from binary to decimal or hexadecimal. To open, click the Start button, point to Programs, then Accessories, and click Caculator. On the View menu click Scientific. Click Bin, enter the binary value, then click Hex or Dec to show the converted value.

 


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