Quantcast
Channel: LabWindows/CVI topics
Viewing all 5336 articles
Browse latest View live

Help crashes, how to repair?

$
0
0

Wow, now my Help window is crashing CVI repeatedly.  Here's how I can do it, no matter what project is loaded (even example projects):

 

1) Click the Search tab

2) Find "SendMessage" 

3) Double click the one result

4) Crash-ola

2015-01-29 15_30_05-NI LabWindows_CVI Help.png

 

I've seen a few mentions around here to "repairing a CVI install", but I can't actually find instructions for how to do so.

 

I've been having a lot of CVI 2013 stability issues, which make me think it's time to repair my install.

 

Ideas?


Is there any Excel Library files to generate excel file?

$
0
0

Hi,

 

Im trying to generate an Excel report file. Can any one please suggest me how to create/generate .xls file with CVI API's.

I wanted to do this without the help of Microsoft Office.  My machine is not installed with MS office. 

 

Thanks,

Nayana

RFSA peak power measurements

$
0
0

I am trying to take simple frequency and power measurements of a CW at 836.52Mhz.  I am using the CVI spectrum example and would like to add some frequency and power measurements to it.  I have the spectrumDataPtr array that is being plotted.  How can I extract peak power and frequency data from this?

Error launching excel 2013

$
0
0

I just upgraded my working laptop. Installed latest LabWindows. Tried to run Excel report demo application, but got error message: "An error occurred trying to launch Excel through its automation interface. Ensure that Excel is installed and that you can launch it manually."

I have Microsoft Office 2013 installed, and I can launch Excel 2013 manually. I think LabWindows supports Excel 2013. Can anyone tell me what is wrong. Do I need to change any settings for LabWindows or Excel? Do I need to be Administrator?

 

Thanks,

Jie.

remove function - Access denied

$
0
0

hi,

I try to delete a file after constructing the file name based on info passed into the function.  it fails.  in debug mode, I can see that the file name is correct.  I narrow the problem down to this:

 

if I use a local char this way:

 

char *ThisFile = "C:\Inetpub\ftproot\Saved Settings\zz.txt";

int status = remove (ThisFile); 

 

The content of ThisFile is corrupt as shown in the picture - file 1.  But if I use it this way:

 

char *ThisFile = "C:\\Inetpub\\ftproot\\Saved Settings\\zz.txt";

int status = remove (ThisFile); 

 

It succeeds, but the content of ThisFile changes, as shown in the picture - file 2.

 

Problem: I pass the Folder Name into the function as a string, whose value is seen as:

 

C:\Inetpub\ftproot\Saved Settings\

Then I construct the file name from it.  It fails all the time.  The removal of the '\' character is to blame, as the local method works with the '\\' in place.  What can I do in this case?  I do not encounter this problem with remove() function.  Other functions like fgetc() and fopen() do not give me this problem.  Please help.

changing table column order during runtime?

$
0
0

I'd like to know if anyone has been able to allow the user to resort a table's column order during run time?  Sort of like you can with MS Excel.  This could be very handy.

 

I think this could be done with a combination of copy/pasting all the cells of a table, but it would be very labor intensive.

IMAQ and VISION 64bit typedef redefinition

$
0
0

Hi, 

 

    I am writing a program that uses NI-IMAQ drivers and NI-Vision functions. There is a problem when I compile for 64 bit I get: 

 

"nivision.h"(2444,23) error: typedef redefinition with different types ('unsigned long' vs 'uInt32' (aka 'unsigned int')). 

 

I can see in the header files that these types are defined in both files, but I can't seem to find a way around this. This is caused by a 64bit compiler directive and this does not happen when compiling for 32 bit. 

 

Any suggestions. I am at a loss on this one. 

 

Thanks,

 

Drake

using 3 sets of NI9162+NI9263 with CVI

$
0
0

I am looking to use 3 sets of NI9162+NI9263 with CVI, outputing 12 analog lines.  The example I find only has 1 line.  Please help.

The example I look at is:

.....NI-DAQ\Examples\DAQmx ANSI C\Analog Out\Generate Voltage\Cont Gen Volt Wfm-Int Clk


Is there any easy way to get Seconds from a Date/Time string?

$
0
0

I have 2 strings of the following format that I would like to convert to seconds (since 1900). I need this value to set the t0 on a plot.

 

Date: "06-30-2014"

Time: "16:06"08"

 

Is there a CVI function that will do this conversion for me? If not, is there an easy way to do it?

 

Thanks!

DAQmxFailed - cannot find definition

$
0
0

