Jump to content
  • 0

HS1 Device Names


nacnud

Question

Hi,

 

This one may need Digilent input:

 

I named my HS1 devices using the Adept suite, but I was unaware that the names seem to be "per windows user". So when I ran my automated tests, under a different account, things failed.

 

Is there a way to "globally name" my HS1 devices. I have two on each box in my test farm. There are 7 boxes in the farm.

 

Thank you,

Duncan

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

Hello,

 

1. Probably you used the Device Table entries which are stored in path like: C:UsersuserAppDataRoamingDigilent This can be copied for the other users.

This table was originally intended for slow detectable, like networked devices. Use it with care because a device present in the table but not connected can be misleading.

 

2. The device unique Serial Number can be used to identify/open a specific device.

 

3. Each device has an "user name" field which can be used as open parameter too.

This can be modified using the dmgr library:

from ctypes import *
import sys

if sys.platform.startswith("win"):
    dmgr = cdll.dmgr
else:
    dmgr = cdll.LoadLibrary("libdmgr.so")

# see Adept SDK dmgr.h dpcdecl.h

cDev = c_int()
# sufficient buffer to store DVC structure data
dvc = (c_byte*1000)() 
username = create_string_buffer("MyDeviceName0") 

dmgr.DmgrEnumDevices(byref(cDev))
if cDev != 1
    print "Expecting only one Digilent device"
    return
    
dmgr.DmgrGetDvc(c_int(0),byref(dvc))
dmgr.DmgrSetInfo(byref(dvc), c_int(2), username) # dinfoUsrName

Best regards,

Attila

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...