• 0

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

Edited by KaitlynFranz

Share this post


Link to post
Share on other sites

1 answer to this question

Recommended Posts

  • 2

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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now