# Receiving data from UR3e

**URL:** <https://forum.universal-robots.com/t/receiving-data-from-ur3e/23508>\
**Category:** URScript\
**Created:** [August 29, 2022, 9:49am UTC](https://forum.universal-robots.com/t/receiving-data-from-ur3e/23508 "2022-08-29T09:49:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![anon39314409](https://avatars.discourse-cdn.com/v4/letter/a/f9ae1b/32.png) [@anon39314409](https://forum.universal-robots.com/u/anon39314409)\
**Post date:** [August 29, 2022, 9:49am UTC](https://forum.universal-robots.com/t/receiving-data-from-ur3e/23508/1 "2022-08-29T09:49:27Z")

</div>

I am using a socket connecion on port 30002 and am currently trying to set and get digital outputs. I am, however, having trouble with getting the values of the digital outputs. When I use:  
data1 = socketConnection.send((“get\_standard\_digital\_out(”+ str(index) + “)” + “\n”).encode(‘utf8’));  
#print(data1);  
var = socketConnection.recv(8);  
print(var );

where get\_standard\_digital\_out() URScript command is supposed to return a boolean value. I get instead data1 = 28 whether the state of the output is on or off. As for the contents of var, they are not possible to decode using UTF-8 are in the form b’\x00\x00\x007\x14\xff\xff\xff’

How is it that I can get the output True or False based on the digital output’s current state using the URScript command get\_standard\_digital\_out(index)
