Esempio n. 1
0
    def get_env(self):

        config = md.Configure(filepath=self.config_filepath,
                              filename=self.config_filename)
        env = config.get()

        return env
Esempio n. 2
0
    def __init__(self, sample_rate = 1, samplesPerChan = 1, subSamplesPerChan = 1, minValue = 0, maxValue = 10, IPNumber = "", moduleSlotNumber = 1, moduleChanRange = [0], uniqueChanIndexRange = [0]):

        self.sample_rate = sample_rate
        self.samplesPerChan = samplesPerChan
        self.subSamplesPerChan = subSamplesPerChan
        self.minValue = minValue
        self.maxValue = maxValue
        self.IPNumber = IPNumber
        self.moduleSlotNumber = moduleSlotNumber
        self.moduleChanRange = numpy.array(moduleChanRange)
        self.uniqueChanIndexRange = numpy.array(uniqueChanIndexRange)

        config = md.Configure(filepath = '/home/heta/Z/app/python/dogger/', filename = 'conf_voltage_2.ini')
        env = config.get()
        self.dataFilepath = env['STORE_PATH']
Esempio n. 3
0
""" Adapted from https://scipy-cookbook.readthedocs.io/items/Data_Acquisition_with_NIDAQmx.html."""

import ctypes
import numpy
import time
import scipy.interpolate
import os

import gateway.metadata as md

nidaq = ctypes.windll.nicaiu  # load the DLL

#FILE_PATH = "../../data/files/"
#FILE_PATH = "C:/Z/THISBUSINESS/Energilab/PROJECTS/logging/data/files/"

config = md.Configure(filepath='Z:\\app\\python\\dogger\\',
                      filename='conf_voltage_2.ini')
env = config.get()

FILE_PATH = ''

if env['FILE_PATH'] is not None and os.path.exists(env['FILE_PATH']):
    FILE_PATH = env['FILE_PATH']

FILE_PATH = 'Z:/data/files/voltage/'

##############################
# Setup some typedefs and constants
# to correspond with values in
# C:\Program Files\National Instruments\NI-DAQ\DAQmx ANSI C Dev\include\NIDAQmx.h

# the typedefs