Add an MSG_CIPSYMBOLIC function block, variables, and a contact

Use the following steps to add a MSG_CIPSYMBOLIC function block, input variables, and a contact to a ladder diagram.
To add an MSG_CIPSYMBOLIC function block, variables, and a contact
  1. Add a third rung by doing one of the following:
    • From
      Toolbox
      , drag Add branch button to the place under the second ladder rung.
    • Select the second rung, and then select
      Alt+Shift+R
      .
  2. Add the MSG_CIPSYMBOLIC function block by doing one of the following:
    • In
      Toolbox
      , in
      Search
      , enter
      MSG_CIPSYMBOLIC
      , and then drag it to a valid location on the third ladder rung.
    • Select the third rung, and then in
      Toolbox
      , double-click
      MSG_CIPSYMBOLIC
      . The
      MSG_CIPSYMBOLIC
      function block is added to a valid location on the third ladder rung.
  3. Create variables.
    1. On the
      MSG_CIPSYMBOLIC
      function block, right-click each variable, and then select
      New variable
      for each parameter.
    2. In
      New variable
      , enter the variable name for each parameter according to the following table.
      Parameters and variables
      Parameter
      Variable Name
      MSG_CIPSYMBOLIC
      MSG_WriteVariable
      CtrlCfg
      A_CtrlCfg
      SymbolicCfg
      A_SymCfg
      TargetCfg
      A_TarCfg
      Data
      A_Data
  4. In
    Project Organizer
    , under your program, double-click
    Local Variables
    to open the local variable grid.
  5. In the local variable grid, do the following:
    1. For the A_Data variable, double-click the
      Dimension
      cell, and then change the array size to [1...4].
    2. Configure the initial values for _CtrlCfg according to the following table.
      A_Data initial values
      Parameter
      Initial Value
      A_CtrlCfg.Cancel
      Leave blank
      A_CtrlCfg.TriggerType
      300
      A_Ctrlcfg.StrMode
      Leave blank
    3. Configure the initial values for A_SymCfg according to the following table.
      A_SymCfg initial values
      Parameter
      Initial Value
      A_SymCfg.Service
      1
      A_SymCfg.Symbol
      'UDINT_FromA'
      A_SymCfg.Count
      Leave blank
      A_SymCfg.DataType
      200
      A_SymCfg.Offset
      200
    4. Configure the initial values for A_TarCfg according to the following table.
      A_TarCfg initial values
      Parameter
      Initial Value
      A_TarCfg.Path
      '4,192.168.1.19'
      A_TarCfg.CipConnMode
      1
      A_TarCfg.UcmmTimeout
      0
      A_TarCfg.ConnMsgTimeout
      0
      A_TarCfg.ConnClose
      Leave blank
  6. Add a contact by doing one of the following:
    • In
      Toolbox
      , in
      Search
      , enter
      XIC
      , and then drag it to the left of the MSG_CIPSYMBOLIC function block input on the third ladder rung.
    • Select the third rung, and then in
      Toolbox
      , double-click
      XIC
      . The XIC is added to the left of the MSG_CIPSYMBOLIC function block input.
  7. Create a variable for the contact.
    1. On the third rung, right-click the
      XIC
      , and then select
      New variable
      .
    2. In
      New variable
      , enter the variable name
      WriteValue
      , and then select
      Create
      .
The third rung of your ladder diagram program looks similar to the following image:
The third rung of MSG_CIPSYMBOLIC
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.
Normal