Import/Export Tag Values in RSLogix 5000

dabestbank

Member
Join Date
Apr 2010
Location
New Orleans
Posts
2
Is there anyway I can use a spreadsheet to update tag values and Import them into RSLogix 5000? I.E. if i were to create a tag with the predefined Alarm data type then export that tag to excel. Then update the values for say HHLimit, HLimit, ect in excel and then import them back into RSLogix 5000.
 
Look in the knowledge base for the tag upload/download utility and you can selectively choose the tags to upload. Then go in the text file it creates and set the value you want. Then re-download to the CLX.

I have edited tag data-types and names by export/import from RSLogix but do not remember being able to set default values from that export/import.
 
Absolutely. I do this a lot with DDE and VB within Excel as Jason suggested. RSLinx has some help information on it. if you end up going the Excel/DDE route, let me know and I can help.
 
Thanks for you help everybody. I'm new to programming and this is my first complete program I'm writing. Everything before has been modifying existing code. I will bring this back to my boss and see if this is what he wants.
 
If you are still available, I have to do exactly this task, and would really appreciate help. I have to import 3000 tag values from Excel into an array(0:2999) in RsLogix. I have experience with VB and a little experience with DDE, but not used together with RsLinx/RsLogix.
 
ok.

I would like to import some widget counts from a 5000 processor.
I remember at one time I could do this in excel 20xx with a plc 5/80e. the option was built in to excel. I had this worksheet residing on a network drive so anyone could access it and it would automatically update the cells from the PLC data tables.

I want to do the same but Im not smart enough to figure that out.
I know I can do it on the PC thats running linx with a dde topic, but I am looking for a little input on how I can put the worksheet on the network drive and be accessable to everyone and still populate the cells with the processors tags data.

Of coarse I dont want that laptop to have to be powered up or be involved. do I need to set up a server? any input would be greatly appreciated.
 
I have looked around and found this as the best place to ask the question. I have an excel spreadsheet that is getting information from a control Logix. The values that are coming in need to be divided by 10 so they display on the spreadsheet properly. Example, the temp in the PLC register is 1045, it is displayed on the HMI as 104.5
When I import the value into excel it is 1045
Is there a way in my VB code to do the division then place it in the cell? I realize I could add a bunch of code in the PLC to do the math but was hoping for this solution instead.
Here is my code. I need to divide the values that will be displayed in the spreadsheet for cells 4,11 : 4:16
Private Sub Workbook_Open()
'Data collection for L01PL2
'This excel file opens from Windows Task Manager every 15 minutes
'and runs this macro for data collection
'then saves the file with the name "Melts Data Collection"
'then closes the file automatically
'Written By: Steve Hannahs 01/10/2017


CurrentTime = Format(Now(), "mm/dd/yyyy - hh:mm")

Cells(4, 1).Select
ActiveCell.EntireRow.Insert
Cells(4, 1).Value = CurrentTime

RSIChan = DDEInitiate("RSLinx", "L01PL2")

