RSLogix 5000 Copy Partial Strings

Bolatov

Member
Join Date
Jun 2010
Location
Mty
Posts
87
Hello guys Im having one trouble when copying partial strings

I use an index variable but im loosing the first 4 charaters of the string


COP
String_Check.DATA[Variable]
Information
1

Here is the string content:

String_Check
02310061 1 010000020003 04 050006005070000080000091101111120013001300190014001600150015021600015170999918000001902888202014-11-14:11:01:43212014-03-04:08:15:13222230000379921$


Information
0061 1 010000020003 04 050006005070000080000091101111120013001300190014001600150015021600015170999918000001902888202014-11-14:11:01:43212014-03

I tried to copy also like this but it doesn't works

COP
String_Check.DATA[Variable]
Information.DATA[0]
1

I have made it work with:
COP
String_Check.DATA[Variable-4]
Information
1
but if the variable equals zero the plc is faulted

thanks a lot for your help :)
 
Try the MID instruction. It is built for the purpose. I believe the string length is stored at the beginning of the data representing the string (that is how it works in older A/B controllers) Then each character only takes one byte, so that may explain why four bytes (one DINT) seem to disappear since they may be used in a likewise fashion to track string length.
 
thanks for the fast response, let me give you more details

actually Im receiving a data string from an equipment
this string has some values that I need, but they are not always in the same position, so I had to do a search to find the index of the string where these values are, but when I copy them to another string I loosing that information

I cant use MID because the position has variation
 

Similar Topics

Hello, What is the Problem: I have an old version of projects with all the tags' descriptions and a new one without them. I know how to...
Replies
6
Views
3,178
Hi I have offline project and I want to copy a tag (the name and the vaule) to a online project is it posiable ?
Replies
2
Views
1,463
Anyone have a direct link or a copy of this old software? I have valid licenses for it on this PC but when I try and download it from rockwell it...
Replies
8
Views
2,527
This is a real simple interface problem. Typically when I'm developing in ladder I will Ctrl+C an instruction and Ctrl+V, the new instruction will...
Replies
2
Views
1,691
Hello. I am using RSLogix 5000 v24.00 I have two instances open and running, with two different programs. In one of my programs I have a large...
Replies
2
Views
6,210
Back
Top Bottom