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

Denkovi DAEnetIP4 web enable Controller

$
0
0

Hello,

 

Does anybody had experience with Denkovi DAEnetIP4 in Labwindows CVI Environment?

 

Regards,

 

levieg


CVI 2015

$
0
0

Hello,

 

I am trying to use  one application on windows 10.

 

1.Build Enviroment : windows 7 with CVI2015

The program built with CVI 2013 by using visual C++ dll and lib resource.

The program ran for a while but when it calls the functions( related with snmp functions) with Visual C++ (2012), the program stops without any error.

 

2.Target Enviroment: windows 10 with NI run-time 2015 engine. Microsoft Visual C++ 2008,2010, 2012 Redisturbutables are installed.

so I upgraded CVI 2015 and installed run-time 2015 on target computer (windows 10), it is same symptom.

 

 

Thank you,

 

Insuk

 

 

 

CVI client command line example

$
0
0

I am developing an application that uses TCP to talk to a server.

 

I found the client.prj in the CVI examples and got it working with my server.

But this project has a GUI and I need just a command line version.

 

I created a command line project and extracted the TCP code from the GUI example.

This new app connects to the server, Then I send my GET header information useing ClientTCPWrite.

The server receives what the client sent.

I server sends back the requested information BUT the client callback function that I passed in the ConnectToTCPServer function call is never runs.

 

Since I am not using a GUI this becomes a single threaded application is this a problem?

 

Is there a CLI example of a TCP client in CVI or any suggestions?

 

Program gets sluggish when jumps between threads

$
0
0

Hello!
 There are 4 threads running in this code

  • Thread 1- to continuously display the time on GUI and update a variable xax=Timer() with time elapsd since the tool was started
  • Thread 2- to send data on COM port or ethernet
  • Thread 3- to calculate vibration values on run and plot the same
  • Thread 4- to calculate temperature values on run and plot the same.

Before starting these threads, the temp and vibration arrays are filled by reading from a text file.

The problem faced by me is, the CPU usage rises upto 75% suddenly when i launch the .exe file for this project. Also the RAM usage increases to updto 60-70% thus making the GUI very slow and sluggish
Also the varibale, xax=Timer() skips some values and thgus it affects the temp and vibration plots from thread 2 and thread 4

i have attached my .c file for refrence

please suggest a solution to this issue.

How to make 4 LED run in circle

$
0
0

Hello Guys,

 

I have a situation which uses a Timer (called every 5 sec).  When a timer is called, there are 4 LED's which are in action. I have to make them blick in a circluar for the next 5 sec and then the control passes to another set of LED's which performs the same operation.

 

My question is, how can make the one set of 4 LED's blink and close in a circluar fashion (i.e 1 ON , 2 ON-1 OFF, 3 ON-2 OFF, 4 ON-3 OFF, 1 ON-4 OFF and so on). in such a way that they are visible to the user.

 

Thanks and regards

Raunak

Potential uninitialized variable?

$
0
0

The latest CVI 2015 complains about the usage of some "possible uninitialized" variables.

I've been able to extract a little portion of code which produces the warning "variable 'aux[j]' may be uninitialized when used here".

The code is part of a sorting routine I downloaded from the web years ago and I'm not sure that the warning is correct.

int	aux[4], a[4]={1,2,3,4};
int	i, j, k, left=0, center=0, right=1;

	for (i = center+1; i > left; i--) aux[i-1] = a[i-1];	/* this initializes aux[0] */
	for (j = center; j < right; j++) aux[right+center-j] = a[j+1];	/* this initializes aux[1] */
	for (k = left; k <= right; k++) {
		if (aux[j] < aux[i]) a[k] = aux[j--];	/* the if() compares aux[0] and aux[1]. Both of them seems initialized... */
		else a[k] = aux[i++];
	}

The warning is on the line if (aux[j] < aux[i]) but based on the above lines I think that both of the variables are initialized.

 

But maybe the routine is written in a bad way and it's better to rewrite it.

 

Could someone help me analyzing this warning to check if it is correct (and so I need to rewrite the routine) or not?

Change color of window background in CVI2015

$
0
0

I hope that the answer is easy but I can't find a way to change the background of one of the sub-windows of "Variables and Call Stack" window in CVI 2015 (see attached image).

I use a "dark theme" and in CVI 2012 I don't have this issue. I imported the color scheme from CVI 2012 to CVI 2015, so I don't understand the reason for this behavior.

The problem is that since my theme is dark, the text color is white and I can't read the text over a white background.

 

Can someone help me?

Creating Digital Channel

$
0
0

Hello Friends,

 

I am using Labwindows along with NI-DAQmx. I am creating a GUI with which I have to connect the hardware NI-6528. My question is can I create digital channel with 48 lines and using two different devices (Dev0, Dev1) as shown below:

 

DAQmxCreateDIChan(taskHandle,"Dev1/port0/line0:7,Dev1/port1/line0:7,Dev1/port2/line0:7,Dev2/port0/line0:7,Dev2/port1/line0:7","",DAQmx_Val_ChanForAllLines);

 

Thank you in advance!

 

Best Regards

Raunak


DAQmxCreateDOChan

$
0
0

Hello Guys,

I hope someone can explain me what exactly does DAQmx_Val_ChanForAllLines in the below syntax means.

 

DAQmxCreateDOChan(taskHandle,"Dev5/port5/line0:7","",DAQmx_Val_ChanForAllLines)

 

