Tensions of reading in a USB6210 with CVI

I had this card works fine until I connected to other devices.

the first 3 entries are connected to load cell amps, and the fourth to measure the power of the load of appling machine test for load cells.

Its when I conect on the test machine, the tensions are going in all directions.

I have the inputs wired in differential mode.

I'm entered in panels of Test and differential selected and then run the program and then selected create a task so that I could choose four starters and all channels read ok.

So what I think I need is a way to configure my code to set the USB6210 to be in differential mode.

I tried the examples OR and can not find an example.

This is the code I use to set up the USB6210

Int32 error = 0;
TaskHandle taskHandle = 0;
Chan Char [256];
float64 min =-10.0, max = 10.0, rate is 10000.
uInt32 sampsPerChan = 100;
Seek_set Int32, a;
uInt32 numChannels.
float64 * data = NULL;
The int journal;
char errBuff [2048] = {'\0'};
uInt32 i;
float Floatnum;
NumString char [30];

/*********************************************/
DAQmx Configure Code
/*********************************************/
  
DAQmxErrChk (DAQmxCreateTask("",&taskHandle));
DAQmxErrChk (DAQmxCreateAIVoltageChan(taskHandle,"Dev1/ai1,Dev1/ai2,Dev1/ai3,Dev1/ai4","",DAQmx_Val_Cfg_Default,min,max,DAQmx_Val_Volts,));
DAQmxErrChk (DAQmxCfgSampClkTiming (taskHandle",", rate, DAQmx_Val_Rising, DAQmx_Val_FiniteSamps, sampsPerChan));
DAQmxErrChk (DAQmxGetTaskAttribute (taskHandle, DAQmx_Task_NumChans, & numChannels));

If ((data = malloc (sampsPerChan * numChannels * sizeof (float64))) == NULL)
{
MessagePopup ("error", "not enough memory");
GoTo error;
}
/*********************************************/
Starting code DAQmx
/*********************************************/
DAQmxErrChk (DAQmxStartTask (taskHandle));

You will need to use:

DAQmxSetChanAttribute (taskHandle, "", DAQmx_AI_TermCfg, DAQmx_Val_Diff, 0);

This will have an impact on all channels in the task.

Tags: NI Software

