Hi Yuna,
My apologies, I missed that this was for the connection table. Instructions (anything after start()) is ignored when compiling the connection table.
There are two options for you...
Option 1
You could pass inverted=True to the DigitalOut constructor. E.g.
DigitalOut(name='mot_coil_always_on', parent_device=pb0.direct_outputs, connection='flag 21', inverted=True)
This should have the following effects:
- BLACS should be aware of this setting and create an inverted digital output widget for you (where the off state for the button results in a high output on the channel and an on state results in a low output). They should also show up as a different colour (I think it's blue instead of green). This can be customised in the BLACS settings accessible via the GUI.
- In labscript experiment logic (not just your connection table file), go_high/go_low calls will still correspond to the channel output being high/low but the behaviour of mot_coil_always_on.enable(t) and mot_coil_always_on.disabled(t) will be reversed when compared to inverted=False. That is, enable(t) would be the same as go_low(t) if inverted=True. So for experiments you should do:
t = start()
mot_coil_always_on.go_high(t)
Option 2
Don't invert the channel. After compiling the connection table, enable the channel in BLACS by clicking the button widget for the channel (you can also lock the channel against changes in the BLACS GUI by right clicking on the button). BLACS will remember this every time you close and open it (as long as it's closed successfully once - it might not remember if it is made to force quit).
In your labscritp experiment logic files, call:
t = start()
mot_coil_always_on.go_high(t)
to ensure the channel is always high for the entire experiment.
Which option you chose depends on the logic of what you are controlling and whether it makes sense to have the labscript suite treat the output as inverted. It sounds like maybe it's not a true inversion, rather something that should be always enabled, in which case I would choose option 2. However, it's easy enough to experiment with them both to see which makes the most sense for you.
I hope I've managed to solve the problem this time. Let me know if it looks like I've missed anything else.
Cheers,
Phil