Cells(4, 2).Value = DDERequest(RSIChan, "TotePress.PressServoPosition")
Cells(4, 3).Value = DDERequest(RSIChan, "TotePress.VFDMedSpeedSetpoint")
Cells(4, 4).Value = DDERequest(RSIChan, "TP2.ON")
Cells(4, 5).Value = DDERequest(RSIChan, "Pump6_Output_Display")
Cells(4, 6).Value = DDERequest(RSIChan, "BufferTamkTemp")
Cells(4, 7).Value = DDERequest(RSIChan, "BT1.LVL_MV")
Cells(4, 8).Value = DDERequest(RSIChan, "MMI.P1_LMP")
Cells(4, 9).Value = DDERequest(RSIChan, "CURRENT.P1_SPD_SP")
Cells(4, 10).Value = DDERequest(RSIChan, "MMI.P1_CAP_MV")
Cells(4, 11).Value = DDERequest(RSIChan, "P1.CONT_VAL")
Cells(4, 12).Value = DDERequest(RSIChan, "MMI.MH_TMPIN_MV")
Cells(4, 13).Value = DDERequest(RSIChan, "Rm105RH.Value")
Cells(4, 14).Value = DDERequest(RSIChan, "MAU1N7[1]")
Cells(4, 15).Value = DDERequest(RSIChan, "MAU1N7[2]")
Cells(4, 16).Value = DDERequest(RSIChan, "MAU1N7[3]")
Cells(4, 17).Value = DDERequest(RSIChan, "HX3.OutletTT[1].Value")
Cells(4, 18).Value = DDERequest(RSIChan, "HX3.InletTT[1].Value")
Cells(4, 19).Value = DDERequest(RSIChan, "T1.Mode[1].0")
Cells(4, 20).Value = DDERequest(RSIChan, "T1.Mode[1].1")
Cells(4, 21).Value = DDERequest(RSIChan, "T1.Mode[1].2")
Cells(4, 22).Value = DDERequest(RSIChan, "T1.Mode[1].3")
Cells(4, 23).Value = DDERequest(RSIChan, "T1.Mode[1].4")
Cells(4, 24).Value = DDERequest(RSIChan, "LSC3.Pressure")

DDETerminate (RSIChan)



Application.DisplayAlerts = False
Sheets("Coll").Copy
ActiveWorkbook.SaveAs Filename:="F:\Puree Melts\Melts Data Collection", FileFormat:=51
ActiveWorkbook.Close
ActiveWorkbook.Save
Application.Quit
End Sub
 
I have already tried the following with no success:
Cells(4, 11).Value = DDERequest(RSIChan, "P1.CONT_VAL") / 10
Cells(4, 11).Value = DDERequest(RSIChan, "P1.CONT_VAL" / 10)
 
I love a good macro.

Make a macro:
'open dde channel
channelNumber = Application.DDEInitiate(app:="RSLINX", topic:="YOURTOPIC")

'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)
'Debug.Print channelNumber, txtAddress.Value, txtAddress.Offset(0, 1), Application.DDEAppReturnCode

Next txtAddress

'close channel
Application.DDETerminate channelNumber

Place tags in column then value in next column. Highlight the tags you want to send and call the macro. That's it.
 
Last edited:
Oh and here is the read I use:
'open dde channel
channelNumber = Application.DDEInitiate(app:="RSLINX", topic:="YOURTOPIC")

'Scan through the selected addresses and load into an array
For Each txtAddress In Selection
'get PLC values:
returnlist = Application.DDERequest(channelNumber, txtAddress.Value)


'Put the integer value in the next column
txtAddress.Offset(0, 1) = Val(returnlist(1))
'txtAddress.Offset(0, 1) = returnlist(1)

Next txtAddress

'close channel
Application.DDETerminate channelNumber

Works same way as write, select tag names and call macro, puts values in next column.
 
Pardon my necroposting...

Fast forward to 2020, DDE is not supported any more in Windows 10. Is there no way to populate tag data without having to buy a RSLinx Classic license and using the OPC DA route? I don't want carpal tunnel...

A simple utility or just the ability to copy and paste multiple fields from Excel would suffice.
 

Similar Topics

Hello everybody I work for an organization that treats wastewater. We are in the process of migrating 200 pumping stations to another...
Replies
0
Views
833
We just change an app from local to distributed and the tag import wizard seems to omit distributed apps. I tried looking in the help files and...
Replies
1
Views
2,224
I'm new to the Proface HMI (but have extensive experience with others such as Intouch). I have to do modifications to an existing application on...
Replies
0
Views
2,696
Hello friends, I am having a little issue figuring out how to export one controller tag .its named 'ASCIIcharacters" Its a string datatype with...
Replies
2
Views
1,787
Hey friends !! I am using Movicon 11.3 SCADA and facing difficulty with the import & export of tags. When I export tags in a CSV format, the...
Replies
0
Views
2,510
Back
Top Bottom