Skip to content
Discussion options

You must be logged in to vote

Can you provide the logfile or full console output? That will help us understand what exactly is happening here.

I believe that the issue is your indentation, the call to the command is happening outside your context manager, which means that the Device Manager has closed all connections to all devices by that point. That is why the code says there is no device provided.

The corrected code should look like this:

from tm_devices import DeviceManager, register_additional_usbtmc_mapping
from tm_devices.drivers import AFG3KC

register_additional_usbtmc_mapping("AFG3KC", model_id="0x034A", vendor_id="0x0699")

with DeviceManager(verbose=True) as device_manager:
    fungen: AFG3KC = device_manager

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@tgerhardson
Comment options

Answer selected by nfelt14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants