Quantcast
Channel: Multifunction DAQ topics
Viewing all 6882 articles
Browse latest View live

Controlling NI USB-6501 via MATLAB & Data Aquisition Toolbox

$
0
0

Hi,

 

I'm working on a project in which I need to control a valve from a computer (open/close). Due to my university's lack of a LabView license, I'm attempting to control the control signal using a NI USB-6501 DAQ and MATLAB.

 

The NI USB-6501 did come with a CD which I believe has NI-DAQmx software that I can install. My university also has a license for DAQ Toolbox.

 

Should I be able to throw a combination of these together to control my valve? I'm just trying to get some insight before I go trying things. I have very limited experience with LabView/DAQ's, and a few years of basic programming experience with MATLAB.

 

Thanks for any input!

 

Zack

 

 


Get reference from pause trigger.

$
0
0

Hello.  I´ve been searching this forum for the solution to my problem with no succes.

I have a TTL signal with two "up" portions. I want to adquire data ontly when the signal is up, so a pause trigger seems to be a good option. The problem is that i want to be able to know if the data correspond to the first or the second portions.

Also i would like the adquisition to stop after the second falling time. 

T.bmp

The time between boths pulses and the lenght of each one of them may vary, so i don´t previosly know how many data points i need.

 

Thank you a lot for your help


Julian

Use of the same counter in a new task within the same VI?

$
0
0

HI everyone,

I have a simple question regarding a test that I am doing.  I have a test board with a single input pin that requires 2 different counter tasks.  One to generate a frequency scale and the other to output a specific number of pulses.  My question is can I create a task for the frequecy test, close and clear that task and generate another task that does the pulses on the same counter?  I've tried this but it appears that the first task doesn't release the counter resource.  I'm using a 6363 board and only have 4 counters so I'm trying to recycle counters for different tasks.  Any tips or suggestions would be most apprieciated.

 

Thanks,

K2

Minimize variation in heater temperature control using PID

$
0
0

Hi all,

 

I have implemented PID control for keeping heater temperature constant. I used Z-N method for parameter tuning and it bring the process variable close to set point but still fluctuate around set point. I want the variation to be within 0.2 deg C but output varies within +/- 2 deg Centigrade.

 

Is there a way to achieve such acuurate output?

 

I am attaching the VI for you guys to analyse.

 

PS: I am using NI 9219 to measure current temperature and control output is given to heater via NI 9264.

NI-4350 windows 7

$
0
0

I can not seem to get Windows 7(32 bit) to see my NI-4350 as a 4350...

Does anyone have a fix for this?

A/D NI USB-6008 problem

$
0
0

i use A/D NI USB-6008 in automatic station i heve several units that stop blinking and dos not work if i replace the unit the station start to work correctly can you advice me what the problem thank you

Analog input sampling in C/C++

$
0
0

Using a PCIe6323 to capture continuous analog inputs.  I have 32 points of which I want to monitor the current state continuously.  I can't seem to get this to work without various errors.  Right this moment I have this:

 

DAQmxErrChk (DAQmxCreateTask("",&taskHandleAI));
DAQmxErrChk (DAQmxCreateAIVoltageChan(taskHandleAI,"Dev1/ai0:31","",DAQmx_Val_Cfg_Default, 0.0, 5.0, DAQmx_Val_Volts,NULL));
DAQmxErrChk (DAQmxCfgSampClkTiming(taskHandleAI,"",10000.0,DAQmx_Val_Rising, DAQmx_Val_FiniteSamps,1000));

 

DAQmxErrChk (DAQmxReadAnalogF64(taskHandleAI,2,10.0,DAQmx_Val_GroupByScanNumber,dataAi,1000,&readAi,NULL));

 

I have to Stop and Clear the tasks and re-create each cycle in the continuous loop, which seems like the wrong way to do it but it's the closest I've been to proper function.  Right now I get error -200019.  

 

How can I get this to sample continuously?  

 

Thanks

