Jump to content
  • 0

best way to write with python into USB-3105


inbar

Question

Hello,

We bought USB-3105, SN: 107094. I want to write a code in python to make it automatically run analog 5 volts voltage on a chosen channel, preferably as a function. 

I tried to use the example codes but they give many errors and I am not sure which code is the right one. I'm using Python 3.12 and I have downloaded InstaCal.

Thank you in advance, Inbar

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

Have a look at v_out.py and ULAO01.py. These two examples will work with your device. Outputs can be set with either the v_out or the a_out function. The v_out function takes floats for data and a_out an integer. 

data_value = 3.0
channel = 0
ul.v_out(board_num, channel, ULRange.UNI10VOLTS, data_value, 0)

You could use a_out_scan, but the rate cannot exceed 100 divided by the number of scanned channels. Underneath, it uses a_out to update the channels. However, it has a SIMULTANEOUS scan option that can be used to update all the channels simultaneously. 

Link to comment
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
×
×
  • Create New...