I cannot find where DAQmxFailed() function is defined.  Apparently, it is used all over the place.  Please help.

NI-CAN 64 bit

$
0
0

Hello,

 

one of my projects is a data acquistion and control software that includes several CAN modules. I want to migrate this project to 64 bit. One of the problems seems to be that the CAN library that installs with CVI is not available in 64 bit.

 

When asking in the CAN forum I was told that I'd better move to NI-XNET... Before starting to learn new stuff I wanted to hear the recommendations of CVI users or the NI-CVI team...

 

Thanks!

 

Window Minimize and Restore issue

$
0
0

Hi Dear CVI experts.

 

I'm using this configuration : CV 2010 (SP1) on Windows 7 (32 bit).

 

I noticed a strange behaviour similar to the one in this thread:

http://forums.ni.com/t5/LabWindows-CVI/Minimize-Maximize-Restore-window-bug-with-CVI-8-5-1/m-p/802515/highlight/true#M38176

The mentioned one seems to only have the problem that window content is not being drawn correct after restore. In my case the window keeps completely invisible.

 

Here a description to reproduce the problem:

- Start an application with a main window, with Window-Zoom maximized.

- Click on the application icon in the taskbar to hide the window.

- Clicking again on the application icon in the taskbar doesn't bring the window back - it stays invisible.

This effect only happens when the title bar of the window is visible. When the titlear is not visible, it works correctly. When the window is being minimized by the buttons on top right of the window there's also no problem.

 

Is this a known issue that has already been fixed or does a workaround exist ?

 

Best regards

 

   Tom

 

P.S.: My colleague has CVI 2013 installed and we could reproduce the effect also on his machine

 

 

 

 

 

ring-control selection don't work. can't select any other items except the first item.

$
0
0

dear cvi-programmers,

 