Zonicbook/ eZ-TOMAS tachometer query

$
0
0

I have collected transient data from a machine however the tachometer input channel was behaving very curiously. The proximity probe that was looking at a shaft keway did not give a consistent voltage trigger, i.e. the first peak was gave a value of -6V, 2nd peak -3V, 3rd peak 0.2V and then back to -6V. The pattern repeats. What this meant was that every third tachometer peak (pulse) was lost in noise and so couldn't get an accurate phase/ speed measurement. To combat this I used a different tachometer proximity probe input (which gave consitently -4V peak/ pulse) on a slower speed shaft and used the RPM Multiply and assigned this 'calculated' tacho to my high speed shaft channels. This gave me accurate speed however when I come to view polar or bode plots for all 12 channells the phase signal is all over the place, e.g. steady 1x amplitude but phase 124deg one measurement then 248deg, then 48deg, then 298deg. Have I set this calculated tacho up incorrectly? If so, can I retrospectively change this without resurveying the machine?

 

Any help appreciated.

Thanks,

Allan


USB 6221 problems in Windows7 with DaqMX 14.1 Error -50808

$
0
0

A little background, we have a working product in XP that uses the USB 6221 module and is written using DaqMX 8.9 in a C++ program.

 

We are now moving towards supporting Window7.  We have upgraded to DaqMX 14.1 and simply recompiled our code with the new header files.

 

Everything works except it does not take too many runs before setting the samlping clock on a simple analog data collection task no longer works.  Randomly the call to "DAQmxCfgSampClkTiming" fails and returns error code -50808 which in the ni header file is "DAQmxErrorPALUSBTransactionError".  Note that this paticular error was not present in the 8.9 header file.  The values of the call to "DAQmxCfgSampClkTiming" are nothing crazy and sometimes the call works and sometimes the call returns the -50808 error code randomly.  

 

Does anybody have any idea what is going on here or what that error code REALLY means?

 

Lou 

USB DAQ control with PI(D)

$
0
0

I am trying to build a PI controller:

 

Windows 7, USB-6251 DAQ BNC, normal Labview 2011 - no toolkits, not even the Control and Design one.

 

The datasheet for the USB DAQ says

 

"With four waveform analog outputs, two 80 MHz counter/timers, and four high-speed data streams on USB, M Series devices can execute multiple control loops simultaneously."

 

I have not been able to do this, even with my own PID.  What does "high speed" mean?

 

 

The USB DAQ *does not have* hardware timing so the following won't work.  I need basically exactly this, but with a USB DAQ device:

 

12fbdcae1641.gif

 

 

The closest I've come to a successful version is the following (thanks to a member here), but it's very slow (50 ms delay between original signal and output signal).  My only sample clock options are "continous" or "finite" samples:

 

slooow.png

 

Without moving to a real-time system (expensive and complicated), or buying new hardware (expensive), are there other algorithms that would work faster?  producer/consumer, state machine...?

 

The delay seems to be in the writing, not the reading.  

 

Thank you.

Connection problem daq-chassi

$
0
0
I have an old scxi-1000 chassi with a 1104C module. My old control device pci-6052 is to be replaced with our existing usb-6351 daq.

How do I connect? The usb daq has screw terminal so my former cable doesnt fit.

K-type Thermocouple Error - 2000777

$
0
0
HI

I have a PCI-6225 card with SCB-68A connector blocks, I am using the following steps just to test the reading from  K-type Thermocouple and I am getting an Error-200077 when ever I tick CJC Source "Built In".

I did switch to "enable temperature sensor (differential)" and the CJC configuration on the SCB-68A is checked, tested with ai0 and ai4.
 
I am uncomfortable to manually scale the thermocouple voltage since I am unsure of the CJC sensor/voltage value, max temperature to be measured can go up to 600ºC

Am I missing someone thing else? What other approach can I use to acquire a reliable thermocouple reading?
 
Attached is the thermocouple and the print screen related
--
Sincerely

