Author Topic: Increase Reading/Writing-speed using CLXDriver with Rcokwell ControlLogix  (Read 1305 times)

markus

  • Newbie
  • *
  • Posts: 2
    • View Profile
Hello,


I want to use the CLXDriver to read and write Tags (W/R about 200) in a cycle of 100ms with a Rockwell ControlLogix. To read the tags using the method "beginreadmultiple". To write tags I use the method "write".
Reading 200 tags is very fast (about 10ms). Writing 200 tags takes about 2 seconds. (Recorded in Wireshark).
I'm using the driver: CLXDriver, Version: 1.0.4.0

I have 2 questions:
1. beginreadmultiple: I read in the forum that the multi-read is limited by the request packet size. Without header etc. about 430 Bytes (Array of Tagnames I want to read). This works fine.
But If I get a packet from the PLC which is bigger than the packet size (partial transfer) the data in the "partial transfer" will be ignored by the driver.
Is it also only possible to get data with a size of the packet size? or is it possible to get the "partial transfer" data?

2. write: I want also to write 200 Tags in a cycle of 100ms. If I use the write method I need more then 2 seconds to write all Tags. Is there a possibility to write faster?
I've tested beginwrite but I think internal the method is also using the write-method.
Is it possible to write complex structures (mix of bytes, int and bools)? Also this will increase the write speed.

thanks
markus

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
How did you determine the data from a partial transfer is ignored?

The only way to write faster is to put the data in a array and write the array.

markus

  • Newbie
  • *
  • Posts: 2
    • View Profile
Hello Archie,

I use the method "beginreadmultiple":

string[] ReadTags = new string [] {"robot1", "robot2", "robot3", "robot4", "robot5"};  // Every tag has a size of 128 Bytes
LogixCPU.BeginReadMultiple(ReadTags);

Then I`ve got a feedback for robot1, robot2 and robot3 (Eventhandler). robot4 and robot5 is ignored.
In Wireshark I see 1 packet: robot1 - 4 = success, robot4 - 5 = partial transfer.
Is there a possibility to get the tag-data from the partial transfer?

My solution at the time is to look that the data I want to receive don't exceed the packet size:

string[] ReadTags1 = new string [] {"robot1", "robot2", "robot3"};  // Every tag has a size of 128 Bytes
string[] ReadTags1 = new string [] {"robot4", "robot5"};  // Every tag has a size of 128 Bytes

LogixCPU.BeginReadMultiple(ReadTags1);
LogixCPU.BeginReadMultiple(ReadTags2);

thanks

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
I checked the driver and it does not handle the partial packet on a multi-service request, so it is up to you to break up the requests the way you did it.

Another option is to use an array of strings and read all of the array elements which the driver will properly re-assemble the partial packets.