RobotStudio event

String to number conversion and checking the reachability in RAPID

Hello,

I need some help with the following problems:

1) Is it possible to somehow convert a string (in my case received through a socket) to the equivalent data but in a number type in RAPID? I have tried with StrToByte but the problem is that I'm significantly limited by the range of the byte type (0 - 255 without negative values). What I need is to send by the socket the position of the robotic arm and, as you know, the position of the effector can quite a bit exceed the limit (255). I thought about multiplying the values but in this case I would lose a possibility of reaching intermediate points. And still, what about negative values?

2) How can I check a reachability of a specified point by a RAPID code? Generally, my program crashes now when the coordinates of the demanded point are exceeding the robot's workspace limit.

Best Answers

Answers

  • Hello, 
    i have the same problem , i have this variable 
    VAR string Fx_S1:=0.784184821186377; 
    i have imported from C# addin , and when i use the command 
    VAR strtoval Fx_S1; 
    it gives me the following error :
     IRB4400_60kg_1.96m_245/RAPID/T_ROB1/MainModule(3,2): Name error(49): Variable name x_S1 ambiguous. 10/14/2013 8:40:28 PM General
    Checked: IRB4400_60kg_1.96m_245/RAPID/T_ROB1: 1 semantic errors. 10/14/2013 8:40:28 PM RAPID
    any help is really appreciated