How to put a message in the robot and show the value of any register in that message? Fanuc Robot.
-
atbr88 -
February 21, 2020 at 6:17 PM -
Thread is Unresolved
-
-
atbr88
February 21, 2020 at 6:18 PM Changed the title of the thread from “How to put a message in the robot and show the value of any register in that message?” to “How to put a message in the robot and show the value of any register in that message? Fanuc Robot.”. -
You will need to give us a lot more information if you want help. What message, where's it coming from, where do you want the message displayed? How are you sending this message... carrier pigeon?
-
Hi, I think I have the same problem, when I insert a "Message[]", I want to read a value from any Register, but if I write "Message[R[1]]" (imagine R[1]=2), the screen will show R[1], instead of "2"
-
The "MESSAGE[]"-instruction will only display the characters as text.
You're looking for something like the "Status Menu" from the Menu Utility-option.
With it, you can define your own status messages together with R[]-values and much more.I think it's a free option. Have a look in the Handling Tool manual for more info about it.
-
This simple "PRINT_R.kl" script will allow you to print your R value on USER screen from TP program.
Code
Display MorePROGRAM PRINT_R %COMMENT = 'val R[AR[1]]]' -- print the R[i] value in the scientific notation VAR register_index, int_value : INTEGER Dummy_Rel, real_value, reg_value : REAL Dummy_Str : STRING[10] index_str : STRING[3] STATUS : INTEGER entry : INTEGER real_flag : BOOLEAN BEGIN GET_TPE_PRM(1, 1, register_index, Dummy_Rel, Dummy_Str, STATUS) GET_REG(register_index, real_flag, int_value, real_value, STATUS) IF (real_flag) THEN reg_value = real_value ELSE reg_value = int_value ENDIF CNV_INT_STR(register_index, 1, 10, index_str) WRITE('R[', index_str, '] =', reg_value, CR) END PRINT_R