Best Regards

RG

NIDAQmx.lib not included

$
0
0

Hello,

 

I have installed the CVI 2015 and found it was not included NIDAQmx.lib by defalt.

How can I add on the left-down pannel the library? The file is on the location but it looked not included in the defalt libray.

 

Do you think I miss the installation? I upgraded the DAQmx8 to DAQmx15?

 

Thanks,

 

Insuk

 

 

organiser interface labview

$
0
0

Bonjour ,

 

Dans le cadre de mon PFE ,je dois commander un générateur pour générer 10 signaux électriques(chaque signal électrique est caractérisé par i,u,dephasage ,et frequence),chacun de ces signaux doit etre genere 10 fois.A chaque fois je dois lire ce que l etalon (un instrument) a lu(u,i,depahsage et frequence) et ce qu un instrument (lié au generateur et a l etalon a lu(u,i,dephasage,frequence)

 

ci joint est le programme s il vous plait ,aidez moi a organiser l interface,s il vous plait c est urgent 

 

cordialement

ServerTCPRead always takes ~500ms to read with timeout set to 1000

$
0
0

It always takes between 513 - 525 milliseconds to read a message, regardless if the message data has 32 bytes or 4K bytes. 

Here is the call:

 

   readSize = ServerTCPRead(handle, (char *)&msgBuf[0], 4096, 1000);

 

Is there a safe way to fix this issue?  My downloads are taking forever because of the read times. 

 

Could I safely reduce the timeout time to get better performance?

 

FYI the data writes work fine - only take 12 - 30 milliseconds:

   bytesOut = ServerTCPWrite (handle, &msg, (lwMsgSize*4), 1000);

Slow Interrupt Handling

$
0
0

CVI 2015, Win 7 32-bit.

 

Using the CompactDAQ 8-module ethernet chassis and 8 modules.

 

DaqMX is set up to scan 20 times each second, interrupt each scan.  Interrupt handler reads all analog and digital channels, writes all digital modules, does very little else -- hands some strip-charting off to another thread via a flag.

 

This works flawlessly on Win7 64-bit  quad-core i7 machines in both debug and release compilations.

 

On the dual-core I5 Win7, 32-bit machine that I am supopsed to deliver with this software, the OS cannot keep up with the interrupts, even though the processor load reported is about 15%.  I know this because I can change an analog input that is strip charted, and it takes seconds to show up on the chart.  Interrupt processing drifts until the DaqMx buffer overflows and the CompactDAQ unit restarts.

 

The bottleneck appears to be DaqMX and the Ethernet port.

 

Anybody have experience with this, suggestions, solutions?

How to get and list exportable functions from DLL seen from other application

$
0
0

Good afternoon, 

I am programming a SW application which contains a List Box in its UIR that will show all the functions defined in an external DLL.

That DLL was compiled with LabWindows/CVI as debuggable DLL (32 bits) and its .lib and .h files were added to my project which will show the list of exportable functions, from that DLL, whose prototypes are defined in that .h file as:

extern void  __declspec(dllexport) __stdcall FUNCTION(......)

I know that i can access those functions using LoadLibrary and GetProcAddress functions from Windows Driver Kit (WDK) but i want to "see" all those functions to list them into the List Box programmatically to be selectable by the user later on.

Thanks in advance!

Regards, 

Alejandro Pinto

Double Frame Cameras

$
0
0

Is there any way on LabWindows/CVI ( IMAQdx) to utilize a camera capable of double frame images?  


one shared head file ,how to use for different project and files

$
0
0

I have a question below:

One header file atf2_general.h located in C:\pool\l2_idrv\headers folder, and my source code located in C:\atf\l2_idrv folder( atuomatically copy my.lib, my.dll to pool folder by post-build actions batch file)

assupmtion: One project  my.prj include 4  *.c files(1.c, 2.c, 3.c,and 4.c), each *.c NEED  atf2_general.h support, i do not want to  include this head file in the begining of  each *.c file.

and this my.prj also do not want to add this head file in project ,  i try add" C:\pool\l2_idrv\headers " in Options\Enviroment\Include Paths\applied to all project

but still  failed to compile? what is best way for such problem

 

Thanks a lot!

 

Erase a drawing in canvas control

$
0
0

Hello,

 

I have drawed  two lines in a canvas control, I'd like to know if there is a method to erase one of a line but just reserve anothere one?

 

 

David

How save text file using relative project path

$
0
0

Hi there,

 

I am trying to create an application which uses my project's relative folder path in order to save an text file into the same folder (so that I do not have to rewrite the build path when I run my application on another computer, for instance). I've made some research, but I could not find anything that would solve this issue.

 

How should I do this properly?

Give same name to writing file as reading file

$
0
0

I have a bunch of raw data files that needs to processed. I have construcetd a block diagram which read the file, process it and write it to a different location. Now I want the output file(i.e the write files) to hava the same name as input files. How do I automate this process?

Fatal Run-Time Error dialog box size

$
0
0

Is there a way to set the size of the Fatal Run-Time Error dialog box?  While debugging you will sometimes get a Fatal Run-time Error, see attachment.

But looking at the dialog box you can see that some of the information is not visible.

 

The filename and what was expected are missing.  The dialob box is not resizable on the fly, so I would like to set it larger that default.

Viewing all 5355 articles
Browse latest View live


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