# SECS Definition Language (SDL) file

**URL:** <https://forum.inductiveautomation.com/t/secs-definition-language-sdl-file/15786>\
**Category:** General Discussion\
**Created:** [October 27, 2017, 3:15am UTC](https://forum.inductiveautomation.com/t/secs-definition-language-sdl-file/15786 "2017-10-27T03:15:54Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![darwin.deleon](https://avatars.discourse-cdn.com/v4/letter/d/eb8c5e/32.png) [@darwin.deleon](https://forum.inductiveautomation.com/u/darwin.deleon)\
**Post date:** [October 27, 2017, 3:15am UTC](https://forum.inductiveautomation.com/t/secs-definition-language-sdl-file/15786/1 "2017-10-27T03:15:54Z")

</div>

Hi,

Need help on how to manage SDL file.  
It seems that the S14F1, S14F2 cannot be found in SDL.  
I need help on how to add stream function in sdl.

Please see the following example:

```auto
"<Trans Name="S14F1" Desc="Strip Map" ReplyExpected="YES">
        <Primary Stream="14" Func="1" Name="GAR" Desc="GetAttr request">
            <Root>
                <Item Name="L" Desc="" Format="L" IsArray="NO" Value="">
                    <Item Name="OBJSPEC" Desc="Specific object instance" Format="A" IsArray="NO" Value="" />
                    <Item Name="OBJTYPE" Desc="Identifier for group or class of objects" Format="A" IsArray="NO" Value="StripMap" />
                    <Item Name="Li" Desc="" Format="L" IsArray="NO" Value="">
                        <Item Name="OBJID" Desc="Identifier for an object" Format="A" IsArray="NO" Value="1002948021" />
                    </Item>
                    <Item Name="Lq" Desc="" Format="L" IsArray="NO" Value="" />
                    <Item Name="La" Desc="" Format="L" IsArray="NO" Value="">
                        <Item Name="ATTRID" Desc="Identifier for an attribute for a specific type of object" Format="A" IsArray="NO" Value="LotID" />
                        <Item Name="ATTRID" Desc="Identifier for an attribute for a specific type of object" Format="A" IsArray="NO" Value="OriginLocation" />
                        <Item Name="ATTRID" Desc="Identifier for an attribute for a specific type of object" Format="A" IsArray="NO" Value="Rows" />
                        <Item Name="ATTRID" Desc="Identifier for an attribute for a specific type of object" Format="A" IsArray="NO" Value="Columns" />
                        <Item Name="ATTRID" Desc="Identifier for an attribute for a specific type of object" Format="A" IsArray="NO" Value="CellStatus" />
                    </Item>
                </Item>
            </Root>
        </Primary>
        <Secondary Stream="14" Func="2" Name="GAD" Desc="GetAttr data">
            <Root>
                <Item Name="L2a" Desc="" Format="L" IsArray="NO" Value="">
                    <Item Name="Ln" Desc="" Format="L" IsArray="NO" Value="">
                        <Item Name="L2b" Desc="" Format="L" IsArray="NO" Value="">
                            <Item Name="OBJID" Desc="Identifier for an object" Format="A" IsArray="NO" Value="6117386410037" />
                            <Item Name="L2c" Desc="" Format="L" IsArray="NO" Value="">
                                <Item Name="" Desc="" Format="L" IsArray="NO" Value="">
                                    <Item Name="" Desc="" Format="A" IsArray="NO" Value="ORIGINLOCATION" />
                                    <Item Name="" Desc="" Format="U1" IsArray="NO" Value="3" />
                                </Item>
                                <Item Name="" Desc="" Format="L" IsArray="NO" Value="">
                                    <Item Name="" Desc="" Format="A" IsArray="NO" Value="ROWS" />
                                    <Item Name="" Desc="" Format="U4" IsArray="NO" Value="9" />
                                </Item>
                                <Item Name="" Desc="" Format="L" IsArray="NO" Value="">
                                    <Item Name="" Desc="" Format="A" IsArray="NO" Value="COLUMNS" />
                                    <Item Name="" Desc="" Format="U4" IsArray="NO" Value="37" />
                                </Item>
                                <Item Name="" Desc="" Format="L" IsArray="NO" Value="">
                                    <Item Name="" Desc="" Format="A" IsArray="NO" Value="CELLSTATUS" />
                                    <Item Name="" Desc="" Format="A" IsArray="NO" Value="0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0" />
                                </Item>
                                <Item Name="" Desc="" Format="L" IsArray="NO" Value="">
                                    <Item Name="" Desc="" Format="A" IsArray="NO" Value="DEFECTCODE" />
                                    <Item Name="" Desc="" Format="A" IsArray="NO" Value="CANNOT BE BLANK OR SPACE. MUST CONTAIN SOMETHING." />
                                </Item>
                            </Item>
                        </Item>
                    </Item>
                    <Item Name="Ln" Desc="" Format="L" IsArray="NO" Value="">
                        <Item Name="L2b" Desc="" Format="L" IsArray="NO" Value="">
                            <Item Name="OBJACK" Desc="Identifier for an object" Format="U1" IsArray="NO" Value="0" />
                            <Item Name="L2c" Desc="" Format="L" IsArray="NO" Value="" />
                        </Item>
                    </Item>
                </Item>
            </Root>
        </Secondary>
    </Trans>"

```

---

<div class="post-metadata">

**Author:** ![darwin.deleon](https://avatars.discourse-cdn.com/v4/letter/d/eb8c5e/32.png) [@darwin.deleon](https://forum.inductiveautomation.com/u/darwin.deleon)\
**Post date:** [October 28, 2017, 3:31am UTC](https://forum.inductiveautomation.com/t/secs-definition-language-sdl-file/15786/3 "2017-10-28T03:31:07Z")

</div>

Any help please! Up!

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [October 28, 2017, 5:21pm UTC](https://forum.inductiveautomation.com/t/secs-definition-language-sdl-file/15786/4 "2017-10-28T17:21:17Z")

</div>

You’ll have to provide a bit more context. I haven’t run into this file format and Google wasn’t helpful. Please also explain what “S14F1” and “S14F2” represent and what errors you are getting.

---

<div class="post-metadata">

**Author:** ![darwin.deleon](https://avatars.discourse-cdn.com/v4/letter/d/eb8c5e/32.png) [@darwin.deleon](https://forum.inductiveautomation.com/u/darwin.deleon)\
**Post date:** [October 29, 2017, 9:46am UTC](https://forum.inductiveautomation.com/t/secs-definition-language-sdl-file/15786/5 "2017-10-29T09:46:51Z")

</div>

H i pturmel,

good day!

this S14F1 is a request comming from the equipment requesting the host to send a stip map via S14F2.  
this S14F1 is not available to the listing of sdl in ignition. when i use this s14f2 it gives me an error. i will send the error when i go to the office this coming tuesday.

I tried putting the S14F1 and S14F2 in the SDL file and it’s already on the list when still unrecognized.

Thanks,  
darwin

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [October 29, 2017, 1:05pm UTC](https://forum.inductiveautomation.com/t/secs-definition-language-sdl-file/15786/6 "2017-10-29T13:05:45Z")

</div>

Ah, this is part of the SECS/GEM module. I’m completely ignorant of this one, and it doesn’t seem to have any documentation. )-:

---

<div class="post-metadata">

**Author:** ![mgross](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mgross/32/3311_2.png) [@mgross](https://forum.inductiveautomation.com/u/mgross)\
**Post date:** [October 30, 2017, 2:57pm UTC](https://forum.inductiveautomation.com/t/secs-definition-language-sdl-file/15786/7 "2017-10-30T14:57:50Z")

</div>

The default SDL file that comes with the SECS/GEM module is only coded for some of the more common SECS commands. When people run into the situation where the SDL file does not have the definition for a SECS message that they need to send, they create the definition themselves and add it to the SDL file on the gateway. What you will have to do is translate the XML definition you have into a JSON definition that can be added to the SDL file under the S14 section. This is one of those situations where you have to sit down with a text editor and build out the JSON one line at a time. The S14F9 definition is in the SDL file, so I would start with that as a reference.

---

<div class="post-metadata">

**Author:** ![darwin.deleon](https://avatars.discourse-cdn.com/v4/letter/d/eb8c5e/32.png) [@darwin.deleon](https://forum.inductiveautomation.com/u/darwin.deleon)\
**Post date:** [November 2, 2017, 1:56am UTC](https://forum.inductiveautomation.com/t/secs-definition-language-sdl-file/15786/8 "2017-11-02T01:56:01Z")

</div>

Hi mgross,

Good day!  
i already tried that but still the same response.  
i added the following:

```auto

         "S14F1": {
            "doc": [
               "Get Attribute Request (GAR) ",
               "This message is used to request a set of specified attributes for one object"
            ],
            "block": "multiple",
            "direction": "h<-e",
            "reply": true,
            "body": [
               "OBJSPEC",
               "OBJTYPE",
               ["OBJID"],
               [],
               [
                  "",
                  "",
                  "",
                  ""
               ]
            ]
         },
         "S14F2": {
            "doc": [
               "Get Attribute Data (GAD) ",
               "This message is used to request a set of specified attributes for one object"
            ],
            "block": "single",
            "direction": "h->e",
            "reply": true,
            "body": [
               [[
                  "OBJID",
                  [
                     [
                        "",
                        ""
                     ],
                     [
                        "",
                        ""
                     ],
                     [
                        "",
                        ""
                     ],
                     [
                        "",
                        ""
                     ],
                     [
                        "",
                        ""
                     ],
                  ]
               ]],
               [[
                  "OBJACK",
                  []
               ]]
            ]
         }

```

Can you help me check if my script is correct.

Thanks,  
Darwin

---

<div class="post-metadata">

**Author:** ![darwin.deleon](https://avatars.discourse-cdn.com/v4/letter/d/eb8c5e/32.png) [@darwin.deleon](https://forum.inductiveautomation.com/u/darwin.deleon)\
**Post date:** [November 2, 2017, 2:26am UTC](https://forum.inductiveautomation.com/t/secs-definition-language-sdl-file/15786/9 "2017-11-02T02:26:07Z")

</div>

Hi mgross,

Upon my debugging i found an error…  
please see the following:

```auto
om.inductiveautomation.secsgem.Parser$SecsDefinitionException: No definition for item OBJID in S14F1.
S14F1 definition: ["OBJSPEC","OBJTYPE",["OBJID"],[],["","","",""]]
HsmsMessage[deviceID: 0, hByte2: -114, hByte3: 1, sType: DATAMESSAGE, systemBytes: 10, secsName: S14F1, message: {"header":{"stream":14,"function":1,"reply":true,"doc":"Get Attribute Request (GAR) "},"body":[{"format":"A","value":"","doc":"OBJSPEC, A text string that has an internal format and that is used to point to a specific object instance."},{"format":"A","value":"StripMap","doc":"OBJTYPE, Identifier for a group or class of objects"},[{"format":"A","value":"6117395180033"}],[],[{"format":"A","value":"ORIGINLOCATION"},{"format":"A","value":"ROWS"},{"format":"A","value":"COLUMNS"},{"format":"A","value":"CELLSTATUS"},{"format":"A","value":"DEFECTCODE"}]]}]
	at com.inductiveautomation.secsgem.HsmsMessage.validateBody(HsmsMessage.java:1013)
	at com.inductiveautomation.secsgem.HsmsMessage.validateBody(HsmsMessage.java:822)
	at com.inductiveautomation.secsgem.HsmsMessage.validateSecsMessage(HsmsMessage.java:1408)
	at com.inductiveautomation.secsgem.connection.HsmsReader.dataArrived(HsmsReader.java:155)
	at com.inductiveautomation.secsgem.connection.HsmsReader.startReading(HsmsReader.java:45)
	at com.inductiveautomation.secsgem.connection.HsmsConnectionControl.startReading(HsmsConnectionControl.java:62)
	at com.inductiveautomation.secsgem.equipment.EquipmentConnection$3.mainLoop(EquipmentConnection.java:214)
	at com.inductiveautomation.secsgem.equipment.EquipmentConnection$3.run(EquipmentConnection.java:147)
	at java.lang.Thread.run(Thread.java:748)

```

---

<div class="post-metadata">

**Author:** ![mgross](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mgross/32/3311_2.png) [@mgross](https://forum.inductiveautomation.com/u/mgross)\
**Post date:** [November 2, 2017, 8:57pm UTC](https://forum.inductiveautomation.com/t/secs-definition-language-sdl-file/15786/10 "2017-11-02T20:57:24Z")

</div>

For your error, the module is saying that it cannot find a definition for “OBJID” in the SDL file. From your example, it might look something like this:

`
            "OBJID":{
                "doc":["OBJID, Identifier for an object"],
                "formats":["A"]},
`

You would have to stick that under the “O” section in the SDL file.

---

<div class="post-metadata">

**Author:** ![darwin.deleon](https://avatars.discourse-cdn.com/v4/letter/d/eb8c5e/32.png) [@darwin.deleon](https://forum.inductiveautomation.com/u/darwin.deleon)\
**Post date:** [November 2, 2017, 11:07pm UTC](https://forum.inductiveautomation.com/t/secs-definition-language-sdl-file/15786/11 "2017-11-02T23:07:20Z")

</div>

Hi mgross,

i already figured it out yesterday thanks for the reply. By the way, i’m looking at the example on how to work with autoreply with param dynamically. I’m sending a map automatically in response to S14F1. The example is a bit few to understand, but anyway i will give it a try.

Thanks,  
Darwin

---

<div class="post-metadata">

**Author:** ![darwin.deleon](https://avatars.discourse-cdn.com/v4/letter/d/eb8c5e/32.png) [@darwin.deleon](https://forum.inductiveautomation.com/u/darwin.deleon)\
**Post date:** [November 3, 2017, 2:23am UTC](https://forum.inductiveautomation.com/t/secs-definition-language-sdl-file/15786/12 "2017-11-03T02:23:34Z")

</div>

Hi mgross,

Is there a way to create a dynamic variable during autoreply in sdl.

Thanks,  
Darwin

---

<div class="post-metadata">

**Author:** ![mgross](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mgross/32/3311_2.png) [@mgross](https://forum.inductiveautomation.com/u/mgross)\
**Post date:** [November 3, 2017, 2:40pm UTC](https://forum.inductiveautomation.com/t/secs-definition-language-sdl-file/15786/13 "2017-11-03T14:40:10Z")

</div>

Sorry, right now the module can only send back a static value in the autoreply field in the SDL file. I don’t know if this helps, but you can also configure a realtime message handler to fire when receiving an S14F1 message. You can’t send back a reply to S14F1 directly, but you could dispatch another message that sends the map.

---

<div class="post-metadata">

**Author:** ![darwin.deleon](https://avatars.discourse-cdn.com/v4/letter/d/eb8c5e/32.png) [@darwin.deleon](https://forum.inductiveautomation.com/u/darwin.deleon)\
**Post date:** [November 5, 2017, 2:59pm UTC](https://forum.inductiveautomation.com/t/secs-definition-language-sdl-file/15786/14 "2017-11-05T14:59:35Z")

</div>

Hi mgross,

thanks for the response. i’m also reading the realtime message handler, but i’m supposedly the one to send the map to the equipment. if they just can improve it that the sdl can have access directly to the tags, it would be more powerful. I hope Indutive automation group developers could read this. They can add this feature to ignition. I haven’t fully used this system but it’s really nice to use it. do you have contact to any developers inside inductiveautomation?

BR,  
Darwin

---

<div class="post-metadata">

**Author:** ![dhullett](https://avatars.discourse-cdn.com/v4/letter/d/f6c823/32.png) [@dhullett](https://forum.inductiveautomation.com/u/dhullett)\
**Post date:** [January 12, 2021, 10:00pm UTC](https://forum.inductiveautomation.com/t/secs-definition-language-sdl-file/15786/15 "2021-01-12T22:00:43Z")

</div>

Hi Im actually trying to get S14F1 messages working with a simulation Echo response. Would you have a sample of this functionality?
