Jump to content

JRys

MCC Staff
  • Posts

    1,498
  • Joined

  • Last visited

Everything posted by JRys

  1. Hello, It should be possible start an a_in_scan BACKGROUND|CONTINUOUS acquisition in function1 and then call ul.GetStatus(board_number, FunctionType.AIFUNCTION) in function2. Perhaps you could post or attach the class code if it's not too big. Best regards, John
  2. I should also add that if you have control over the block size, set it to at least 10% of the sample rate for acceptable results. A block size of one adds too much overhead and is usually is for sample rates under 100. John
  3. Hello, Close DASYLab and open NI's Measurement & Automation Explorer (MAX). Modify the analog input task to run continuous and change the sample rate to 10,000 S/s. Run the task to make sure it meets your requirements. Save the task, close MAX start DASYLab. Place a DAQmx Analog Input on the DASYLab worksheet and link to the task. Connect it to a y/t chart for display and run. This should provide much better performance. If you need to modify the sample rate, there's no need to run MAX again because this is one of the few items DASYLab can control with NI hardware. You may need to set the sample rate higher if you wish to reproduce waveforms above 100 Hz. A good looking sine wave consists of 100 data points. So 10,000 S/s divided by 100 Hz is 100. If you can set the sample rate to 100k Hz, then sine waves up to 1000 Hz should look good. Best regards, John
  4. Hey Lee, I've order a second MCC 172 but it won't arrive until next week - I'm hoping Monday. In the meantime, I modified the code - attached. MASTER is defined as zero, so I added a SLAVE defined as 1 and changed the clock config write and ain scan start sequence to reflect SLAVE first. // Configure the slave clock first result = mcc172_a_in_clock_config_write(address[SLAVE],SOURCE_SLAVE, sample_rate); // Configure the master clock last so the clocks are synchronized result = mcc172_a_in_clock_config_write(address[MASTER],SOURCE_MASTER, sample_rate); STOP_ON_ERROR(result); ..... // Start the scans //for (device = 0; device < DEVICE_COUNT; device++) //{ result = mcc172_a_in_scan_start(address[SLAVE], chan_mask[SLAVE],samples_per_channel, options); result = mcc172_a_in_scan_start(address[MASTER], chan_mask[MASTER],samples_per_channel, options); STOP_ON_ERROR(result); //} I couldn't run it but it did compile. Let me know if you see improvement otherwise I'll plan on testing early next week. Best regards, John 1a_multi_hat_synchronous_scan.c
  5. Hello, Could you attach (or include link to) the data sheet for the sensor at the end of your hammer? I have a 50g 100mV/g accelerometer on the end of my hammer and am not experiencing the same trouble. My QuickDAQ version is 3.7.0.49. I've configured the FFT Analyzer for an Analysis Frequency of 399Hz and the FFT size is 1024. Each trigger will take a little over 2 seconds to acquire. The trigger is Ain 0 Analog Threshold Pos Edge set to 1g which is approximately 0.1 volts from the accelerometer. A lite tap is all that is needed. Below are my results halfway through a 10 trigger sequence. On Ain 1, I've connected a signal generator set to sine wave 158 Hz 1.0v peak (IEPE current off), hence the hump in the blue trace. Best regards, John
  6. Hello, I found this statement in the programming guide for the clock config write: If you change the clock configuration on one device after configuring the master, then the data will no longer be in sync. The devices cannot detect this and will still report that they are synchronized. Try reversing the order for the clock config write functions and configure the slave is first. Let me know if it solves the issue, but if does not attach your script and I'll investigate. Best regards, John
  7. Hello, The IOtech DaqIO LabVIEW Support is based on 32-bit DLL's and as such, you must use a 32-bit version of LabVIEW. I believe if you were to install the LabVIEW Community Edition you have more success. https://www.ni.com/en-us/support/downloads/software-products/download.labview-community.html#460309 Best regards, John
  8. Hello, It works the way you've described, but not with a_in_scan, but with daq_in_scan function. The state of the digital port must be read along with the analog data for the trigger mechanism to work. The same hold true for analog triggering, if you want channel 1 to be the trigger channel it must be in the scan list. With daq_in_scan, a loop-back wire from a DIO to the external trigger pin is unnecessary. When the output from d_out_scan reaches the target value, daq_in_scan function will begin to dump data to the acquisition buffer. If for some reason you need to stick with a_in_scan, then the workaround is a wire from a DIO to the external trigger must be used with an explicit write to set the DIO. Best regards, John
  9. The IOtech PersonalDaq/55 used a better name for the same type of setting, it used Measurement Duration. So Data Rate is really the time the analog-to-digital converter measures the input value and it's not the sample rate, which is sample to sample time. Although choosing a low setting will limit the maximum sample rate. Page 16 in the following user manual has the formula that explains the relationship. https://www.mccdaq.com/pdfs/manuals/USB-2416.pdf The analog-to-digital converter is a sigma-delta converter. These can run very fast but when doing so they produce inaccurate data. So the technique is to slow them down to achieve higher accuracy. A side effect of this technique is it creates a low pass filter capable of reducing signal noise too. For thermocouple measurements, I found the 60 Hz setting works well. Long story short, when you see the term data rate, think measurement duration. Best regards, John
  10. Hello, For the digital pattern trigger to work, the program must be actively scanning the digital port. To read both analog and digital at the same time use the daq_in_scan function. When properly configured, it can simultaneously read analog + digital + counter. Take a look a the example daq_in_usb_1800.py. To use pattern triggering add EXTTRIGGER to the daq_in_scan options (for example CONTINUOUS|BACKGROUND|EXTTRIGGER) and use set_trigger function to configure the pattern. The low threshold parameter is the digital pattern and the high threshold is the mask. For example set_trigger(board_num, TRIG_PATTERN_ABOVE, 3, 15) Best regards, John
  11. Hello and good catch, I apologize for the misinformation. The MCC 172 is a little different, when compared to our other products, in that it has the function a_in_clock_config_write that sets the clock direction. Because of this, you don't use the OptionsFlags.EXTCLOCK and instead use just DEFAULT or CONTINUOUS with a_in_scan_start. Start the slave board first then the master and it should all fall into to place. Best regards, John
  12. Hello again, I was able to locate your board (s/n 1FAC0F0) in our system but have some bad news. It was delivered to Logicbus in June of 2021 which puts it outside of the 1-year warranty period. Best regards, John
  13. Hello, Are you looking for a system integrator that could build you a custom device with BNC connectors and/or create a custom program to suit your application? Best regards, John
  14. Hello, Please make sure the SPI and the I2C interfaces are enabled on your Raspberry PI. If they are not, the MCC 118 will appear not to work. If they are enable, please use the DAQ Hat Manager to read the EEPROMS or use the following command in a terminal: sudo daqhats_read_eeproms. After use the DAQ Hat Manager to read the MCC 118 - make sure to choose the correct address. If you have a hat board from another company please remove it before testing. The number you provided is not the serial number, it is typically a 7-digit hexadecimal number such as 1F8E92E. Best regards, John
  15. Select the Options (Gear/Cog) and on the menu uncheck Acquire Noise
  16. Hello, I'm guessing you're using the DASYLab software. An often overlooked fact is that it reads the InstaCal setup once when it is started - not when the worksheet loads or starts. Any changes to InstaCal will not be recognized unless you it is closed and restart DASYLab. Also, I can see that you still have two single ended channels. Are the results with only the TCs attached and everything else physically removed? Last, what can you tell me about the hotplate? Is it something I could buy at Walmart or is it an industrial unit? I ask because if it's an industrial unit, it may have sophisticated switching electronics to control the heat which is generating non 60 Hz noise. You may want to see if you can get one TC to work. If you cannot then it could be the switching elements inside the hotplate causing non 60 Hz noise, which cannot be removed by the USB-2416 digital filter. Best regards, John
  17. Hello, The EXTCLOCK scan option will instruct the board to wait until the clock signal appears. Therefore, it must be programmed first with this option. Use the Option Flag DEFAULT for the master board. When it is started, the scan clock signal is applied to the other board effectively starting it too. For example, replace the start scan for...loop and instead use something like the following: chan_mask = chan_list_to_mask(chansl[1]) hats(1).a_in_scan_start(chan_mask, samples_per_channel, OptionFlags.EXTCLOCK) chan_mask = chan_list_to_mask(chansl[0]) hats(0).a_in_scan_start(chan_mask, samples_per_channel, OptionFlags.DEFAULT) If you wish to run continuously, use OptionFlags.CONTINUOUS | OptionFlags.EXTCLOCK and instead of DEFAULT use OptionFlags.CONTINUOUS You should also get rid of the lines that have to do with setting up the external trigger. Forgive me if there is Python mistake, I'm better with C programming:-o) Best regards, John
  18. Hello, To debug the system, disconnect everything except the 5 thermocouples (TCs) connected to ground (hot plate). Set the Data Rate property for each channel to 60 Hz to reject 60 Hz noise and produce a more accurate value. This is an InstaCal setting unless you're using the DAQami software. The PersonalDaq/55 has this same type of setting too, however it is called Measurement Duration. Set the sample or scan rate to 1 Hz and collect data while the hotplate warms up from cold to hot. It should return acceptable data. The key takeaway here is that the hotplate establishes your system ground. This is because internally, the USB-2416 engages a reference resistor from the low side input to ground. In other words, the exposed tip of the TC is connected to ground through a resistor. If you need to also connect a couple of other sensors, use differential mode and physically add a reference resistor from the low side input to ground (GND). Use a value that's between 47k and 100k ohms. The lower the resistance the stronger the reference to ground, but it also diminishes the benefits of the differential input. The reason the sensor didn't previously work in differential mode could have been because it used an isolated power source. The reference resistor reestablishes the ground reference. Best regards, John
  19. Hey Bret, One last thing to try. Open the Applications menu and select Preferences-->Raspberry PI Configuration. Select Interfaces and make sure both SPI and I2C are enabled. Best regards, John
  20. Okay, thanks. I will continue our correspondence with a private message. Regards, John
  21. Hi Damian, Could you upgrade InstaCal to version 6.73 and run it with your USB-2416-4AO - make sure the 5 volt supply is attached. You can use the following link to download the latest version: https://www.mccdaq.com/downloads/InstaCal/icalsetup.exe The top LED should light up when the power supply is attached. The other LED should light when it is attached to the USB port. If you have Windows 7, you must run an old copy of InstaCal, unless you paid Microsoft for updates. In this case, use InstaCal 6.55. If you have a newer version uninstall it before installing 6.55. https://mcc.download.ni.com/Archive/InstaCal/Archive_6.55/icalsetup.exe Let me know if InstaCal works... Best regards, John
  22. Hello, The DT9832 is a Data Translation device and as such it uses Data Translation software like the QuickDAQ program. We acquired them six years ago and to this day their products are sold as a sub brand with its own software ecosystem. The following link will lead you to a PDF that lists what works with DAQami: https://www.mccdaq.com/pdfs/manuals/DAQami-hw.pdf Best regards, John
  23. This particular unit was purchased in 2017 and no longer has warranty coverage. Repairing them is not cost efficient, instead, we replacement them free if under warranty. If out of warranty, like this unit, you can purchase a new one at half price. I will send you a private message with details about how to get the discount. Best regards, John
  24. Your soil moisture sensor is not analog and instead it's a digital sensor that has a modbus RS485 interface. You will want to use something like this:https://www.amazon.com/Icstation-Resistive-Soil-Moisture-Sensor/dp/B076DDWDJK or this: https://wiki.dfrobot.com/Waterproof_Capacitive_Soil_Moisture_Sensor_SKU_SEN0308 both of which output an analog voltage for the moisture %. Best regards, John
  25. "DC voltage output transmitters connect using three wires—two wires into the power supply and a separate wire that sends a signal to the receiver. The receiver and the transmitter share a common ground wire back to the power supply." The question then becomes, do you connect the power supply to the (+) & (-) pins or between GND & (+). I believe you use the (+) & (-) for power. You cannot use anything less than +14 volts, but a +15, 18 or 24 volt power supply will work. Connect the (Output) pin to the USB-2416 CH0H and the (-) pin to CH0L. Add a 100k ohm resistor from CH0L to GND on the USB-2416. This is a differential connection and is preferred. You could also set the USB-2416 channel to single-ended mode. This may be easier because because all you must do is connect the Output to CH0H and the (-) to GND on the USB-2416. If you have long wires like six feet or more, use the first method because it will provide better noise rejection. To scale the voltage reading to PSI, simply multiply the voltage reading by 10. Best regards, John
×
×
  • Create New...