Cobots & Robotic Arm
As Socket Slave Communication Tutorial
4/4/26
Upload Date:
Duration:
PT05M12S
Video Transcript
0:03
This video shows communication protocols
0:05
for FR robots acting as socket slave
0:08
stations. Enter the programming
0:10
interface, then write the robot socket
0:12
server program.
0:15
When the FR robot communicates with an
0:17
external master station as a slave
0:20
station, we primarily use five commands.
0:24
Socket serverless listen on the client
0:27
port.
0:31
Socket serveraxed read the client's ID.
0:37
Socket server close the connection.
0:39
Socket server reads the string sent by
0:42
the client
0:44
and socket server and drinks send a
0:46
string to the client.
0:49
Let's examine these instructions one by
0:51
one. The socket server list and function
0:54
requires the client port number as a
0:56
parameter.
0:58
We set the port number to 9,100.
1:04
Create the TC PSB variable to receive
1:07
the client channel identifier.
1:11
Receive client connections in a loop.
1:19
A return value of zero from socket
1:21
server X indicates a connection failure.
1:26
A socket identifier is returned upon
1:28
successful connection with a maximum of
1:31
supported socket_0 to socket_3.
1:36
After the connection is established,
1:38
read the message sent by the client.
1:40
Socket subverates requires two the
1:43
client identifier and the timeout
1:45
period. The timeout unit is in seconds.
1:47
Zero indicates blocking.
1:52
Get character length.
2:02
Print data.
2:18
Evaluate the received information.
2:33
Evaluate the received information.
2:47
The socket subvers function requires
2:49
three parameters to be passed.
2:53
The string to be sent, the client
2:55
identifier and whether to block. Zero
2:58
indicates blocking. One indicates nonb
3:01
blocking.
3:05
Refine the program logic.
3:32
The socket server function requires the
3:34
client identifier as a parameter.
3:52
Restore the variable's value.
4:00
After writing the program, click save.
4:14
Open the network debugging assistant and
4:16
select client mode.
4:18
Select robot IP address.
4:21
Connect to porting.
4:33
View communication status via the
4:35
network debugging assistant.
4:41
Network debugging assistant sends DO1
4:44
on. Observe that DO1 status is open and
4:48
note that the return value is on
4:50
success. Network debugging assistant
4:52
sends DO1 off. Observe that DO1 status
4:56
is closed and note that the return value
4:59
is off success. If all the data is sent,
5:02
the response will be unknown.
5:05
That concludes our tutorial on socket
5:07
server communication. Thank you for
5:09
watching.