Yu-Chao (Terry) Tang

Alternating Sample Rate - Signal Express

$
0
0

Hi, Im trying to get data using Signal Express + NI USB-6211, I set the sample rate to 44100Hz. and everything seems to be ok but when I checked data I realized that time column is not increasing in a constant of period time(ie. sample freq. not fixed).

For example:

 

1/(time(1)-time(2))=43478.26 Hz.

 

1/(time(2)-time(3))=45454.54 Hz.

 

and it alternates continuously between both frequencies. I have to perform a FFT and Im not sure what is the actual frequency and whats going on.

I appreciate any help on this issue.

Regards.

 

 

sbRIO 9636 RESET Switch Interface needs

$
0
0

The sbRIO 9636 has two pads near the RESET Switch.  See Figures 2-6, etc. within the OEM OPERATING INSTRUCTIONS AND SPECIFICATIONS.

 

I received the confirmation below from an NI Applications Engineer (Reference#2146323) that shorting these two pins will generate a RESET:

 

2) Regarding RESET Switch (10): Is this a provision to add a connector to allow an External RESET switch and or Watchdog circuit to reboot the sbRIO processor? 
This is also correct. This switch can be toggled to reset the sbRIO, or an external button/switch can be connected to the two small inserts next to this onboard switch to reset the sbRIO. Shorting these two small connector inserts will reset the RIO, so if you would like to have external circuitry that does this, you should have no problem.

 

I am trying to wrap up the design of my external watchdog circuitry and need to answers to the following:

 

Is the RESET switch a simple Pull-down for a Logic Level Input, such that if I were to attach the Open Collector and Emitter of an NPN Transistor across these pads in the correct polarity, I would be able to perform a Hard RESET on the sbRIO?  If so, can please tell me if Pin 1 or 2 is the Pull-up, what Resistor value is being used and to what Voltage level?  Also, can you please tell me what the pin spacing is and what the plated diameter is for these two pads?

 

Any assistance that you can provide is appreciated.

NI-6289 DAQ latency for digital waveform generation

$
0
0

What I am trying to achieve is less than 1 second of latency between updating several digital waveforms and seeing those values appear on the digital output pins.  For example if I have 16 digital ouput channels in my task, and I write 127 samples to each channel at a rate of 1 sample every 10 ms, then I update the waveforms in Labview that are being sent to each channel, I do not see the new values on the output pins for about 21 seconds.  The onboard FIFO size for the 6289 is 2,047 samples.  At this point I am assuming that this latency is being introuced by the onboard FIFO- but I could be wrong. 

 

If the onboard FIFO is shared by all channels in a task, and one sample from each waveform is generated at the output every 10 ms, then I would expect the latency to be (2,047 samples/16 channels)*10 ms/sample = 1.27 seconds.  However, I still observe a latency of about 21 seconds. Is there something fundamental about the onboard FIFO I am misunderstanding? Or is there something happening in the PC buffer that adds this latency?

 

I have attached my VI for reference. NOTE: The attached VI only has 2 channels for simplicity yet it exhibits the same latency as the 16 channel example. I have a analog aquisition loop running as well to monitor the digital pin outputs.

 

Thank-you in advance.

 

 

 


Calculating clock drift for the NI 9234 module

$
0
0

Hello! I'm fairly new to using NI equipment (and hardware DAQ in general), so this is probably going to be a really basic question.

We're planning to use two cDAQ 9181 chassis with two NI 9234 modules to sample data on 8 physical channels simultaneously at a rate of 25600Hz. Since we're using the 9181 chassis we cannot do hardware synchronization as mentioned in this topic:

https://forums.ni.com/t5/Multifunction-DAQ/Trigger-aquisition-across-multiple-compactDAQ-chassis/td-p/1577536

"The cDAQ-9181 will be out of the question because, as you stated, it does not provide externally accessible PFI lines and you can't use a digital module for sync in a single module carrier, because that would occupy the only available slot."

