Home› Programming
Discussion
Back to discussions page
Prasanna
Posts: 56 Apprentice
Error in Socket receive Programming |
42 views
|
Answered | |
/ Most recent by matthewd92
in Programming
|
1 comment |

in Programming
Dear @matthewd92,
using the socket, I continuously send and receive the commands from gripper (schunk-wsg model).
Error is (Hope) UR (3e series) buffering the messages.
Example,
socket_send(a)------------> from UR
wait(0.2)
socket_receive(a ack)<----------to UR
socket_send(b)
wait(0.2)
socket_receive(b ack)
socket_send(c)
wait(0.2)
socket_receive(c ack)
but Instead sometimes
socket_send(a)------------> from UR
wait(0.2)
socket_receive(a ack)<----------to UR
socket_send(b)
wait(0.2)
socket_receive() "Receive Nothing"
socket_send(c)
wait(0.2)
socket_receive(b ack)
1. is there any way to wait for receive command.
2. is there any way to check receive command
3. is there any way to clear the buffer and receive the current one.
Also am receiving
"a=4"
i need to compare this integer value.......please let me know how to do it
using the socket, I continuously send and receive the commands from gripper (schunk-wsg model).
Error is (Hope) UR (3e series) buffering the messages.
Example,
socket_send(a)------------> from UR
wait(0.2)
socket_receive(a ack)<----------to UR
socket_send(b)
wait(0.2)
socket_receive(b ack)
socket_send(c)
wait(0.2)
socket_receive(c ack)
but Instead sometimes
socket_send(a)------------> from UR
wait(0.2)
socket_receive(a ack)<----------to UR
socket_send(b)
wait(0.2)
socket_receive() "Receive Nothing"
socket_send(c)
wait(0.2)
socket_receive(b ack)
1. is there any way to wait for receive command.
2. is there any way to check receive command
3. is there any way to clear the buffer and receive the current one.
Also am receiving
"a=4"
i need to compare this integer value.......please let me know how to do it
Tagged:
The default for the timeout is 2 seconds as well.
As as far as comparison in URScript you would use the == operator