
Brad (Customer) asked a question.
String array data transfer between P2-550s on same network
I have 2 P2-550s on the same ethernet network. 1 of them has string data as a 1D array that I would like to transfer to the other P2-550. I am having trouble getting either the Network Read/Write or the Modbus Read/Write to work with string data in an array. The instruction will not tag pick the string array. If I set those instructions up with a test numerical array, it seems to set up fine. Is there some limitation about sending string data as an array using these commands? I can map the tag names as string, and 1 will transfer with 1 command. I do successfully transfer non-string data between them currently.
How large are the strings? How many strings per WX? RX?
The arrays are 30 columns. The strings are 20-30 characters per column. I'd like to transfer all 30 strings with a single command. I just don't want to have to write 90 individual single string commands, as I have 3 arrays, 30 columns each, with a total of 90 fields to transfer.
If I could use a variable index, I could write some type of loop to execute, but instructions will not allow that with string data.
Have you tried the ProNet Instruction yet? This is similar to AB Produced/Consumed tags.
you could send a large array of bytes then extract the string from the bytes with an offset for the new string
In general, you can only transfer a maximum of 256 bytes of data at one time using Modbus.
Regards,
Garry
https://accautomation.ca/series/productivity-1000-plc/
I haven't tested it yet but with a for loop, copy charters, copy array, and a math instruction for offset you should be able to get your string array to an unsigned 8 bit int array using indirect addressing in the for loop. The other PLC should be able to reverse it back to a string array with a similar for loop. If I get time tomorrow i can see if i can write up a few programs and test it on a few productivity 1000s I have laying around if you would like