We need the synchronization between the channels to be accurate to ±100ms. According to the specifications at http://www.ni.com/pdf/manuals/374238c.pdf, the Internal master timebase (fM) has a frequency of 13.1072 MHz, and an Accuracy of ±50 ppm. I'm trying to calculate the maximum amount of clock drift over 1 hour. Does the chosen sampling rate effect the result?

C# 9.6 Could not load file or assembly 'NationalInstruments.DAQmx Error

$
0
0

I have built a C# program that measures current through a current monitor + NI USB-6008. I have a separate library for the NI stuff and added references to NationalInstruments.Common.dll and NationalInstruments.DAQmx.dll. The way I added them was to copy them to my library folder and then Right-Click References folder > Add Reference... > Select the dll from the folder. Is this the proper way or is there some other way to add the dll?

 

When running the program, I get the following error:

System.IO.FileNotFoundException: Could not load file or assembly 'NationalInstruments.DAQmx, Version=9.6.45.292, Culture=neutral, PublicKeyToken=4febd62461bf11a4' or one of its dependencies. The system cannot find the file specified.
File name: 'NationalInstruments.DAQmx, Version=9.6.45.292, Culture=neutral, PublicKeyToken=4febd62461bf11a4'

 even though the dll is included. The steps I have tried are:

1. Made the project Platform Target: x86

2. Previously I had DAQmx 9.9 installed. I removed it and installed 9.6.1

 

What else can I do as I have been working on this for 2 days now and nothing is working?

Digital write latency on PXİ 6289

$
0
0

Hello all,

 

I'm a sort of newbie with Labview programming.

I have a loop using digital change detection of certain digital lines as its time source.  In that loop,

I update the value of three digital output lines according to the value of the digital input line  which are responsible for the change.

 

I know that the maximum change detection rate will be about 50 khz. which leads to that write tasks of the three digital outputs

has to be finished in less than 20 us. Right now, I've seen that I miss some loop iterations since my write execution time is about 150 us.

 

I also checked if the digital write is responsible for slow execution time. and yes, as I disable the digital write portion of my code which

leaves reading the status of digital input lines whose change is detected solely in the loop, my execution rate drops down to a 5 us.

Is this the best I can achieve with PXI card or am I doing something wrong?

 

My program sequence of the digital output lines is as follows:

 

1. Initializing the three digital output line by create virtual channel.

2. start their task.

3. write new values to them, in the loop

 

Any help is appreciated a lot.

Changing AI range in the Multifucntion DAQ card while DAQ timed waveform is collected.

$
0
0

Hello Everyone,

 

I have a question regarding hardware timed anolog data aquisition using multifunctional DAQ card. For example USB-6229 card has AI ranges +-10, +-5, +-1, and +-.2V. I am collecting DAQ timed Finite or Continuous Waveform. Can I switch ranges in a fly while collecting between these ranges and if yes how? I know that using channel property the ranges can be switched when the task is not running but when the taks is running it does not allow me.

 

Thanks,

Ted

Reading CAN data with USB-6216?

$
0
0

Hello all,

 

I apologize in advance if this has been discussed up before. Searching for CAN isn't very productive because every instance of 'can' shows up as well. Controller Area Network is the long form name but it doesn't seem to have been mentioned on this board.

 

I have a USB-6216 BNC DAQ card. I'm interested in reading CAN data from a MoTec data logger onto it. National Instruments has a series of white papers on CAN but they focus on their NI CAN hardware family, like these USB units.

 

Is there a reason why I can't run CAN data into my multifunction DAQ (USB-6216 BNC)? It's just digital data and I believe the sample rates should be adequate, especially as I can run my CAN network at a variety of speeds. I'm almost tempted to try to build a CAN reading program using digital DAQmx tasks just to see if it would work. But I wanted to check with this board first to see if there was something I'm missing because no one seems to have tried this before.

 

Regards,

Viewing all 6882 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>