# Help Getting Started with Instrument Interface

**URL:** <https://forum.inductiveautomation.com/t/help-getting-started-with-instrument-interface/5480>\
**Category:** General Discussion\
**Created:** [November 27, 2012, 4:12pm UTC](https://forum.inductiveautomation.com/t/help-getting-started-with-instrument-interface/5480 "2012-11-27T16:12:06Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zobal](https://avatars.discourse-cdn.com/v4/letter/z/90db22/32.png) [@Zobal](https://forum.inductiveautomation.com/u/Zobal)\
**Post date:** [November 27, 2012, 4:12pm UTC](https://forum.inductiveautomation.com/t/help-getting-started-with-instrument-interface/5480/1 "2012-11-27T16:12:06Z")

</div>

Hi There,

I have a variety of sensors connected to the gateway OPC UA server through the TCP driver. I’m trying to figure out how to parse the values written into the tags with the Instrument Interface, ultimately.

Could I have a hand getting started?

Mike

---

<div class="post-metadata">

**Author:** ![Travis.Cox](https://avatars.discourse-cdn.com/v4/letter/t/b9bd4f/32.png) [@Travis.Cox](https://forum.inductiveautomation.com/u/Travis.Cox)\
**Post date:** [November 27, 2012, 4:15pm UTC](https://forum.inductiveautomation.com/t/help-getting-started-with-instrument-interface/5480/2 "2012-11-27T16:15:50Z")

</div>

The instrument interface is really for parsing data from serial devices or files. If you are using the TCP driver you already have the values as tags. You can create expression tags to perform string manipulations on the values for some simple parsing.

If you have an example of the string you can post it and we can help you out.

---

<div class="post-metadata">

**Author:** ![Zobal](https://avatars.discourse-cdn.com/v4/letter/z/90db22/32.png) [@Zobal](https://forum.inductiveautomation.com/u/Zobal)\
**Post date:** [November 27, 2012, 4:36pm UTC](https://forum.inductiveautomation.com/t/help-getting-started-with-instrument-interface/5480/3 "2012-11-27T16:36:56Z")

</div>

Sure, here’s one:

3200000020E25A41 DS1923 temperature: 25.593747 deg.C.

3200000020E25A41 is the id of the device  
DS1923 is the type of device  
25.593747 deg.C is the value

Thanks a lot!

Mike

---

<div class="post-metadata">

**Author:** ![Travis.Cox](https://avatars.discourse-cdn.com/v4/letter/t/b9bd4f/32.png) [@Travis.Cox](https://forum.inductiveautomation.com/u/Travis.Cox)\
**Post date:** [November 27, 2012, 5:42pm UTC](https://forum.inductiveautomation.com/t/help-getting-started-with-instrument-interface/5480/4 "2012-11-27T17:42:18Z")

</div>

Ok, you can make expression tags that have an expression like this:`try(split({[~]RawTag}, " ")[0,0], "Unknown")`That will get out the id of the device. Replace the {[~]RawTag} with the path to your string tag. To get the type of the device:`try(split({[~]RawTag}, " ")[1,0], "Unknown")`Lastly, to get the value:`try(split({[~]RawTag}, " ")[3,0], 0.0)`

---

<div class="post-metadata">

**Author:** ![Zobal](https://avatars.discourse-cdn.com/v4/letter/z/90db22/32.png) [@Zobal](https://forum.inductiveautomation.com/u/Zobal)\
**Post date:** [November 27, 2012, 5:51pm UTC](https://forum.inductiveautomation.com/t/help-getting-started-with-instrument-interface/5480/5 "2012-11-27T17:51:56Z")

</div>

Awesome. Thanks. One more question. Let’s say I have a thermometer component. I want to update it on a Tag Change event. How do I reference the thermometer (let’s say it’s in the main window) within the event script?

Thanks a lot. I’ve been reading the forum all morning and it really is full of helpful info.

Mike

---

<div class="post-metadata">

**Author:** ![Travis.Cox](https://avatars.discourse-cdn.com/v4/letter/t/b9bd4f/32.png) [@Travis.Cox](https://forum.inductiveautomation.com/u/Travis.Cox)\
**Post date:** [November 27, 2012, 6:21pm UTC](https://forum.inductiveautomation.com/t/help-getting-started-with-instrument-interface/5480/6 "2012-11-27T18:21:16Z")

</div>

You don’t need to do anything with scripts. Just simply bind the thermometer property to the tag. There is a bind button to the right of each property. You can also drag the tag you created to the appropriate property of the thermometer and it wil do the same thing.

---

<div class="post-metadata">

**Author:** ![Zobal](https://avatars.discourse-cdn.com/v4/letter/z/90db22/32.png) [@Zobal](https://forum.inductiveautomation.com/u/Zobal)\
**Post date:** [November 27, 2012, 6:27pm UTC](https://forum.inductiveautomation.com/t/help-getting-started-with-instrument-interface/5480/7 "2012-11-27T18:27:42Z")

</div>

But then how do I set the thermometer to the parsed value from the tag? Do I create a second tag from the parsed values from the tag created by the TCP Driver and use that new tag for the thermometer?

Sorry if I sound like an idiot. I’m somewhat of a noob. ![:scratch:](https://us1.discourse-cdn.com/inductiveautomation/original/1X/76d1620bec252bfac07050c889ff5a91dc8a9c25.gif ":scratch:")

Mike

---

<div class="post-metadata">

**Author:** ![Travis.Cox](https://avatars.discourse-cdn.com/v4/letter/t/b9bd4f/32.png) [@Travis.Cox](https://forum.inductiveautomation.com/u/Travis.Cox)\
**Post date:** [November 27, 2012, 7:16pm UTC](https://forum.inductiveautomation.com/t/help-getting-started-with-instrument-interface/5480/8 "2012-11-27T19:16:02Z")

</div>

Yes, you create a second tag that is an expression tag with one of the expressions I mentioned earlier. You can bind the component to the new expression tag. Expression tags are used just like OPC tags except the values come from a calculation which in this case is the parsed value.

---

<div class="post-metadata">

**Author:** ![Zobal](https://avatars.discourse-cdn.com/v4/letter/z/90db22/32.png) [@Zobal](https://forum.inductiveautomation.com/u/Zobal)\
**Post date:** [November 27, 2012, 7:34pm UTC](https://forum.inductiveautomation.com/t/help-getting-started-with-instrument-interface/5480/9 "2012-11-27T19:34:04Z")

</div>

Oops, sorry about that. I got it now. Thank you.

Mike

---

<div class="post-metadata">

**Author:** ![Zobal](https://avatars.discourse-cdn.com/v4/letter/z/90db22/32.png) [@Zobal](https://forum.inductiveautomation.com/u/Zobal)\
**Post date:** [November 27, 2012, 8:23pm UTC](https://forum.inductiveautomation.com/t/help-getting-started-with-instrument-interface/5480/10 "2012-11-27T20:23:10Z")

</div>

Okay, now I feel really dumb. How do I get the path to my string tag? I tried

```auto
try(split({[iButtonTCP]51151/Field0}, " ")[3,0], 0.0)
```

which gives me an “unable to find referenced tag path” error

I also tried

```auto
try(split({Tags/iButtonTemperature}, " ")[3,0], 0.0)
```

which gives me the same.

I feel like I’m close…

Mike

---

<div class="post-metadata">

**Author:** ![James.Lorenz](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/james.lorenz/32/3290_2.png) [@James.Lorenz](https://forum.inductiveautomation.com/u/James.Lorenz)\
**Post date:** [November 27, 2012, 8:49pm UTC](https://forum.inductiveautomation.com/t/help-getting-started-with-instrument-interface/5480/11 "2012-11-27T20:49:46Z")

</div>

Try inserting the tag paths with the built in “insert tag” button on the right side of the expression window, those should give you the correct path references for your tags.

---

<div class="post-metadata">

**Author:** ![Zobal](https://avatars.discourse-cdn.com/v4/letter/z/90db22/32.png) [@Zobal](https://forum.inductiveautomation.com/u/Zobal)\
**Post date:** [November 27, 2012, 9:02pm UTC](https://forum.inductiveautomation.com/t/help-getting-started-with-instrument-interface/5480/12 "2012-11-27T21:02:51Z")

</div>

That’s it!

Thanks,  
Mike