i 've some problems with a simple ring control in a cvi panel. the ring has multiple items. no matters which item i select, the result will always be the first item. i can't select any other item than the first one (i'ts not necessarily the default-item).

when i redraw the panel, it works for the next few days. but somday in release-built (production-application) the ring control selection no longer works. when i start the uir-file in the labwindows cvi gui editor i can understand the problem. Even in the "operate" mode i can not select any other items than the first one.

when i convert the ring-item into another ring (F11-Key), and then convert it back into the original it will work again (1-2 days).

 

when the problem appears, the file content is still the same!

 

i also redraw the panel in different versions of labwindows cvi (2010/2012/2013), still the same problem.

 

other ring-control on different panels (several controls more), never came up whith this effect.

 

any guys out there whith the same problem?

 

the corrupt uir-file is in the appendix.

 

thank you !

 

kind regards,

 

lukas roeder

 

 

ContGen-IntClk - DoneCallback

$
0
0

I am following this example code, ContGen-IntClk.c.

 

#include <NIDAQmx.h>
#include <stdio.h>
#include <math.h>

#define     DAQmxErrChk (functionCall)      if( DAQmxFailed(error = (functionCall)) ) goto Error; else
#define     PI                              3.1415926535       
#define     DAQmxFailed(error)              ((error)<0)  

int32 CVICALLBACK DoneCallback (TaskHandle taskHandle, int32 status, void *callbackData);

int main(void)
{
    int32           error               = 0;
    TaskHandle      taskHandle          = 0;
    float64         data        [1000];
    char            errBuff     [2048]  = {'\0'};
    int             i                   = 0;

    for (; i < 1000; i++)       data [i] = 9.95 * sin( (double) i * 2.0 * PI / 1000.0);

    /*********************************************/
    // DAQmx Configure Code
    /*********************************************/
    DAQmxErrChk (DAQmxCreateTask            ("",&taskHandle)                                                    );
    DAQmxErrChk (DAQmxCreateAOVoltageChan   (taskHandle,"Dev1/ao0","",-10.0,10.0,DAQmx_Val_Volts,NULL)          );
    DAQmxErrChk (DAQmxCfgSampClkTiming      (taskHandle,"",1000.0,DAQmx_Val_Rising,DAQmx_Val_ContSamps,1000)    );
    DAQmxErrChk (DAQmxRegisterDoneEvent     (taskHandle,0,DoneCallback,NULL)                                    );

    /*********************************************/
    // DAQmx Write Code
    /*********************************************/
    DAQmxErrChk (DAQmxWriteAnalogF64        (taskHandle,1000,0,10.0,DAQmx_Val_GroupByChannel,data,NULL,NULL)    );

    /*********************************************/
    // DAQmx Start Code
    /*********************************************/
    DAQmxErrChk (DAQmxStartTask(taskHandle));

    printf      ("Generating voltage continuously. Press Enter to interrupt\n");
    getchar     ();

    Error:

    if ( DAQmxFailed (error) )
    DAQmxGetExtendedErrorInfo (errBuff,2048);

    if ( taskHandle != 0 )
    {
        /*********************************************/
        // DAQmx Stop Code
        /*********************************************/
        DAQmxStopTask   (taskHandle);
        DAQmxClearTask  (taskHandle);
    }

    if ( DAQmxFailed(error) )
    printf  ("DAQmx Error: %s\n",errBuff);

    printf  ("End of program, press Enter key to quit\n");
    getchar ();

    return 0;
}

int32 CVICALLBACK DoneCallback (TaskHandle taskHandle, int32 status, void *callbackData)
{
    int32   error           = 0;
    char    errBuff [2048]  = {'\0'};

    // Check to see if an error stopped the task.
    DAQmxErrChk (status);

    Error:
    if( DAQmxFailed (error) ) 
    {
        DAQmxGetExtendedErrorInfo   (errBuff,2048);
        DAQmxClearTask              (taskHandle);
        printf                      ("DAQmx Error: %s\n", errBuff);
    }

    return 0;
}

 

I would like to ask what generates the call to DoneCallback() function.  Thanks.

DAQmxWriteAnalogF64() - array & number of samples

$
0
0

I plan to use DAQmxWriteAnalogF64() to output AO to my device.  This is part of the code that generate the AO:

 

    // DAQmx Configure Code
    DAQmxErrChk (DAQmxCreateTask            ("",&taskHandle)                                                    );
    DAQmxErrChk (DAQmxCreateAOVoltageChan   (taskHandle,"Dev1/ao0","",-10.0,10.0,DAQmx_Val_Volts,NULL)          );
    DAQmxErrChk (DAQmxCfgSampClkTiming      (taskHandle,"",1000.0,DAQmx_Val_Rising,DAQmx_Val_ContSamps,1000)    );
    DAQmxErrChk (DAQmxRegisterDoneEvent     (taskHandle,0,DoneCallback,NULL)                                    );

    // DAQmx Write Code
    DAQmxErrChk (DAQmxWriteAnalogF64        (taskHandle,1000,0,10.0,DAQmx_Val_GroupByChannel,data,NULL,NULL)    );

    // DAQmx Start Code
    DAQmxErrChk (DAQmxStartTask(taskHandle));

 

Questions:

1. DAQmxCfgSampClkTiming() specifies a number of 1000 samples with a rate of 1000 samples/second.  dataLayout is DAQmx_Val_ContSamps, which is generate samples until task is stopped.  Does this mean that the input array that I pass into DAQmxWriteAnalogF64() must have a size of 1000?  This is single channel.

 

2. Say if I use a total of 4 channels, each has 1000 samples, then my input array must have a size of 4000, while my sampling rate remains at 1000 samples/second, correct?

 


info NIDAQmx_NewPhysChanAOCtrl() not found

$
0
0

I use F1 to find info on the NIDAQmx_NewPhysChanAOCtrl() function.  Nothing is found.  Can anybody help?

Text Message with indice letters

$
0
0

Dear all,

With Labwindows CVI, I would like to write a text which contains indices.

I would like to write  for example Ipkpk, where pkpk is written as an indice, like the first text message in the attached image(or like the code I_{pkpk} of Latex).

Thank you so much for any help.

Best regards,

 

 

 

Network-Shared Variable - read string with CVI

$
0
0

I need to read an NSV string with CVI.  I have been digging into accessing and writing NSV with CVI, but they are all scalar value.  What should I do with strings, clusters and arrays?

scan from string with delimiters

$
0
0

I want to scan a string which is made from a fixed number of strings comma separated.

For example

source string = str1,str2,str3,str4

I want to extract the four strings "str1", "str2", "str3" and "str4".

 

The problem is that one (or more of the strings) can be empty.

For example

source string = str1,str2,,str4

I want to extract the four strings "str1, "str2", "" (i.e. empty string), "str4"

All the functions I tested (sscanf, Scan , strtok) handle multiple occurrences of delimiter as single occurrence and so I get

"str1", "str2", "str3

 

Which function can I use?

Capture Events Not Sent to Panel

$
0
0

Is it possible to capture ALL mouse events sent to any application, not just the events directed to my panel?  Ideally I would also like to be able to cancel them so they do not get processed, or perhaps at least change the coordinates to (0, 0) so they don't do anything.

 

Tony G

Viewing all 5336 articles
Browse latest View live


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