Motoman Command Examples

The following are examples of the Motoman command sequences needed to duplicate the functionality of each of the corresponding Native Mode commands. In each example, Motoman variable D001 is used to hold the command, Motoman variable B000 is used to hold the index pointing to D001, and Motoman variable B001 is used to hold the index pointing to the Motoman variable holding the parameter to be sent or data received.

  • Activate the job in slot #13 on the In-Sight sensor:

    Native Mode Command

    Motoman Command Sequence

    SJ13

     

    0001 SET B000 1
    0002 SET D001 100000
    0003 SET B001 2
    0004 SET B002 13
    0005 SAVEV B000
    0006 SAVEV D001
    0007 SAVEV B001
    0008 SAVEV B002

     The Motoman B-variable B002 holds the job # parameter.

  • Retrieve the job# of the active In-Sight job:

    Native Mode Command

    Motoman Command Sequence

    GJ

     

    0001 SET B000 1
    0002 SET D001 200000
    0003 SET B001 3
    0004 SAVEV B000
    0005 SAVEV D001
    0006 SAVEV B001
    0007 LOADV B003

    The Motoman B-variable B003 will hold the number of the active In-Sight job (0 to 19).

  • Set In-Sight vision system Online

    Native Mode Command

    Motoman Command Sequence

    SO1

     

    0001 SET B000 1
    0002 SET D001 300000
    0003 SET B001 4
    0004 SET B004 1
    0005 SAVEV B000
    0006 SAVEV D001
    0007 SAVEV B001
    0008 SAVEV B004

     The Motoman B-variable B004 holds the parameter. To set In-Sight Offline, SETB004 0.

  • Retrieve the Online/Offline state of the In-Sight vision system:

    Native Mode Command

    Motoman Command Sequence

    GO

     

    0001 SET B000 1
    0002 SET D001 400000
    0003 SET B001 5
    0004 SAVEV B000
    0005 SAVEV D001
    0006 SAVEV B001
    0007 LOADV B005

     The Motoman B-variable B005 will hold the Online/Offline state (1 or 0).

  • Trigger the Event in the active In-Sight job that is specified as 'Soft 7':

    Native Mode Command

    Motoman Command Sequence

    SE7

     

    0001 SET B000 1
    0002 SET D001 500000
    0003 SET B001 6
    0004 SET B006 7
    0005 SAVEV B000
    0006 SAVEV D001
    0007 SAVEV B001
    0008 SAVEV B006

     The Motoman B-variable B006 holds the Event number parameter.

  • Set the value of an EditInt function contained in cell A13 of the active In-Sight job to the integer value 69.

    Native Mode Command

    Motoman Command Sequence

    SIA013 69

    0001 SET B000 1
    0002 SET D001 601013
    0003 SET B001 7
    0004 SET I007 69
    0005 SAVEV B000
    0006 SAVEV D001
    0007 SAVEV B001
    0008 SAVEV I007

     

     The Motoman I-variable I007 stores the integer parameter.

  • Set the value of an EditFloat function contained in cell B14 of the active In-Sight job to the double, or real, value 3.142.

    Native Mode Command

    Motoman Command Sequence

    SFB014 3.142

     

    0001 SET B000 1
    0002 SET D001 702014
    0003 SET B001 8
    0004 SET R008 3.142
    0005 SAVEV B000
    0006 SAVEV D001
    0007 SAVEV B001
    0008 SAVEV R008

     The Motoman R-variable R008 stores the double or real parameter.

  • Set the value of an EditString function contained in cell C15 of the active In-Sight job to the string, or P-variable, "1.1,2.2,3.3,4.4,5.5,6.6,00".

    Native Mode Command

    Motoman Command Sequence

    SSC015 1.1,2.2,3.3,4.4,5.5,6.6,00

     

    0001 SET B000 1
    0002 SET D001 803015
    0003 SET B001 9
    0004 SET P009 1.1, 2.2, 3.3, 4.4, 5.5, 6.6, 00
    0005 SAVEV B000
    0006 SAVEV D001
    0007 SAVEV B001
    0008 SAVEV P009

     The Motoman P-variable P009 stores the P-variable parameter.

    Note: In your In-Sight job, you should use Token$ functions to parse the values of a P-variable.
  • Retrieve the string contained in cell C15 in the active In-Sight job (as set in the example immediately above), and place the result in the designated Motoman variable.

    Native Mode Command

    Motoman Command Sequence

    GVC015

     

    0001 SET B000 1
    0002 SET D001 903015
    0003 SET B001 10
    0004 SAVEV B000
    0005 SAVEV D001
    0006 SAVEV B001
    0007 LOADV P010

    The Motoman P-variable P010 will contain 1.1,2.2,3.3,4.4,5.5,6.6,00.

  • Retrieve the value contained in a cell in the active In-Sight job and place the result in the designated Motoman variable. The requested data will be formatted to match the specified data type (integer or floating point) indicated by the Motoman variable in the controller program.

    Note: An In-Sight cell containing any numeric value will return a float value formatted to 3 decimal places when requested by the Native Mode command GV, regardless of whether the cell contains an integer or a floating point value.

    Native Mode Command

    Motoman Command Sequence

    GVD016

     

    0001 SET B000 1
    0002 SET D001 904016
    0003 SET B001 11
    0004 SAVEV B000
    0005 SAVEV D001
    0006 SAVEV B001
    0007 LOADV I011

    In this example, an I-variable (integer) is requested. So:

    1. If the value contained in cell D016 is 123, the Motoman I-variable I011 will contain '123'.
    2. If the value contained in cell D016 is 123.555, the Motoman I-variable I011 will also contain '123'.
    Note: The Motoman mode command does not perform any rounding operation when converting a floating-point value into an integer; the decimal part is simply truncated; it is up to the user to perform a mathematical rounding function, if necessary, to transmit an In-Sight floating-point value into a Motoman integer variable.

    Native Mode Command

    Motoman Command Sequence

    GVE017

     

    0001 SET B000 1
    0002 SET D001 905017
    0003 SET B001 12
    0004 SAVEV B000
    0005 SAVEV D001
    0006 SAVEV B001
    0007 LOADV R012

    In this example, an R-variable (real) is requested. So:

    1. If the value contained in cell E017 is 123, the Motoman R-variable R012 will contain '123.000'.
    2. If the value contained in cell E017 is 123.555, the Motoman R-variable R012 will contain '123.555'.