Reading an array element from RSLogix 5000

Tango7

Member
Join Date
Nov 2008
Location
Gainesville, GA
Posts
12
I am a novice at using Excel to mine data from my PLC. It took me several hours to determine how to access an array in my PLC from Excel, so I thought that I would post the answer that I found so that others could find the answer more readily.

The following is an example of the code I used to read in an element of the RSLogix array...

In the PLC, I am looking at a UDT in the form of
gCarr[x].Id

In Excel, I used this line to read the element
TempCarrId=DDERequest(RSIchan, "gCarr" & "[" Index & "]" & ".Id")

where Index is an integer that I control elsewhere in the macro.

I hope this helps somebody.
 

Similar Topics

After learning here how to create arrays in RSLogix5000 ver 20.04, I have added some monitoring for a HMI to show 1 of 3 conditions for a bank of...
Replies
2
Views
2,047
Hi: I am trying to read an array of 100 elements from ControlLogix to FTView SE, using VBA. I need to asign all the elements to another array tag...
Replies
6
Views
2,596
I have a tag called 'MBTCP.DATA.ReadData' INT[600] of which I would like to pull 16 sequential values into an add-on instruction. I will need...
Replies
6
Views
2,520
hi everyone i have siemens cpu 1214 FW 4.1. i want to use fieldRead for reading 50 USint array variables. if i use 2Hz to enable fieldRead this is...
Replies
1
Views
1,574
Looking for the easiest way to read an array of values from a controllogix processor into a PC. This 200 element array contains the instantaneous...
Replies
0
Views
1,659
Back
Top Bottom