Tango7
Member
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.
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.