Similar Questions

  • Performance of CVI 2013 SP2 with CVI 2015 - Windows XP problem

    I see that XP isn't an operating system in 2015 of the CVI.

    Most of our PC are Win7 now, but we have some legacy units which require XP due to a limitation of external controller processor.

    Is is possible to generate executables in 2015 CVI which will work correctly with the runtime of 2013?

    Alternatively, CVI SP2 from 2013 and 2015 CVI co-exist on the same PC development?

    I would not get stuck with CVI 2013 SP2 for the future just to maintain a few predictable XP-based PC.

    Hi Shr,

    I recommend reading through this community's message: https://decibel.ni.com/content/docs/DOC-23955

    Essentially, you can develop a code in CVI 2015 but set the executable to run on previous versions of the Run-Time Engine. Note that the older version of the RTE of Side-by-Side CVI is 2012. You can indeed install previous versions of the CVI on the same computer. The shared runtime will be set to the latest version. Other versions will be side-by-side. The code is not guaranteed to work with previous versions of the RTE so be sure to test the code locally before moving on to another computer.

  • Warning of 'Empty Declaration' ShObjIdl.h with CVI 9.0

    Just installed CVI 9.0 and now my project generates a warning of 'Empty Declaration' in ShObjIdl.h on line 1330

    I am including shlobj.h to support the use of SHGetFolderPath() and shlobj.h consists in turn ShObjIdl.h

    I think I have the same options as before compiler with 8.5.1.  I note that there is a new version of the SDK with CVI 9 probable factors in the explanation.

    Is this a cause for concern?

    -Ian

    Oops. It seems that I did a copy/paste error in this post, and Ian never called me on this subject. As I said, he must add a #define, not a typedef:

    #define tagSHCONTF shcontf_dummy {shcontf_dummy} shcontf_dummy_typedef; tagSHCONTF Enumeration
    #include

    Sorry about that.

    A. Mert

    National Instruments

  • How to read and write FileGlobals with TestStand ActiveX control in c#

    Hello everyone,

    I'm trying to read and write FileGlobals with TestStand ActiveX control in c#.

    I tried with:

    SequenceContext contextOfTraceMsg = e.thrd.GetSequenceContext (0, out frameId);

    var filepara = contextOfTraceMsg.FileGlobals.GetSubProperties ("ProjectParameter.NestIsTested", 0). GetValue (1); (NestIsTested is an array of Boolean)

    but without success.

    Can someone tell me how to do it right?

    Thank you in advance!

    Concerning

    0049 wrote:

    Hello Doug,

    Thanks for the reply.

    It works to read a Boolean value. How to read the table of Boolean?

    Kind regards

    For a table you can either do:

    (1) myarray [] bool = contextOfTraceMsg.FileGlobals.GetValVariant ("myarray", 0);

    Or

    (2) using GetNumElements() and GetValBooleanByOffset().

    -Doug

  • Web server with CVI

    Hello

    I want to know if it is possible to create a webserver with CVI so that I can connect my application and see the data with internet Explorer?

    Backround: we run a CVI-application on a computer within a network. On this computer, collect US data from different systems and publish these data in a sign of the CVI. Users who want to see the data, connect to the computer with a remote control software.

    Now, we wondered if it is possible to create a web server with CVI. And if the user cannot see the data on his computer using internet Explorer.

    In the forum, we found a few messages very old. Are there new items on this subject?

    Thank you

    Oliver

    As far as I know that it is not supported at the moment.

    And there is the suggestion of product requiring a few laurels ;-)

  • Shortcut to launch with CVI

    Hello
    Comment do pay to run a shortcut from the desktop with CVI?
    The application launched by the shortcut must take into account the field "start."
    For example: An Excel shortcut, if the field "start in" = "c:\". ».
    the box open or save in Excel by default will be the path "c:\". »
    ("in so of course Excel - Options - general - folder by default =" ")

    Thanks for the help

    Hello

    I managed to do what I wanted with the ShellExecute command

    (HINSTANCE) ShellExecute
    HWND hwnd,
    LPCTSTR lpOperation, //Executable
    LPCTSTR lpFile,
    LPCTSTR lpParameters,
    LPCTSTR lpDirectory, //Repertoire of work
    INT nShowCmd
    example:
    hResult = ShellExecute (handle,
    "open."
                                           "" C:\\Program c:\Program Files\Microsoft Office\\Office\\EXCEL. "» EXE",.
    NULL,
    "C:\\My documents,
    SW_SHOWNORMAL);

    Thank you still pay your help.

  • Alignment of memory with CVI 2013 problem

    Hello

    I just installed 2013 CVI from CVI 2010 and opening my old projects, I'm in trouble with the alignment of the memory.

    Not in all the projects that I opened, I get the problem, and I'm quite confused about this.

    I used to keep in line with the limits of 1 byte of memory and I have thousands and thousands of saved file with this method.

    I have prepared a very simple project (attached to this post) to illustrate the problem, consider that the result would have been with CVI 2010 'occupation of 5 bytes.

    Pragma pack() change his behavior?

    Y at - it a flag set in the Options menu or elsewhere?

    If anyone has a suggestion please help me.

    Thank you

    Sergio

    Hello

    I found the problem, there's a semicolon that follows the directive of preprocessor #pragma pack (1), and it causes the pragma is ignored.

    Remove the semicolon, everything works fine.

    Sorry!

    Sergio

  • How to read several channels simultaneously with a minimum

    Hi all

    Please see the attached file. In fact, this is a simplified example of my real application, I didn't understand the second half to reduce the complexity.

    As demonstrated, I have two entries of analago I need to read (position and acceleration) with a SPECIFIC requirement which is:

    At the same time, I make some decisions based on data more recently acquired in the "timed loop. The decision part is not included in this vi. for simplicity. But the fact is that I just need the most recent data (as well as online) make a kind of decisions.

    Everything seems fine and it seems that I collect data in a way desired interval of 1msec. BUT I just discovered that the data I read (in the timed loop) are the most recent one compare is not to the real sensors. In other words, there is a delay in the acquisition process. The value in the timed loop is like 100 msec delayed the release of real sensor, which is generated by the sensor and acquired by DAQ card.

    This problem makes my decision making part of constantly decide according to the before value of 100 msec. Unfortunately, it's terrible to my request, i.e. it is an intolerable delay to the process.

    Are my settings of data acquisition as samples per channel, the number of samples per channel or right of sampling rate? I appreciate if someone can help me with this application. I just need to collect data at 1 kHz, as close as possible in real-time (online) or with a minimum delay, not 100 msec.

    Thank you.


  • How to convert times from second to hh with CVI

    How to convert times from second to hh with CVI?

    Can anyone advice?

    It's here. As I told you, it's very simple:

    //----------------------------------------------------------------------
    // Function secToHMSstring ()
    //----------------------------------------------------------------------
    /// HIFN secToHMSstring ()
    /// HIFN The function takes an amount of seconds and returns a string with
    /// HIFN the corresponding value in H:M:S format
    /// HIPAR sec/Value in seconds to convert
    /// HIPAR verbose/If True use "hms" separators; if not, use ":" separator
    /// HIPAR string/The output string. It is responsibility of the programmer
    /// HIPAR string/that the string is large enough to keep the resulting text
    /// OUT string
    void secToHMSstring (int sec, int verbose, char *string)
    
    {
        int     hh = 0, mm = 0, ss = 0;
    
        if (sec >= 3600) {
            hh = sec / 3600;
            sec -= hh * 3600;
        }
        if (sec >= 60)
            mm = sec / 60;
        ss = sec - mm * 60;
    
        strcpy (string, "");
        if (verbose) {
            if (hh > 0) sprintf (string, "%s%dh", string, hh);
            if (mm > 0) { if (strlen (string)) strcat (string, " "); sprintf (string, "%s%dm", string, mm); }
            if (ss > 0) { if (strlen (string)) strcat (string, " "); sprintf (string, "%s%ds", string, ss); }
        }
        else {
            if (hh > 0) sprintf (string, "%s%d:", string, hh);
            if (mm > 0) {
                if (strlen (string)) sprintf (string, "%s%02d:", string, mm); else sprintf (string, "%d:", mm);
            }
            else if (strlen (string))
                strcat (string, "00:");
            if (strlen (string)) sprintf (string, "%s%02d",  string, ss); else sprintf (string, "%d", ss);
        }
    
        return;
    }
    
  • Sapera LT with CVI

    Now this is heresy...

    Anyone could use a framegrabber DALSA and the Sapera LT C programming API to capture video from a CVI application?

    DALSA announces a C API language, it is not certain that it is possible to work with something else using PVC as a C compiler (which it can do - PCV is also a compiler C89 but not a C99 compiler).

    Thank you.

    You can do with the api of 'base' which is a Sapera ANSI C interface.  I had to UNDEF as some multiply integer type limits, then he compiled, linked and ran everything is OK.  I used the interface "framegrabber' rather than the 'camera' interface or"peripheral"to catch a ground test on a simulator.  I used the CCA and .cvi files that I created using CamExpert.

    I did it with CVI 9.1, WinXP SP3, will undermine LT 7.0.0, X 64 driver 1.5.  Works with single and double head X 64 acquisition cards.

    So using a framegrabber NOR is nice, it is also possible to use a framegrabber DALSA of CVI.

    Menchar

  • Sapera LT used with CVI

    Is that what someone has successfully used vision of DALSA, Sapera LT, with CVI library?

    Sapera LT supposedly has a C language interface.

    I have this poster in the forum of machine vision, but he seems to be more a SW problem (if, indeed, there are problems) a matter of HW.

    In principle, any standard interface of C (C89) should work with CVI I think... If it's for a framegrabber DALSA, or anything else.

    I was just curious if anyone had tried this specific thing, and if so, how it worked.

    Thank you

    Menchar-

    It turns out that you can use Sapera LT with CVI 2009.  You use the api 'base' which is an interface in ANSI C with the export header file and import for the DLL library is involved.  During compilation, I found 6 #defines which were redefined to somehow - the limits they were constant max on the different types of integers.    It seemed the stuff of limits.h, but it wasn't - I never figure out how or where he defined twice, so I just #undef had these just before the place where was held the redefinition and the problem disappeared.

    I was unable to use the framegrabber as a "camera" (peripheral), I used as a 'framegrabber"and loaded separately from the configuration files CCA and .cvi instead of a camera (.ccf) configuration file.  I have hooked up to a simulator CameraLink and grabbed a focus, then he wrote on the disk.  A close inspection of the data showed that it was seizing everything is OK.

    I used the 1.5 LT Sapera 7.0.0 and X 64 driver version.

    So I feel pretty good about this so far.

    Menchar

  • I can't read my dvd - r with windows media player

    I can't read my dvd - r with windows media player.  Any help much appreciated.  Thank you.

    I can't read my dvd - r with windows media player.  Any help much appreciated.  Thank you.

    See KB article: -.
    You cannot play a DVD - RW or a DVD + RW disc using Windows Media Player or Sonic CinePlayer

  • MediaPlayer 12 on Windows 7 laptop playing my DVD with the sound; MediaPlayer 11 Windows XP desktop reads the DVD even with no sound: WHY?

    MediaPlayer 12 on Windows 7 laptop playing my DVD with the sound; MediaPlayer 11 Windows XP desktop reads the DVD even with no sound: WHY?

    Hello DebbieMarronYM,

    I suggest watching this thread where the poster had the same problem:
    Mind post x which is currently marked as an answer a lot of different solutions that can be useful.
  • Executable built with CVI 8.1 error-5093, the analysis library is not found

    Upgraded to 8.1 Labwindows/CVI of Labwindows/CVI 7.0 development machines. An earlier application was built using the ICB 7.0 and installed on a test computer. The same code built with CVI 8.1 is any error during execution of the function stdev, 5093 error code has been generated. (From analysis.h: LibraryNotFoundAnlysErr =-5093, / / the analysis library was not found.) Tried to build a facility with 8.1 and installation on the test computer and application errors still executing the stdev function. Back to the same application, but built with CVI 7.0, it works fine. Am I missing something with the build in 8.1 options? Or is it something in the workspace or project? Please notify. Thanks in advance

    Hi Tommy,.

    In CVI 8.0, the implementation of the analysis library has changed a static library that is linked to your .exe in a DLL that must be loaded when running. If you rebuild your source code and you want to deploy to another machine where the CVI environment is not installed, then you must re-create an installer in CVI 8.1 distribution, so that he can pack the analysis as well as your program library.

    You can confirm whether the analysis library is installed by searching for C:\Program NIUninstaller Instruments\Shared\Analysis\nianlys.dll in your target machine (although it is not enough to simply copy this file manually).

    When you create an installer in the CVI, be sure that, in the tab drivers & components in the dialog box change Installer , support of analysis element under the Group of LabWindows/CVI Run-Time Engine is checked.

    Luis

  • I can't read the .avi files with any program on my system.

    I can't read the .avi files with any program on my system. Have several programs that all of them played before September 2010, like the classic, windows media center windows media player media player, Director of windows, windows, 5.3, video programs video ulead dvd creating toshiba. Nothing works, frustrating not being able to download videos from two different cameras and burn them on DVD. I get an error of almost all the programs, saying that it was unable to load the required component, but I can't determine what this component. I tried to reinstall the codecs again non-joy.

    The free utility GSpot to identify the codec that created
    a .avi file... maybe it will help solve the problem:

    Download GSpot
    http://www.free-codecs.com/download/GSpot.htm
    (left-click the text: "Download GSpot")
    (on the next screen...
    left click: 'Download [GSpot 2.70]')

    You don't have to install it... just unzip the file and
    GSpot.exe left click to launch.

    GSpot Super quick start
    http://www.headbands.com/GSpot/v26x/Quick_Start.html

    Evaluation of video files and Codecs with GSpot
    http://www.windowsmoviemakers.NET/PapaJohn/68/GSpot.aspx

    Good luck.

Maybe you are looking for

  • Web page does not; probably due to some button / combination mouse click

    If we had a coffee spill on our laptop, which now causes some keys to support every now and then by themselves (quite often in fact), most often it is the Enter key that gets stuck. I believe that this 'feature' combined adequately with the mouse lef

  • Remove from the Apple tv.

    I want to delete the work of an album on my Apple tv. How please.

  • Toolbox signal Express

    We have no chance by adding controls to the interface of the operator.  We can add labels, text or ring, but not know, Numeric, drag or switch. -Always get the same error message "the specified action could not be completed.  Any suggestions?

  • Power adapter for the power of the Russia for WRT54GS & WRT310N

    I will travel to Russia this summer... someone knows if one or two of these router can take an adapter for use with different power which would be available in Russia? Thank you

  • I have the virus for Windows Activation Technologies. Now what?

    I read the previous posts on this problem and I ran Microsoft's Diagnostic tool with the following results Diagnostic report (1.9.0027.0):-----------------------------------------Validation of Windows data--> Validation code: 0x8004FE21Code of Valida