I have a USB-6001 and need to toggle an output between '0' and 'High-Z' and have tried the following methods with no success:
- Using an analog output
- ao_output_impedance=1.0e9. I get error message that this option is not available on my device
- ao_voltage_current_limit=0.0. I get error message that this is also not supported.
- So how can I turn off an analog channel?
- Using a digital output
- First I do
chan_fast_en_l= task_do.do_channels.add_do_chan("Dev1/port0/line0",line_grouping=LineGrouping.CHAN_FOR_ALL_LINES)
task_do.write(True,auto_start=True); chan_fast_en_l.do_tristate
This has no effect and also gives no errors. The documentation says I must 'commit' this change, but I don't know what a 'commit' is and failed several attempts like "task.action.commit=0".chan_fast_en_l.do_output_drive_type=DigitalDriveType.OPEN_COLLECTOR;
I get no errors but the pin continues to output 3.3V- Is there a write keyword like TRUE, FALSE, HIGH-Z?
- First I do
I'd really appreciate some assistance! If you could help for digital and analog, with some sample code, then that would really help me and others I'm sure.