ottomation

Generating UDT Templates from Excel

6 posts in this topic

Does anyone have any tips or tricks for generating UDT Templates from an excel spreadsheet? It says in the help files you can copy/paste from excel into the UDT Template, but it seems to only allow that cell by cell, instead of the whole table of data. This is painfully tedious when building larger interfaces. I've tried saving the spreadsheet in various formats (CSV, PRN, tab delimted txt) and I've tried various versions of RSLogix from 23 to 31. I can't seem to find any detailed info on how to do this. I've seen some other forum posts regarding using scripting to generate the XML to import the UDT, but I don't understand why I can't simply copy and paste the info in. Is this really that difficult?

Any help would be greatly appreciated.

Thanks

Otto

Share this post


Link to post
Share on other sites

i use such approach all time regardless of programming software used.

it requires understanding few things including how the result should look like, then breaking it down, put the parts in cells. generate whatever you need, then recombine using concatenate (if doing everything in Excel alone) or final touch like search and replace may be done in text editor like  Notepad++ or whatever you use.

computers are not very good at reading minds. they prefer data that is already in EXACT format. key is to give them something in that EXACT format and they will not complain.

also "difficult" is a relative term. that is where practice comes in. knowing your toolset can make you look like a wizard. the opposite is also true.

 

 

 

1 person likes this

Share this post


Link to post
Share on other sites

When you export a UDT you get an L5X file. It's format us XML. CSV, Comma Separated Variable, is not the same format.

I have made "templates" in Excel to create a way to map tags to IO. It might give you an idea for how to create the same thing. You basically only need the Member Name and Data Type. Everything else looks the same. So you create a template in Excel with those two things as data entry points and use the & function to build the text. Copy the text to a file in Notepad, save as L5X. Import the L5X.

I'd do one or two lines like that and test it...

Tag Builder Test.xlsx

IOM Builder Rev 2.xls

1 person likes this

Share this post


Link to post
Share on other sites

Thanks for the replies.

First, I am more of a DCS guy than a PLC guy, so I may be not using quite the right terms possibly. Lately I'm constantly getting requested to build interfaces between the DCS and PLCs. And because Honeywell can make really amazing decisions (/s) on how they approach things, I'm being forced to build a lot of my interfaces using UDTs. Which is a nightmare for a whole slew of reasons, but sometimes you just have to do what the client wants.

I don't feel like I'm explaining myself well here, so maybe some screenshots would help.

In the Rockwell Help files, it seems to say you can copy and paste from excel into the Data Type Editor. But no matter what I do, it tries to put everything I'm trying to paste into the first 'cell' of the data type editor table. And I can't seem to find any further detail as to how to do this properly or what exactly it is I am doing wrong. Or am I just completely misunderstanding what the help file says and you cannot copy a table of data and paste into the data type editor?

RockwellDataTypeEditorCopyPasteInstr.png

1 person likes this

Share this post


Link to post
Share on other sites

I see. You're using Logic Designer. I don't think that existed when I started writing CLX programs. If it did I wasn't aware of it and I rolled my own way of dealing with it. My UDT's are specific to Oil transportation and Gas processing. I use the attached for anything driven by an electric motor. I typed it out by hand. From what you just posted it looks like what you want to do should work but I don't have any experience with the Data Type Editor

Motor.L5X

1 person likes this

Share this post


Link to post
Share on other sites

Aye. Yeah, being forced to use UDTs for these interfaces is a pain. Because they can get pretty big and are a pain to modify later. I'm hoping I can figure out how to paste properly into this editor, because right now I can layout the whole interface in excel and I can copy and paste all of that data into the Honeywell side no problem. But then I have to either type out or copy paste individual cells to build the UDT on the Rockwell side. I guess I can work on building a little program to read the data from the cells in excel and format it into an XML file and just import it as as L5X, if I can't figure out why I can't paste into the editor. Maybe I just need to call Rockwell and ask them.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now