Jump to content

Search the Community

Showing results for tags 'daq'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • News
    • New Users Introduction
    • Announcements
  • Digilent Technical Forums
    • FPGA
    • Test and Measurement
    • Measurement Computing (MCC)
    • Add-on Boards
    • Digilent Microcontroller Boards
    • Non-Digilent Microcontrollers
    • LabVIEW
    • FRC
    • Other
  • General Discussion
    • Project Vault
    • Learn
    • Suggestions & Feedback
    • Buy, Sell, Trade
    • Sales Questions
    • Off Topic
    • Educators
    • Technical Based Off-Topic Discussions
    • Archived

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

Found 6 results

  1. I am trying to create a single task with 2 channels: 1 for voltage analog input and 1 for temperature analog input. Using InstaCal (While LabVIEW was off), I configured my USB-Temp-AI for a differential input on the Voltage port 0, and I also set a Type J thermocouple for Temperature port 0. In LabVIEW, I used the ULx Create Channel VI and set the polymorphic select to composite AI Voltage for the first channel and connect it to a second one with the polymorphic select set to composite AI temperature. However, this does not seem to work, and I just get an empty array, but no errors. I tried playing with the Timing VI, but if I add the Timing VI, any option that I choose results in an error. If I choose a clock source I get an error saying to use NoClock. But if I use NoClock, I get an error saying it is not supported by this task. I have tried using only an Analog Input or just using a Composite Analog input since this seems to be something the ULx Help guide seems to reference, but it won't accept the Temperature Channel Name (Dev0/Ti0). Any help would be appreciated. Attached is lvulx.chm, which is the ULx Help guide I referenced. lvulx.chm UlxTesting.vi
  2. I am using python to communicate with Signal Generator and MCC DAQ 1602-HS. I setup the chirp setting in the Signal Generator. Then I turn on. Immediately I turn on the DAQ next line. (using python). I couldn't capture the start of the chirp. The DAQ start capture after sometime. The example code DAQ_Set_Trigger() is so complicated for me. I can't understand. Can you please give me code that will trigger the DAQ when chirp signal from signal generator turns on? I have attached my code below. Thank you. Chirp_capturing.py
  3. Hi there, I am using the Python library mcculw on a Windows 10 mcahine. I am using the USB 231 DAQ. I want to have a feature in my software which can show whether the connection to DAQ is alive or not. So, I thought of a polling method like this: def get_daq_status_str(self): ''' Print status of daq every 1 second ''' while True: status = ul.get_status(self.board_num) if status == Status.IDLE: print('Status: Idle') elif status == Status.RUNNING: print('Status: Running') else: print('Status: Error') time.sleep(1) But from the docs I read that, all that ul.get_status() does is "Returns the status about the background operation currently running". So, I don't think it will work for my use case (since I am not transferring any data). So, what function can I use for this purpose? Apart from this, my application has to do usual a_out_scan() to send out voltages. So, as far as I can see, I must run this status check (polling method) in a separate thread, so that any other DAQ operation remains unaffected.
  4. Hi there, I am using the Python library mcculw on a Windows 10 mcahine. I am using the USB 231 DAQ. When I send voltages for the first time (using a_out_scan() method) everything works fine. When I send it for the second time, I get this error: daq_device_info.py, line 37, in __init__ raise ULError(ErrorCode.BADBOARD) mcculw.ul.ULError: Error ErrorCode.BADBOARD: Invalid board number. Notes: I have stored the board number in a variable board_num=0. I am not changing it at all during program execution. So, I don't know how it changes and how I get the error. I initialize the device using the following code each time I try to send voltage. The following is an excerpt from my code: class DaqLogic: ''' This class has various methods to interact with the DAQ ''' def __init__(self): self.board_num = 0 self.daq_info = DaqDeviceInfo(self.board_num) self.ao_info = self.daq_info.get_ao_info() #Useful constants for the DAQ self.low_chan = 0 self.high_chan = 1 self.num_chans = self.high_chan - self.low_chan + 1 self.ao_range = ULRange.BIP10VOLTS self.use_device_detection = True self.dev_id_list = [] self.calibrationFactor = 1 self.lcdFreq = 200 # in Hz def configure_first_detected_device(self): ''' Configures the first detected device. Ingores Instacl config. ''' ul.ignore_instacal() devices = ul.get_daq_device_inventory(InterfaceType.ANY) if not devices: raise Exception('Error: No DAQ devices found') print('Found', len(devices), 'DAQ device(s):') for device in devices: print(' ', device.product_name, ' (', device.unique_id, ') - ', 'Device ID = ', device.product_id, sep='') # Add the first DAQ device to the UL with the specified board number ul.create_daq_device(self.board_num, devices[0]) def intialize_daq(self): ''' Initializes the DAQ ''' try: self.configure_first_detected_device() daq_dev_info = DaqDeviceInfo(self.board_num) if not daq_dev_info.supports_analog_output: raise Exception('Error: The DAQ device does not support ' 'analog output') except ULError as e: # Todo: Create alert window print("Error: ", e) Is it that I should not initialize the device each time I wish to send voltage ? I guess, I must initialize only once and then store some reference to the device for further use, like sending voltages for 2nd time.
  5. ⚙️ Hardware details I am using the USB-231 USB data acquisition (DAQ). 💻 Software details OS: Windows 10 Home, Version 21H2 64-bit operating system, x64-based processor Python version: 3.9.10 Python library concerned : mcculw Python library method concerned: ul.a_out_scan 🤔 What am I trying to do ? The USB 231 has two analog output channels. I am storing voltages to be outputted in python lists. For example : array1 = [1,2,3] array2 = [4,5,6] array1 in intended for channel number 0 and array2 is intended for channel number 1. I wish to send each voltage as a square wave of 200 Hz (the square wave oscillates between +voltage and -voltage). Going ahead with the above example, I wish to send : 1V to channel 0 at 200 Hz, 4V to channel 1 at 200 Hz, 2V to channel 0 at 200 Hz, 5V to channel 1 at 200 Hz so on and so forth. 😔 What exactly is the problem ? Voltages appear in each channel, but the voltage sign is not consistent. So, if my array contains 1V, I can see only +1V and I can't see -1V at all. I have done the interleaving of voltages to output each array for the corresponding channel. So, the final interleaved array has +1V and -1V repeated 200 times. But the -1V is not outputted by the DAQ at all. Sometimes one channel outputs only positive voltages and other only negative voltages. 👨‍💻 What have I done till now ? Created a script based on the a_out_scan.py example script to achieve the goal. Since I didn't get the expected output, I have tried the following: Changing ul.win_buf_alloc to ul.scaled_win_buf_alloc Changing the ctype array from u_short to other types. But I had no success with these. 🔎 Script/code ? Here is a link to my script. 📝 Any specific note ? I prefer to use the ul.a_out_scan method instead of ul.a_out method, since I can specify the rate as a parameter in ul.a_out_scan method. Using ul.a_out_scan is a better way to generate precise signals than using the ul.a_out along with something like Python's time.sleep() method. 🔬 Any other observations ? I have observed that the sign of output voltage varies when I change the rate parameter of ul.a_out_scan. I don't think this is an expected behavior.
  6. Hi all, I have a question about AD2 immediate sampling data output. I am doing a university project which needs AD2 to do analog signal measurement on LabVIEW. AD2 measures a signal with 12.8 KHz sampling frequency. I am wondering if I can get the immediate measured data without sample lost? Thanks!
×
×
  • Create New...