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

Library function error (NI-DAQmx dynamic link library NICAIU.dll)

$
0
0

Hello everyone,

 

I have searched for solution, but yet i have not found the right solution. So my problem is that i have been deveopling a program for a NI-DAQ device, which is working without any problem on the developer computer, however when i try to run the executable on a client computer i have the following problem: 

Untitled.png

When i install the NI-DAQmx driver 16.0, it works. My question is: 
Is there a way to use the programm i have made, which uses the DAQmx device, without installing the DAQmx driver? Is it possible to just include the neccessary .dll files in the executable? I hope someone can give me any advice.

 

Thank you in advance!


How to read a USB Port to detect a USB Key ?

$
0
0

Hello !

I am french and I develop a program on LabWindows/CVI 2013. 

 

I have to launch a file (aaaa.exe) when my program start. But this file (aaaa.exe) is located in a USB Key. So I have to read the USB Ports to detect the key, and after, find if the file (aaaa.exe) exists in the key. If the file (aaaa.exe) exists, I launch it. 

 

But I don't know which functions I can use to do this... ?

 

Thanks

Best regards

"Application stopped working" error exiting a CVI2012 program on Windows 10

$
0
0

Title says all: I just tried running a CVI2012SP1 application on my Win10Pro SP1 (1607) box and got the error on exit.
If I launch the debug on the error message I see this:
Screenshot 2017-05-19 11.37.33.png

Reported addres is out of my application range (map file reports addresses from 0x00400000 to 0x0059B11C).
If I run the program in CVI2012 IDE I get no error.

My machine has CVI2015SP1 installed with f1 patches applied (RTE version is 15.0.1.240), CVI2015 applications do not get any error on exit.

 

Is this error related to the "anniversary edition" error patched by f1 update? How does this affect CVI2012 applications, which indeed run on the 2015 full-patch RTE installed on the system?
If I run the application in the IDE I get no error on exit: may a simple recompile of the application fix the problem? Or may running the applications on Win10 with CVI2012RTE not cause this error?

Abstract data types - vector, list, stack, queue in CVI

$
0
0

Hi all,

I need to aggregate some amount of data.

I would like to use standard data structures because I have specific template of data to process. Are there any CVI libraries that already contain these datatypes? For now there is only List in "Programmer's toolbox" library in CVI.

 

Thanks for the support

 

Adjust driver to work on c#

$
0
0

Hello everyone,

I want to create some programme on c# that will help me to control Keithley Power Supply.

I have downloaded and installed the LabWindows/CVI 8.5 driver for Keithley 2306-VS Power Supply since I don't find nothing else except this one and one for LabVIEW. 

Is there any way to adjust this driver to work on c#? I have Visual Studio 2010.

It's my first time trying to do this, I will appreciate your help.

Thanks a lot.

 

 

How to save data in new columns in Excel

$
0
0

Hi everyone,

 

I'm a french student, working on Labwindows/CVI during my internship. I have a problem with Excel. Indeed, i found a way to save data from a table in CVI, i copy it to Excel (Data provides from a spectrum analyser R&S). However, if i want to save several data (631 points), in the end, i have only 1 column in Excel with the last measurement.

 

I would like to save the data in a new column everytime but i don't know how to do. Do I have to create a loop? if its the answer, I don't know quite well how to do this.

 

If someone can help me,

 

Matthieu

Interrupt Service Routine was called with 1.3ms latency

$
0
0

Our driver called the following API to install interrupt handler:

viStatus = viInstallHandler(aSession, VI_EVENT_PXI_INTR, pfRoutine, (ViAddr)parameter);

With the help of a PCI analyzer, I noticed that our Interrupt Service Routine pfRoutine was called with 1.3ms delay from when the interrupt was fired. I found that pfRoutine is actually a user space call back function. Our driver is in the User space too.

 

Is there a way to make a Kernel Interrupt Service call directly? Or we have to re-design our driver in Kernel space. How can we do it?

 

 

Access Excel Cell by Name

$
0
0

Has anybody accessed Excel cells by name rather than cell numbers? Similar to bookmarks in word.

 

I ahave created a data sheet template in excel. I fill in this template from xml data generated during a test run. I would like to use names as it can be more descriptive than cell numbers. 


problem to save SGL format image with imaqWriteVisionFile

$
0
0

Hi all,

 

 I have a floating point format (SGL format) grayscale image (with a very high dynamic) and I want to save it. When I try to save it with imaqWriteVisionFile function ( and I saw that normaly this function is compatible with SGL format) my debug prompt me a 'non fatal error' with 'error' due to an 'invalid image format'. 

 To save my image, I tried (and it worked) the imaqWriteFile function with .aipd file format, it's a NI proprietary format and I didn't find any compatible reader.

  Do you know how can I save my floating point grayscale image.

Thank's a lot.

David

Library of Custom Controls

$
0
0

I stumbled upon creating custom controls, and they seem perfect for putting together a library of commonly used, but not CVI standard controls for use by my team and I.  I have been able to create a custom control, but I had to make a .uir containing the control, and manually add it to the list of custom controls from the .uir.  I'm wondering if there is a way to share custom controls between multiple machines, without having to manually add the control from the .uir, and include the path to the source, header and template.

 

I want to essentially be able to build my own library of controls, much like the controls that already exist in toolslib\custctrl, and be able to have other people use those controls easily.

 

Thanks,

[CVI 2012] Files in project

$
0
0

Hi!

Is there a way to get a list of files that are part of a project?

 

