import/export tags & values

Join Date
May 2011
Location
South Carolina
Posts
87
Good afternoon everyone.

I have created a tag array made from a UDT that stores numerous data points and values for all of the tools in a specific work area in my facility. This data will be used in 13 separate PLCs for very similar machines. NOTE: All PLCs are 1769-L30ER. I don't want to have to hand enter this data in each PLC and was wondering if there was a way to export it from one PLC and import it into another and still maintain the tag values in the array.

As an example:
Tool_Data.Tool[1].Tool_Name Value=Press Tool 123
Tool_Data.Tool[1].Cycle_Time Value=25
Tool_Data.Tool[1].Part_Number Value=A160987

Tool_Data.Tool[2].Tool_Name Value=Press Tool 234
Tool_Data.Tool[2].Cycle_Time Value=35
Tool_Data.Tool[2].Part_Number Value=A154897

all the way through Tool_Data.Tool[99].*****

How do you export that and then import it to another PLC with the values included?

Thanks in advance and have a great weekend.
 
Here is a macro I use.
You place the tagname in one column and the value you want in the next column. Then select all the tagnames you want to send and call the macro. You have to replace PLCTopic with your PLCs topic in RSLinx. Enjoy.



Public Sub WriteWords()
Application.EnableEvents = False
'open dde channel
channelNumber = Application.DDEInitiate(app:="RSLINX", topic:="PLCTopic")
'Scan through the selected addresses and load into an array
For Each txtAddress In Selection
'Send values to PLC:
DDEPoke channelNumber, txtAddress.Value, txtAddress.Offset(0, 1)
Next txtAddress

'close channel
Application.DDETerminate channelNumber
Application.EnableEvents = True

End Sub
 
There's a couple of ways.

(1) If you don't mind downloading to the PLCs, then create the UDT and it's data-populated instance tag in one PLC. Have 2 instances of Studio running, one with the "good" file open, one that needs the new tag. Copy that tag and paste it into the OFFLINE file of the next PLC. The data structure and the data will go with the paste. Then download to your PLCs.

(2) To avoid downloading, create the UDT and populate the data in the 1st PLC. Create a new routine with a single instruction: COP( Tool_Data, Tool_Data, 1); i.e., copy it to itself.

Right click on the Routine, select Export Routine and give it a file name.

Go online with the next PLC. File > Import Component > Routine and select the file name. The import will create the new UDT and the instance of the tag, with all the populated data. The issue with this method is that this will only work once online. Import will fail if the UDT or tag already exist. So you need to be sure you're right the first time, or do it offline and download.

(3) You could also just export the UDT definition and import / drag&drop that into your other projects. Then use MSG instructions to send the data from one PLC to the next. The problem is that there is a data limit to an MSG packet, so you'd have to send the data in chunks.

The advantage of doing it this way is that, if down the line there is a change, you have a mechanism for pushing that change from one PLC to all the others.

(4) If you've got RSLinx with ODBC privileges (i.e., not "Activation: Lite"), then Excel is your friend, and VBA macros can read/write from a spreadsheet (which is much easier to read than a UDT) and push it down to each of your PLCs.

That's off the top of my head. There might be other ways, too
 
Last edited:
Use* the tag in a rung somewhere. Then export that rung. When you import the rung in another PLC it will bring the tag and all values with it.

*Doesn't actually have to do anything, for example you can have it as part of a rung that functionally does nothing (for example COP Tool_Data Tool_Data) or an unconditionally false rung.
 
Have you tried copy and paste? After dragging the data type over?


Worked for me with Studio 5000 v33. Highlighted tag in the controller tags' edit view, Ctrl-C, the pasted into highlighted empty row on the target file's controller tags.
 

Similar Topics

hi,, i m new at AB. i want to add new tags in my running machine. and show it on factory talk. actually m not sure, do i need to just add new tags...
Replies
2
Views
1,667
Hi all! I am a new user of Siemens S7. How to export DB and Symbol table from step 7 and import to WinCC Explorer? I have one STEP 7 project...
Replies
3
Views
7,722
HI, can anyone help me with Importing tags from Rslogix 5000 to Citect SCADA... i am using Citect SCADA v.6 and RSlogix 5k... i am exporting...
Replies
1
Views
6,099
Something simple and stupid I'm sure.. I'm trying to export my tags from an existing project, so I can modify to my new needs. All help files...
Replies
5
Views
7,684
Hi All, Does someone know how to export tags in RSLogix 5000 modify their names and import again without losing references in the logic? In...
Replies
8
Views
64,982
Back
Top Bottom