Multifunction DAQ

Showing results for 
Search instead for 
Did you mean: 

Vernier SensorDAQ digital outputs activation with NI DAQ MX Python

Hi everybody.


I am making an application with the Vernier Sensor DAQ to control temperature in a closed mini-chamber with the LM35 and a light bulb  as an actuator.


To activate the light source, I need to configure and set a digital output of the DAQ for a certain time to keep the temperature radiating the focus. I'm using the NI DAQ MX Python API (

Unfortunately I'm inexperienced with python and interpreting the documentation of that API, however I built this code, but when executing it does not activate any of the four digital outputs of the SensorDAQ:


import numpy as np
import nidaqmx as daq
import math
import pylab as plt

from nidaqmx.constants import LineGrouping
from nidaqmx import system
s = system.System()
print(list(s.devices)) # data dev correspondiente

def activa_salida_digital():
    app= 'Dev8/port0/line0'
    with daq.Task() as task:
            print('N Lines 1 Sample Boolean Write (Error Expected): ')
            print(task.write([True, False, True, False]))
        except daq.DaqError as e:
        print('1 Channel N Lines 1 Sample Unsigned Integer Write: ')
        print('1 Channel N Lines N Samples Unsigned Integer Write: ')
        print(task.write([1, 2, 4, 8], auto_start=True))


I attach the connection diagram:



0 Kudos
Message 1 of 1