Background: I want to automate some tasks when building my project. This includes running PC-Lint on all sources as well as generating documentation (using doxygen). For this it would be convenient, if I could use CVI's build process to generate a (text) file containing all the files that are part of my project.

 

Regards,

Thorsten

How to Automatically select ignore button when Non-fatal pop-up error occured.

$
0
0

Just want to ask how to select "IGNORE" button programmatically when non-fatal error pop-up occurred. thanks.

How to create a Kernel Space driver

$
0
0

Our current driver is actually a user-space driver. After build, it generates a dll, same as a library. I have following questions:

1. Is there a way to create a Kernel-space driver?

2. If there is no Kernel-space driver, how can we change the priority of the interrupt service routine and DMA setup procedures in the user-space to reduce the latency caused by the interruptions from other threads?

Timestamp from SQL to graph

$
0
0

timestamp graph.jpg

 

Hello,

 

is there a way to read a time stamp from a SQL database into a graph. So when I right click onto the graph and export to Excel, I would get the time as well? This would be some easy way to just get the times for a certain snapshot while the time keeps rolling by?

 

Cheers,

 

Steffen

One program and 2 icons in taskbar

$
0
0

Hi, everyone ! 

 

  I developed a program with a main panel and a classical structure. When the program start in the task bar I have 2 icons associated with my program.

    Right now I have no idea how to solve this problem -> one program - one panel - one icon in task bar. I posted a movie on youtube were I present this situation: https://youtu.be/9TqcRg910LU - to see correctly the movie select the quality of 1080p.

 

Please help me ! Thanks !


How to communicate with ARGOX printer?

$
0
0

Hello everyone, 

 

I have an ARGOX CP-3140L printer that I need to be able to communicate with using LabWindows, but I'm not too sure how to do this. 

 

I believe I can use "PrintTextBuffer" to do this, but I'm a little confused as to how to use this function. Can I write the PPLB code and use "PrintTextBuffer" to send this code to the printer?

 

Thanks!

CopyFile error code -9

$
0
0

Hi

I got recently the error code -9 from the CVI function CopyFile.

But in the Help description, it ends at -8.

 

Can anyone tell me what the return -9 means?

 

I use CVI 2013 SP2.

 

Best Regards

Pius

Releationship between sample rate and number of samples

$
0
0

I writing an application to write 60 Hz analog output signal to 9 channels. I picked 400 as the number of samples (

numSampsPerChannel) . I calculated the sample_rate using the relationship 

numSampsPerChannel = sampleRate * (1/ frequency). I calculated a sample_rate of 24000 which I used as input to  DAQmxCfgSampClkTiming functions. I used 400 as the number of samples per channel. I used the code below to get my data. When I plot the data for one channel, the 400 samples corresponds to only one sine wave. I had expected 60 sine waves which I thought was calculated using a one second interval divided by 400. To get the full 60 cycles, I need to set numSampsPerChannel the same as the sample_rate. I thought I had to follow numSampsPerChannel = sampleRate * (1/ frequency). When is this formula applicable? The program runs and does not complain about setting the sample_rate the same as numSampsPerChannel.

 

for (; i < numSampsPerChannel; i++)
	{
		for (; j < numChannels; j++) {
			offsetIndex = phaseOffsets[j] * PI / 180.0;
			if (j == 1) {
				data[j *  numSampsPerChannel + i] = amplitude[j] * sin((double)i*2.0*PI / (samplingRate / sineWavefrequency2) + offsetIndex);
			}
			else {
				data[j *  numSampsPerChannel + i] = amplitude[j] * sin((double)i*2.0*PI / (samplingRate / sineWavefrequency) + offsetIndex);
			}

			}
		j = 0;
	}

CVI 2017, strange behaviour in code editor.

$
0
0

I hope I'm not the only one experiencing a weird behavior in the freshly installed LabWindows/CVI 2017 editor window, on two different PCs.
When I delete a line, and move the cursor down the subsequent lines disappear, and then reappear with a very disappointing effect.
An image is better than thousand words, so here it is an animation that shows it. Here I moved only a single line the cursor down.

 

Bug_crop.gif

 

It get worse when you're in a hurry and move down the cursor down more than once:
bug2crop.gif

 

 

 

How I fixed " Undefined symbol '___CompiledDebuggingLevel' ..."

$
0
0

For reasons too long to explain here, I often link a static library compiled with debug option to my main programs.


If I forget to switch to release mode library and I build the release configuration occurs a single linker error:

error: Undefined symbol '___CompiledDebuggingLevel' referenced in "c:\program files (x86)\national instruments\cvi2017\bin\msvc\cvistart.lib".

As far as I can understand, the debug mode library expects that someone defines the variable.
This issue should have be corrected in 2012 (CAR 372694) but it still occurs in LabWindows/CVI 2017.


With a simple additional source file, I have resolved the issue so I can safely forget Smiley Happy to manually switch the static library. If you have the same issue, cut & paste in a .c file and add it to your program sources.

//
// DebugLevelPatch.c
//
// A patch to really fix issue 372694
// 
// By including this file in a LabWindows CVI project, you can avoid link errors
// that may occurr when you link a "release" executable with a static library that was
// built with "debug" options.
//
// The value of this variable is related to the "Debugging Level" setting in Build Options dialog box.
// We can know its values by printing it from a normal debug executable:
// No run-time checking = 1
// Standard		= 2
// Extended             = 3
// so the natural choice for a release mode executable is 1.
//
// If this could be included in "release mode" C startup code, it would fix the problem 
// in a more elegant way.
//
#ifdef NDEBUG
int __CompiledDebuggingLevel = 1;
#endif

 

 

Viewing all 5352 articles
Browse latest View live


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