# String limit

**URL:** <https://tech-community.robotics.abb.com/t/string-limit/8440>\
**Category:** RobotStudio\
**Created:** [August 31, 2018, 7:45am UTC](https://tech-community.robotics.abb.com/t/string-limit/8440 "2018-08-31T07:45:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vale](https://avatars.discourse-cdn.com/v4/letter/v/9de053/32.png) [@Vale](https://tech-community.robotics.abb.com/u/Vale)\
**Post date:** [August 31, 2018, 7:45am UTC](https://tech-community.robotics.abb.com/t/string-limit/8440/1 "2018-08-31T07:45:06Z")

</div>

Hello everybody!  
I need to define a certain number of strings so that, whenever an error happens, the message contained inside the string can be displayed on the teach pendand.  
The problem is that if I try to uncomment the bond lines, RS tells me that there are 12 sintax errors. Anybody can tell me why? Is there a limit for the number of strings that can be declared?

Thank you very much 🙂

Attached the code:

PROC select\_language()  
TPReadFK reg1,“Please select the desired language:”,stEmpty,stEmpty,stEmpty,“English”,“Turkish”; !select language  
IF reg1 = 4 THEN  
error\_code1 := “This code does not correpond to any rivet1 type!”;  
error\_code2 := “This code does not correpond to any rivet2 type!”;  
vacuum\_error1 := “Vacuum has not been correctly generated on gripper 1!”;  
vacuum\_error2 := “Vacuum has not been correctly generated on gripper 2!”;  
place\_error1 := “Rivet 1 still attached to gripper 1!”;  
place\_error2 := “Rivet 2 still attached to gripper 2!”;  
rivet1\_uncorrect := “Rivet 1 code has not been received correctly!”;  
rivet2\_uncorrect := “Rivet 2 code has not been received correctly!”;  
ELSEIF reg1 = 5 THEN  
error\_code1 := “Bu kod herhangi bir perçin 1 tipine karsilik gelmez!”;  
error\_code2 := “Bu kod herhangi bir perçin 2 tipine karsilik gelmez!”;  
vacuum\_error1 := “Vakum, tutucu 1 üzerinde dogru sekilde olusturulmadi!”;  
vacuum\_error2 := “Vakum, tutucu 2 üzerinde dogru sekilde olusturulmadi!”;  
place\_error1 := “Perçin 1 hala tutucuya takili 1!”;  
place\_error2 := “Perçin 1 hala tutucuya takili 2!”;  
! rivet1\_uncorrect := “Perçin 1 kodu dogru sekilde alinmadi!”;  
! rivet2\_uncorrect := “Perçin 2 kodu dogru sekilde alinmadi!”;  
ENDIF

---

<div class="post-metadata">

**Author:** ![lemster68](https://dub1.discourse-cdn.com/flex005/user_avatar/tech-community.robotics.abb.com/lemster68/32/1945_2.png) [@lemster68](https://tech-community.robotics.abb.com/u/lemster68)\
**Post date:** [August 31, 2018, 4:54pm UTC](https://tech-community.robotics.abb.com/t/string-limit/8440/2 "2018-08-31T16:54:11Z")

</div>

I just tried this in RS, no errors:

MODULE TEST1  
VAR string error\_code1;  
VAR string error\_code2;  
VAR string vacuum\_error1;  
VAR string vacuum\_error2;  
VAR string place\_error1;  
VAR string place\_error2;  
VAR string rivet1\_uncorrect;  
VAR string rivet2\_uncorrect;

PROC select\_language()  
TPReadFK reg1,“Please select the desired language:”,stEmpty,stEmpty,stEmpty,“English”,“Turkish”; !select language  
IF reg1 = 4 THEN  
error\_code1 := “This code does not correpond to any rivet1 type!”;  
error\_code2 := “This code does not correpond to any rivet2 type!”;  
vacuum\_error1 := “Vacuum has not been correctly generated on gripper 1!”;  
vacuum\_error2 := “Vacuum has not been correctly generated on gripper 2!”;  
place\_error1 := “Rivet 1 still attached to gripper 1!”;  
place\_error2 := “Rivet 2 still attached to gripper 2!”;  
rivet1\_uncorrect := “Rivet 1 code has not been received correctly!”;  
rivet2\_uncorrect := “Rivet 2 code has not been received correctly!”;  
ELSEIF reg1 = 5 THEN  
error\_code1 := “Bu kod herhangi bir perçin 1 tipine karsilik gelmez!”;  
error\_code2 := “Bu kod herhangi bir perçin 2 tipine karsilik gelmez!”;  
vacuum\_error1 := “Vakum, tutucu 1 üzerinde dogru sekilde olusturulmadi!”;  
vacuum\_error2 := “Vakum, tutucu 2 üzerinde dogru sekilde olusturulmadi!”;  
place\_error1 := “Perçin 1 hala tutucuya takili 1!”;  
place\_error2 := “Perçin 1 hala tutucuya takili 2!”;  
rivet1\_uncorrect := “Perçin 1 kodu dogru sekilde alinmadi!”;  
rivet2\_uncorrect := “Perçin 2 kodu dogru sekilde alinmadi!”;  
ENDIF  
ENDPROC  
ENDMODULE
