RobotStudio event

Frequency of socket reading

Options
HI,

I'm a starter in RAPID programming and I'm currently doing a project using model IRB120 in Robotstudio. It's about reading message sent from Visual Studio through socket. My sending frequency is set to 1 KHZ and I don't know anything about socket read frequency in Robotstudio. I use command "SocketReceive client,\Str:=str_data_px1\ReadNoOfBytes:=7;" in a while loop in my program. Any help is appreciated, thanks!

Answers

  • scottdf93
    Options
    Set the controller to be a server and use socket listen and socket accept functions in a semi static task. That way the task sits and waits for a incoming connection (define a time out if you wish) and the frequency is less of an issue.

    This will also stop the controller constantly erroring socket connections or unreceived messages.