Conversion of DAQmx

Hello? I'm still working on the conversion of DAQ DAQmx.

We have a SCAN_Start function had to be converted.

Old code is

ERR = SCAN_Start (1, dbuffer, sampleCount, sampleTicks, 0, 0, GroupTicks);

New code is

Int32 read = 500; sampleTicks * 10;
float64 data [8000];

DAQmxErrChk (DAQmxCreateTask ("", & SCAN_Handle));
DAQmxErrChk (DAQmxCreateAIVoltageChan(SCAN_Handle,"Dev1/ai0:3","",DAQmx_Val_Diff,-10.0,10.0,DAQmx_Val_Volts,NULL));)
DAQmxErrChk (DAQmxGetAIGain (SCAN_Handle, ' Dev1 / ai0:3 ' /*(const_char*) channel * /, gain (double *))); SCAN_Setup
DAQmxErrChk (DAQmxSetAIConvTimebaseDiv (SCAN_Handle, 500)); sampleTicks * 10
DAQmxErrChk (DAQmxSetSampClkTimebaseDiv (SCAN_Handle, 2000)); GroupTicks * 10
DAQmxErrChk (DAQmxCfgDigEdgeStartTrig (SCAN_Handle, "/ PFI0/Dev1", DAQmx_Val_Rising "));
DAQmxErrChk (DAQmxCfgSampClkTiming (SCAN_Handle,"", samplePerChanPerSec, DAQmx_Val_Rising, DAQmx_Val_FiniteSamps, sampleCounts)); Calendar of analogue transmission, relaxation
DAQmxErrChk (DAQmxReadAnalogF64(SCAN_Handle,800,10.0,DAQmx_Val_GroupByChannel,data,sampleCounts,&read,));
DAQmxErrChk (DAQmxStartTask (SCAN_Handle));

But the new code returned countless errors saying "the specific resource is reserved. The operation could not be performed as indicated. Status code:-50103. »

1 - What is happening because of the healthy mind on different functions handler name?

2 and the conversion is right?

3. I guess that dbuffer of DAQmx data acquisition. Is this good?

4. how old DAQ code SCAN_Start returns the value of dbuffer?

Thank you

Okay, I think I found the problem. The conversion code is good and works fine, but in some way, it has been disabled by subroutine 'power off' in my code. Currently, I have commented and it works fine.

But I have a question about how the data of dbuffer is returned.

Thank you

Tags: NI Hardware

Similar Questions

  • How to make a USB-TC01 temperature data a global variable?

    Hi all!  I have a simple question (probably).  I bought the box USB-TC01 and with the software came a VI called LabVIEWTempLogger.  This VI reads a thermocouple voltage and internal conversions using DAQmx and a CYC edge to give a reading of simple temperature.  My problem is that I want to use this temperature in an another VI, then I want to make a global variable of temperature of LabVIEWTempLogger.  How to set a global variable such as temperature of LabVIEWTempLogger?  Thank you!

    You must get out of the recorder temperature VI the DAQ Assistant. Put it in a Subvi if you wish.

    Your main VI has some problems. The first fact a comparison is equal to the current temperature. Never make an equal comparison on a floating point number. Use in the range and force.

    The local 'Set Temp deg C' should be replaced by a wire from the Terminal. All local variables should be replaced by a wire. You can easily have the cable terminals from outside the main loop.

    Can't the difference in code in the States True and False when you read voltage.

    Don't use VISA bytes to the Serial Port. It's just bad style. You programmed it for a terminal character LF to get rid of fixed forward and set the number of bytes to read at a high number. Playback will wait until the stop character is detected and then automatically end.

    Finally, you have already created a world so I do not understand your questions about it.

  • Code conversion code VB6 of NIDAQ DAQmx.

    OK, it's time.

    We have two machines running Windows XP and a VB6 written inhouse application, which controls a card PCI-6704 D / a card, using traditional NIDAQ.  These machines are replaced by WIndows 7 machines.  I need help (i.e. orientation) on how to go about the conversion of these to traditional NIDAQ (calls to the nidaq32.dll function) to the new DAQmx.

    Please tell me that this is possible and also very easy to do

    Hello BorgWarnerNVH,

    It doesn't have a direct way to convert your code. You'll have to convert legacy code to correspondents DAQmx calls individually. Here is a link to useful information that you can use to find what functions match.

    http://www.NI.com/white-paper/4344/en

    There are parts to the article so be sure to scroll to the bottom where are the links to the other parts.

    Kind regards

    -Travis E

  • explain DAQmx WARNING 200035 conversion rates lower clock rate minimum?

    I'm sampling of data at 1 kHz on 3 channels using DAQmx read.  The DAQmx Read function returns a warning that:

    "Specified clock rate is lower than the minimum conversion rate of the ADC." Your data may be invalid.

    The material I have is a Multifunction PCI-6115 data acquisition of NOR.  If I am interested in signal above 100 Hz can I safely ignore this warning or what I taste to 50 kHz and then have labview re - sample data at 1 kHz?

    Hi, according to the specifications you are limited by a minimum of 20 kS/s sampling rate. anything weaker that should give you the same error, because this is a physical limitation of the card is using the internal sample clock.

  • DAQmx read - the values on the scale or not? Binary conversion.

    Hey everybody,

    I had a question regarding making the scale and the release of Renault. I use LabVIEW 2009 SP1, with a pilot DAQmx 9.0.2 and a X-Series card. I'm reading the data my DAQ and store it in a binary file.

    How is the acquisition of data read samples, in General? that is if I select NSamp NChan I16 2D Analog on my DAQmx Read, what kind of values can I expect if I was at the exit of the probe data? (Suppose I have readings in mV values and my overall fork's 04:55 V.) When he wrote in the binary file, what happens, what can I expect to see in terms of values - or maybe just descriptively?

    Overall, a little insight would be very helpful. I tried to troubleshoot asymmetric readings I received, so this will help me immensely.

    Thank you.

    Hi Matt87,

    Reading data as I16 will return the result adjusted, not calibrated for 16-bit ADC.

    If you want to write your own binaries, you'll want to include scaling of device - for series X, coefficients a 3rd order polynomial.

    Here are two examples that show how write to a binary file and read the data back.  In this example, scaling coefficients are stored in the file header:

    Continuous gain and voltage drop (binary) chart

    Graph of the acquired binary data

    That said, I would recommend that you look in the record feature integrated TDMS introduced in DAQmx 9.0.  The result is a file appropriate binary .tdms which is a standard format that can be opened in LabVIEW or in several other programs with the plugin.  See the following examples for how to use the function:

    Streaming data and log to the PDM file

    Continuously to log in a PDM file data

    The second example does not force you to read the data in the memory of LabVIEW and use the minimum CPU.  The first example allows you to see the data that is acquired.

    Best regards

  • adding channels to daqmx after conversion Express

    Hi all

    I am updating a VI I created a couple of years.  This is my first.  I used the VI Express DAQ.  I have received complaints about the computer hang up once in a while and thought it might be due to the Express.  So I used the LabView function to convert to individual tasks DAQmx.  Everything seems to work fine for the channels that were originally installed.  Now, we must add new channels to the reading.  Shot is high-level DAQmx icons in the main VI.  The second shot is the Subvi configuration of channel generated by the computer.  In AI voltage box you can see the channel, I'm adding, Channel 9.  Am I missing something obvious?  Thanks for the help.


  • Conversion of a VI that uses OR-DAQ traditional to NOR-DAQmx

    Hello

    I'm trying to convert a VI that uses OR-DAQ traditional to NOR-DAQmx.  I'm almost there, but when I run my new rear version number 'read' and 'scan' are not the same.

    In the original version the "number read" always came back as 1 and "scan" backlog is always returned as 0.

    In the new version, "number readings" and "rear scan" could come back with any value.  It's sure to shake my recording of measures and VI the interaction with the rest of the program.

    I have attached a light version of the VI for the old OR-DAQ traditional and new OR-DAQmx that illustrate this problem.  The two VI is written in LabVIEW 2011 SP1.  I would be willing to upgrade to SP1 2013 LabVIEW if it would help solve the problem.

    I would be grateful for any guidance.

    Thank you in advance.

    I think I did.  Use-1 to erase everything in the buffer when the program is waiting for the countdown to the end and then just ask for 1000 measurements when the countdown reaches 0.  Do not need the Scan back or number reading.  Also don't need to add the measure in table 1 at a time because I get them all at once.

    I enclose a copy of my solution for all those who might need to do something similar in the future.

    Gary

  • Equivalent DAQmx claims NIDAQ orders

    Then I start to excavate in the VB6 code that has been written about 8 years ago by one of my engineering students.  Best I can tell, some of the first calls the NIDAQ functions are:

    INIT_DA_BRDS()

    AO_VWRITE()

    Basically, he checked to see if the status returned by the INIT_DA_BRDS() has led to a valid installation (by returning a code number device valid).  If so, then we send a voltage to the Commission D/A, using the AO_VWRITE().

    So, who can tell me what are the equivalent DAQmx features?

    Hi BorgWarnerNVH,

    I can see in this link: VB6 NIDAQ-DAQmx Conversion you requested advice to convert this code, in fact, this document: transition is the most suitable for this conversion. The situation is that DAQmx in how to use the functions is different because we use tasks, so it is more difficult to find as an equivalent function. But I recommend to use examples of supported text code for vb6, here you can view the help NOR-DAQmx C API Visual Basic 6.0, you have installed?

  • Scalar true/false conversion

    I would like to convert a transient scalar to a true/false variable.  To clarify, I would take a scalar time-variables and pass the value of the zeroeth little to a true/false variable, which can then be transmitted to a device of digital line out.  The camera has solid state relay and its DAQmx driver requires a contribution from true/false and does NOT have a scalar or digital signal.  It seems to me that it is a very simple c language's intrinsic function call.

    I looked at the functions SE steps-analyze-analog-formula but they always output a different scalar.  Stage outputs triggering a true/false momentarily and do not lock.  Limit test has an output of true or false, but it is for all the samples in the whole of the scalar and not any a scalar value.

    Any suggestions?  or better yet, can someone send a simple vi LV that performs this conversion of simple data?  Is there some utility vi hidden on the somewhere installation disc that can do this?

    Thank you

    I have acquired some clarification and solved my problem through integrated service of SE.  I can do exactly what I need through the 'Alarms' utility that treats momentary boolean True/False step of relaxing in a DIO locked signal on my PXI-6528 board.  Furthermore, I will explore using the result of 'software trigger' the utility of the alarm to work around the limits of the "reserved resource."  Thanks to all that at least looked at my problem.

  • Formula for conversion signal strain gage

    Dear forum users and employees of OR,.

    I'm fighting to check a formula used by DAQmx and LabVIEW for the conversion of a signal pledge of strain to the mechanical solicitations.
    Formula for strain is "eps" (type of full-bridge III: 4 elements, 2 x 2 in the same sense sequence):

    SPE =-2 * Vr / (GF * [(nu + 1) - Vr * (nu - 1)])

    See also '10. Full bridge III"here: http://www.ni.com/white-paper/4172/en/#toc10

    But if I try to reproduce this formula based on figure 1-15 in the page web related, I can simply this:

    VR = Vch/Vex = 1 / 4 * GF * (- nu * eps + eps - nu * eps + eps)
    => eps = 2 * Vr / (GF * [1 - nu])

    So either I make a mistake, either the formula given is faulty. The other formulas on the linked web page didn't quite work for me neither.
    As reference, take a look at this: "full bridge, 2 grids of longitudinal-2 cross, second to the last entry on this page:

    me-system/dms-bridge

    The formula NOR mentioned can be found here as well:

    NOR: Full-bridge Type III

    NOR: LabVIEW 2013 help Convert gauges read VI

    The formula I got for "eps" was posted by the employee OR in a different context (with a negative sign):

    post on the Forum

    Can someone there explain further?

    Good day!

    Hi Wimba,

    the formula that you describe is for folding (Type II) and not for the axial deformation of (Type III).

    You must take into account that the voltage should be descriebed in the form of the restistors report.

    See the Wheatstone bridge for that.

    Hope that helped.

    Anna

  • NI DAQmx 9209 sampling rate

    Hello! I need to monitor 8 channels of analog input with a NI 9209 module inserted into a unit of the cDAQ. I have 5 channels with CSR terminal config channel + 1 also as CSR but different range and 2 channels with differential terminal config. I'd like to try these 8 channels with a frequency of 5 Hz. The maximum speed I can get is now slightly below 2 Hz above, unless I change the DAQmx ADC synchronization in high speed Mode. In this way, I get the required speed. I would like to know what is the compromise of accuracy how much I lose? I was able to check the accuracy of my sensors, and it is easily possible that I'm still OK with lower accuracy of DAQmx ADC. How can I get this information? Is there a whitepaper, or the property DAQmx node to read? Thank you!

    Check the voltage (of events) - example of continuous input, you can find it in the Finder for example of OR. The vi has changed my life DAQmx, . Using a version heavily modified VI I could permanently acquire 8 channels each 2MSa/s continuous with a portable 10 year old.

    In any case looking at the datasheet, it probably not will help you with the Mode high resolution. The data sheet gives time to conversion by channel for mode high speed as 2 ms, or his 500s. For 8 channels, gives you a 62.5 Sa/s max speed. For high resolution, the conversion time is 52 ms per channel or 19.2 Sa/s. For 8 channels, it gives its 2.4 Kbps, or what you saw earlier.

    The moral of the story, you know, so if you want 5 rate of Sa/s while you need mode high speed.

    See you soon,.

    McDuff

  • Need help to convert DAQ DAQmx hardware

    Hello

    I've struggled with traditional DAQ to DAQmx conversion for two weeks. I really need a help.

    As you can see in the image below, I tried to replace the old VI with new ones. But it does not work. Of course, the VI below is just a part of my VI. VI according to case structure are inside the while loop.

    Could you please give me who thought why it does not work?

    FYI: The strange thing is that it works without any error messages, but there is no real output (values on the graph, the data in the tables, etc.).

    Thanks in advance.

    Best,

    Jay

    Hi Jay,.

    Assuming that the code DAQmx and traditional DAQ are screenshots of screws separate, I think as the following each driver setting playback functions would explain the different behavior than you (you) see both the value - 1:

    Traditional DAQ:

    DAQmx:

    So when you give DAQmx Read - 1 "number of samples per channel" when you run a primary task, the effect is that it will return some data are available at that time DAQmx Read is called.  In your case, it's immediately after starting the task so it could very well be 0 samples available in the buffer.  I imagine you'd see data if you change the value of this parameter of-1 for the number of samples you want to read.

    That being said, if you want to continually acquire you should call DAQmx Read from inside a loop.  I agree with others that you should take a look at the DAQmx shipping examples to get started, you'll probably find something very close to what you want to do.  You can find examples at:

    Help > find examples... > input and output material > DAQmx

    Thanks for posting, hope this helps!

    -John

  • Problem with the release of DAQmx not adjusted

    Hello

    I'm trying to convert a recording program generally written in Labview to exit of the floating numbers of unsigned integers. I use the DAQmx read where I choose the unadjusted output (2D U16 NChan), the Board of Directors is a PCI-6023E. I have the program running, but the output is a little strange. The input range is of +/-10 V. For positive voltages I get integers from 0 to 2047. For negative voltages I get integers from 2 ^ 16-2048-2 ^ 16.  I want to have is of course 0-10 V and 4096 for 10 V. I'm looking through the different options in lu DAQmx etc. without a bit of luck. If someone has an idea that could shed some light on my problem it would be greatly appreciated.

    Best regards

    PAL Egil

    The type U16 represents numbers as unsigned quantities.  In particular, I16 (signed integer) value of-1, hexadecimal FFFF, is 65535.  If you save the values as I16 (assuming this is possible with your device) or simply convert (using the auxiliary palette of Conversion of the digital palette) I16, I think you get what you expect.

    Bob Schor

  • conversion of LabVIEW 8.5 in 2012

    Hello

    I'm trying to convert my application written in LabVIEW 8.5 with NOR-traditional Daq OR DAQmx LabVIEW 2012.

    You can find the code as an attachment

    Thank you

    Are you aware of that very specific baord is available for applications for upgrading / downgrading.

    http://forums.NI.com/T5/version-conversion/BD-p/VersionConversion

    In addition, a VI that is created in LabVIEW 8.5 version can be opened in the 2012 version & later recompile (upgrade) it.

    Edition: Find VI improved with DAQmx functions in the attachment.

  • Medium-sized dynamic data analog input read DAQmx read

    Hi, I'm new to labview. Is there an easy way to index using the dynamics of data returned by a readout DAQmx x samples to calculate a moving average? My thought was to read the analog input for X samples pump with the data in another loop through the data, but I can't quite understand how index using the returned data set to extract the measurement value double returned for each sample.

    Any ideas on that?

    Thank you...

    If you get a type of waveform data, why did you ask on dynamic data? No, of course not would you use the conversion of dynamic data on a waveform.

    If you want only one channel, then your DAQmx Read could be changed to 1Chan NSamp. If your channel list only has one channel, you will get a table 1 d with a single element that can be indexed. To get the average of a waveform use the statistical function with the waveform. You use the average Point by Point, and not the average function that has a table for an entry.

    Make sure you always have context-sensitive help on. You can avoid many of these rookie mistakes simple.

Maybe you are looking for