SECS Definition Language (SDL) file

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:

"<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>"

Any help please! Up!

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.

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

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. )-:

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.

Hi mgross,

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


         "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

Hi mgross,

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

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)

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.

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

Hi mgross,

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

Thanks,
Darwin

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.

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

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