Spreadsheet Import Tool

Hmmm. Not within the initial system.tag.configure. Play with the member path/values pairs to see what you can do with its system.tag.writeBlocking.

Reading the manual, I thought it said parameters and members use writeBlocking so I thought it was just a matter of getting the path correct. I tried every path I could think of and couldn't get it to work. This nested UDT is in the root. If the name is MyUDT I would think it would be MyUDT/Parameters.myParam (which is what I used in a writeBlocking test). I'll keep trying. If you have a chance could you give it a whirl just to confirm it will (or won't) work?

I did a tag import from a wonderware tagdb to Ignition with the alarm configurations and trending.

I ended up writing it in a script transform and just copy/pasting the JSON into my tag db. I didn't know you could do that so I thought I'd pass that along in case it is helpful for others.

Posting this in case it's useful to others. Iterators are useful but there may be times where a list of arbitrary values is needed instead. For example, instead of a range like 1-10 or 1,2,5-9, something like a list of string values 'V1', 'B2', 'EE'. In my example below I still create an iterator column but also add an eval column to grab a specific value at the index. I can then reference that value (for columns to the right) using %(SCPNdx)s.

image

I recommend this for simple cases:

No eval required. The only potential gotcha is digits followed by a single letter F will be interpreted as float instead of a string.

2 Likes

1F was a problem for me. That is a common breaker designator. I wish there was a way to escape that.

You can comment out lines 202-205 in the project library script. One of my clients did that, for the same reason.

1 Like

Another recommendation for the table format, because it also allows an arbitrary number of columns for each row and reference of those values inside the row block keyword columns.

For many of the vendors whose systems we integrate with, we now have it where we can get simple CSV/Excel exports from their design artifacts and plug them right in to our site deployment template.

Sometimes, we use simple Excel helper columns to the left or right to create values needed in our keyword columns - this is useful if you need to do calculations in one row based on values in another row. Other times, we can use an Eval column to create one formula to evaluate at runtime.

For example, this allows us to easily configure 10,000 individual tracker row motors at a solar plant with unique custom properties and parameters written for each instance, with one simple config block under the keyword columns to the right of the table. And, if the configuration changes during commissioning and the vendor updates their source data, it's a simple copy/paste from their updated CSV and then we can re-run via the Spreadsheet Import Tool.

1 Like

When using the table format, how do you guys handle situations where you don't want to pass a value? In the simple example below, assuming an iterator to the left of 1-10, 2-9 will be 11, not blank or None. This should never happen, but I would like to know options just in case I need to handle that.

Thanks for bringing up the table format, it's quite handy now that I have run through scenarios.

1 Like

Create a first row with that column blank, as the first row in an iterator block is the default when a cell below it is empty. Arrange for your action item to be missing an element so it won't execute for that row.

2 Likes

I was the client for development of this tool, and I'm still learning about it. I've fought that behavior a few times and it's great to know a blank row will do the job.

Phil I might send you a test spreadsheet to look at if you don't mind. I tried having a blank row/cell and for me it enters a 0.

I don't mind, but it'll be tomorrow. Beer arriving shortly. :grin:

3 Likes