Author Topic: Reading and Writing a STRING_30 Data Type with CLX  (Read 3473 times)

gustavson

  • Newbie
  • *
  • Posts: 2
    • View Profile
Reading and Writing a STRING_30 Data Type with CLX
« on: July 06, 2014, 06:49:39 PM »
Hello,

First of all ,thank you for providing such a great tool!

After testing reading and writing options to a ControlLogix PLC using the EthernetIPforCLXCom1 driver, I came to an issue. I can't read or write to a STRING_30 data type tag. It's an Overflow Exception that is triggered and I wonder if my call is wrong, or perhaps it is not possible to read/write to these data types as yet.

What I'm doing is simply trying to read a tag like this:

EthernetIPforCLXCom1.Read("z_Test_String_30")

and for writing:

EthernetIPforCLXCom1.Write("z_Test_String_30", "test")

I've also tried reading this tag as an array, like this:
EthernetIPforCLXCom1.Read("z_Test_String_30", 5), but still without any luck, I still get an Overflow Exception triggered in DLL(MyDLLInstance).ReadTagValue(PLCAddressByTNS(Sequencenumbershort), numberOfElements, CUShort(SequenceNumber))

Could anyone help me clarifying this please? Thanks.

Cheers,
Alex
« Last Edit: July 06, 2014, 07:10:01 PM by gustavson »

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Reading and Writing a STRING_30 Data Type with CLX
« Reply #1 on: July 06, 2014, 10:47:02 PM »
The ControlLogix driver can only work with the default string length, which I think is 88 characters.

gustavson

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Reading and Writing a STRING_30 Data Type with CLX
« Reply #2 on: July 07, 2014, 05:17:15 PM »
Thanks Archie. Got it working using the default string type and it's all good.