Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Error to add Digital Output PrawnDO

40 views
Skip to first unread message

Arnol Daniel Garcia Orozco

unread,
Oct 10, 2024, 4:10:15 PM10/10/24
to the labscript suite
Hi all,

I am try configured the Raspberry Pi Pico as Digital Outputs using PrawnDO, but I have the next error when adding the digital channel

#############################################
Recompiling connection table

Traceback (most recent call last):

File "C:\Users\Arnol\labscript-suite\userlib\labscriptlib\Rb_Box\connection_table.py", line 17, in <module>

DigitalOut(name='S1',parent_device=PrawnDO_0,connection='do0')

File "C:\Users\Arnol\anaconda3\envs\py38\lib\site-packages\labscript\labscript.py", line 192, in new_function

return_value = func(inst, *args, **kwargs)

File "C:\Users\Arnol\anaconda3\envs\py38\lib\site-packages\labscript\labscript.py", line 2356, in __init__

Output.__init__(self,name,parent_device,connection, **kwargs)

File "C:\Users\Arnol\anaconda3\envs\py38\lib\site-packages\labscript\labscript.py", line 192, in new_function

return_value = func(inst, *args, **kwargs)

File "C:\Users\Arnol\anaconda3\envs\py38\lib\site-packages\labscript\labscript.py", line 1413, in __init__

Device.__init__(self,name,parent_device,connection, **kwargs)

File "C:\Users\Arnol\anaconda3\envs\py38\lib\site-packages\labscript\labscript.py", line 192, in new_function

return_value = func(inst, *args, **kwargs)

File "C:\Users\Arnol\anaconda3\envs\py38\lib\site-packages\labscript\labscript.py", line 285, in __init__

parent_device.add_device(self)

File "C:\Users\Arnol\anaconda3\envs\py38\lib\site-packages\labscript_devices\PrawnDO\labscript_devices.py", line 238, in add_device

raise LabscriptError(f"Digital outputs must be connected to {self.name:s}.outputs")

labscript.labscript.LabscriptError: Digital outputs must be connected to PrawnDO_0.outputs

Compilation failed. Please fix the errors in the connection table (python file) and try again

#############################################


This is my connection table

#############################################
from labscript import *
labscript.compiler.save_hg_info=False

from labscript_devices.PrawnBlaster.labscript_devices import PrawnBlaster
from labscript_devices.PrawnDO.labscript_devices import PrawnDO

# Pulse Clock
PrawnBlaster('PrawnBlaster_0',com_port='COM3',num_pseudoclocks=4)

# Pulse DO
PrawnDO(name='PrawnDO_0',
    clock_line = PrawnBlaster_0.clocklines[0],
    com_port = 'COM5',
    external_clock = False
    )

DigitalOut(name='S1',parent_device=PrawnDO_0,connection='do0')
DigitalOut(name='S2',parent_device=PrawnDO_0,connection='do1')

if __name__=='__main__':
    start()
    stop(1)

#############################################


and I am using this example as a reference.

Thank you for any help.

Best,
Arnol

dihm....@gmail.com

unread,
Oct 11, 2024, 10:35:45 AM10/11/24
to the labscript suite
Arnol,

That repo you are referencing is the old development repository and is not up to date (we should probably archive it to make that clear). For docs, you should look to the main labscript-devices docs for usage.

As the traceback says, you need to connect DigitalOut to the `outputs` property of the PrawnDO (ie PrawnDO_0.outputs).

The change you need is 

DigitalOut(name='S1', parent_device = PrawnDO_0.outputs, connection = 'do0')

Hope that helps!
-David

Arnol Daniel Garcia Orozco

unread,
Oct 11, 2024, 3:09:03 PM10/11/24
to the labscript suite
David,

I looked directly at the repository and completely forgot about the documentation, now it's working.

Thanks for the help!!!!


Best,
Arnol
Reply all
Reply to author
Forward
0 new messages