Defining a Omron CIP unsolicited message using Sysmac Studio

This section shows an example of using the Omron Sysmac Studio Software to add a rung of a ladder and configure an unconnected message manager (UCMM) instruction that can send an event notification to the Omron driver. This section is not meant to be the authoritative source for writing ladder logic to send unconnected messages from an Omron NJ PLC.
Refer to the appropriate Omron documentation for full details on configuring this device.

  1. Using the Omron Sysmac Studio, expand the Programming menu option and select the Section where the message function block will be added.

  2. If this is the first function block, an empty rung 0 will have already been created. If modifying an existing ladder right-click on the location in the ladder and select either the Insert Rung Above or the Insert Rung Below option to add a new function block to the ladder.

  3. Double-click on the "Enter Function Block" text. Enter a unique name for the rung that was just added.
  4. Double-click on the "Enter Type Name" text. Enter any character into the box and a list of the existing function block types will be shown.

The Omron driver supports two message types, CIPUCMMSEND and CIPUCMMWRITE.

CIPUCMMSEND parameters

The following steps are performed for the CIPUCMMSEND function block.

  1. Right-click while on the line that connects to the Execute parameter and select the Insert Input (C) option. This will display an entry field, enter a character into this entry field and the list of tags defined in the Global Variables memory area will be displayed. Select a tag from this list that will cause the CIPUCMMSEND to execute.

  2. The following image displays a completed CIPUCMMSEND function block.

Enter values for the following parameters.

Parameter Value
RoutePath The IP address of the node where the driver is running. An Omron CIP Listener device must be defined and started on the node to receive the message.
TimeOut The time in seconds, to allow the CIPUCMMSEND code to complete.
ServiceCode Must equal a hexadecimal value of 10 (0x10). This is the service code associated with a CIPUCMMSEND command.
RqPath A variable of type _sREQUEST_PATH, with values set for the ClassID, InstanceID, and AttributeID that will match the corresponding values defined in a trigger event on the node. See the image below for how the SendSampleReqPath variable used in the CIPUCMMSEND command is defined.
ServiceDat The tag that contains the data that will be sent to the node with the CIPUCMMSEND.
Size The number of bytes of data that will be sent to the node.
RespServiceDat The tag that will receive the result status from the trigger that is executing on the node. This data sent from the node is defined as a a 1-byte unsigned integer.





CIPUCMMWRITE parameters

The following steps are performed for the CIPUCMMWRITE function block.

  1. Right-click while on the line that connects to the Execute parameter and select the Insert Input (C) option. This will display an entry field, enter a character into this entry field and the list of tags defined in the Global Variables memory area will be displayed. Select a tag from this list that will cause the CIPUCMMWRITE to execute.

  2. The following image displays a completed CIPUCMMWRITE function block.

  3. Enter values for the following parameters.
    ParameterValue

    RoutePath

    The IP address of the node where the driver is running. An Omron CIP Listener device must be defined and started on the node to receive the message.

    Timeout

    The time in seconds, to allow the CIPUCMMWRITE code to complete.

    DstDat

    A string that uniquely identifies this CIPUCMMWRITE message on the node. The value of this string can be anything, as long as it matches a corresponding Destination value defined in a CIPUCMMWRITE trigger defined on the node.

    Size

    The number of bytes of data that will be sent to the node.

    SrcDat

    The tag that contains the data that will be sent to the node with the CIPUCMMWRITE.