Comparing Strings

OK, you're well into the era of proper string literals, thats not your issue.
A 1769-L33ER will not support string literals no matter how high you flash the firmware, you need a 5380, 5480, or 5580 controller.

Mind, the whole issue of string literals is tangential to the topic at best — not only do the posted images show no signs of using literals but there'd be errors when verifying if you tried to use them on unsupported hardware/firmware.
 
Why is everyone ignoring @drbitboy's suggestion....honestly it looks like a strong possibility for the issue. OP didn't supply the code that copies the string in from the robot, but I think it's likely it's not being copied into the String correctly and the LEN and final DATA are all wrong.
 
Why is everyone ignoring @drbitboy's suggestion
Look at item (viii) in my .signature ;).

....honestly it looks like a strong possibility for the issue. OP didn't supply the code that copies the string in from the robot, but I think it's likely it's not being copied into the String correctly and the LEN and final DATA are all wrong.
"Strong possibility?... it's likely?"

With that evidence?

Lord help us, @Vadoola appears to be yet another engineer compulsively qualifying the obvious. That is not a criticism; I fully agree with the sentiment; in fact, we may be twins separated at birth :ROFLMAO:.
 
"Strong possibility?... it's likely?"

With that evidence?

Lord help us, @Vadoola appears to be yet another engineer compulsively qualifying the obvious. That is not a criticism; I fully agree with the sentiment; in fact, we may be twins separated at birth :ROFLMAO:.

I feel like that's just par for the course with being an Engineer. Especially when you are an engineer that has to explain themselves to those without the knowledge/experience frequently. I am probably a bit more habitual about it than some.

And who knows, I was born in the NE US, so...maybe?
 
I feel like that's just par for the course with being an Engineer. Especially when you are an engineer that has to explain themselves to those without the knowledge/experience frequently. I am probably a bit more habitual about it than some.

And who knows, I was born in the NE US, so...maybe?
Here is how I got the string from the robot.

Forum 1 has a test bit that I toggle to let the msg block execute, the alarm scan.dn is set to scan alarms every 1.5 seconds.

Forum 2 shows what is inside my message block. Getting a single attribute, looking for the first alarn that would show on the teach pendant, and sotring what it reads inside the destination element.

Forum 3 shows the destination elements data, such as the string, length and data.

Currently I do not have the logic that copies the string into the holder, all I did was copy the entire string and pasted it into the holder myself, and changed the length to match the fault string length.

sorry for not being more clear as to how I got this information. and you hit the nail on the head with me being not very knowledgeable about this topic. xD
 

Attachments

  • forum 2.png
    forum 2.png
    27.6 KB · Views: 7
  • forum 3.png
    forum 3.png
    6.1 KB · Views: 7
  • forum1.png
    forum1.png
    6.1 KB · Views: 7
Actually, it looks like (see here*) all of the alarm strings start with SYST-nnn or SRVO-nnn**, unique to each message, so
  • the CIP Generic/Get AttributeSingle MSG could use a Destination of Lyons_Robot_3.First.Data[0],
  • a MOVe instruction could write a value of 8 to Lyons_Robot_3.First.LEN, and
  • then only those first 8 characters need be compared against the first 8 characters of each of the list of possible messages.
* Caveat: that link will download a large PDF file
** which further(;)) validates the re-interpretation of the unrealistic .LENgth (1331057235) of that string
 
Are you still trying to solve this?


What happens if you change the Destination Element in that Message Configuration menu to Lyons_Robot_3.First.DATA (or perhaps .DATA[0])?

It looks to me like you could simply MOVe the value 80 to Lyons_Robot_3.First.LEN, since there are 80 characters in the Attribute (0x08)

After changing the destination element to Lyons_Robot_3.First_Fault.DATA it changed to 'SRVO-004 Fence Open'. After seeing this, I then copied it and pasted it into the holder value. After compying the string the length changed to 82, so I then changed the length of the First_Fault to 82 as well. The alarm is NOW ACTIVE through the EQU block!!!
 

Attachments

  • image (4).png
    image (4).png
    10.4 KB · Views: 3
  • image (3).png
    image (3).png
    6.4 KB · Views: 3
After changing the destination element to Lyons_Robot_3.First_Fault.DATA it changed to 'SRVO-004 Fence Open'. After seeing this, I then copied it and pasted it into the holder value. After compying the string the length changed to 82, so I then changed the length of the First_Fault to 82 as well. The alarm is NOW ACTIVE through the EQU block!!!
I tried putting it into DATA[0] but ended faulting out the MSG block. Each Data[0],[1] holds a character of the string. [0] = ' [1] = S [2] = R ... but having it go to just DATA worked!!
 

Similar Topics

Hi, I will be scanning in a barcode. Here I will compare the scanned string against a table (DB) of known barcodes. Has anyone used FC10...
2
Replies
5,534
Views
can anyone tell me how to compare strings that store in DBs?thanks
6
Replies
3,576
Views
Hello all. I am having trouble finding a way (if one exists) to compare/evaluate a string tag. I have looked at the instruction help with what I...
9
Replies
795
Views
I have had an issue a couple of times where data updates or logging that should have been done once at the beginning of a new month or a new year...
5
Replies
877
Views
Hello! I want to compare three integers to see id they are the same number. How is this accomplished the best. I want like a three legged CMP ==...
10
Replies
1,254
Views
Top