AnsweredAssumed Answered

How to retrieve string array from an Allen-Bradley ControlLogix via OPC server RSLinx?

Question asked by guilbertr on Jun 22, 2015
Latest reply on Oct 1, 2015 by aguzu

"STRING" in Allen-Bradley ControlLogix are a datatype (DINT, Array of SINT[82]).  DINT contains the length and table SINT contains up to 82 characters.  Need to create an array of STRING (array of bytes or SINT in Allen-Bradley) readable by OPC Interface plug-in Circular Buffer that will contains "TimeStamp" with sub-milliseconds in characters that will be associated to value store in another table.  When using an OPC Client tool on the acquisition node, I'm able to read the first element (Index = 0) in the array (VT_ARRAY | VT_BSTR) with RSLinx acting as OPC server but I'm not able to read (Index = 1, 2, 3, etc.).  With Index = 1, I receive string starting for character 2.  With Index = 2, I receive string starting for character 3.  With RSLinx Classic Gateway, I must declare some additionnal optional keyswitch after the ItemID to see inside OPC Client tool the VT_ARRAY | VT_BSTR.  Keyswitchs use after ItemID was ,R10,SC23.  First STRING (Index = 0) was read correctly but Index = 1 and more are not.

 

TimeStamp_Table[0] = "2015-06-21 17:54:23.128"

TimeStamp_Table[1] = "015-06-21 17:54:23.1282" (Sring return is one byte offset from previous).

TimeStamp_Table[2] = "15-06-21 17:54:23.12820" (String return is two bytes offset from element table "0").

etc.

 

Float_Value_Table[0] : Value retrieve from this table will be archive with "TimeStamp" provided inside "TimeStamp_Table[0]"

Float_Value_Table[1] : Value retrieve from this table will be archive with "TimeStamp" provided inside "TimeStamp_Table[1]"

Float_Value_Table[2] : Value retrieve from this table will be archive with "TimeStamp" provided inside "TimeStamp_Table[2]"

etc.

Outcomes