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

Version control and uir files

$
0
0

Hello all,

what are your methods to keep UIR files under version control, namely SVN ? It works fine as a binary files, but if someone makes a minor modification to the user interface, there's no way you can find it visually.

 

I've tested TUI files under SVN and indeed a quick 'diff' tells you what's new/changed in the file. It's possible to load TUI files with LoadPanel(), but it's not possible to have the user interface editor default to saving as TUI, making it impractical. So how do you do this ? A think a simple fix from NI would be to have the option to default the editor as TUI, keeping in mind that in the past there were several cases of .tui behaving differently than .uir.

 

If some of you agree, I'll file a suggestion.


Programming the NI 9375

$
0
0

I need some help with the DAQmx calls needed to operate the NI 9375 Digital Input/Output module.  I have used DIN, DOUT, AIN, AOUT and AIO CompactDAQ modules, so I know how to initialize lots of them, establish interrupts, get data, write data, etc.

 

The NI 9375 is a bit of a mystery.  There is no documentation on the NI website which directly addresses programming for a DIO C-series module.  MAX does not provide any Port Number information.

 

Does one deal with the 16-bit DIN/16-bit DOUT as a single 32-but UINT?

Does one establish one DIN task to read the 32-bit UINT?

Does one deal with the 32-bit UINT as lower 16 bits Read Only, and the upper 16 bits Read/Write?

 

Thanks...

how do I get a list of cameras names from MAX to use in a CVI app?

$
0
0

I wish to avoid any confusion in selecting cameras to use in my CVI application, so I'm looking for a way, from within my app, to get the list of camera names as set up in MAX. Then I can populate a listbox and the user can choose their camera without having to guess or refer to an external listing for the MAX name. The selected name will then be passed to IMAQdxOpenCamera.

 

Thanks!

Regex replacement syntax in editor

$
0
0

Hello all,

for the life of me I can't remember (nor find in the documentation) the syntax for doing string replacements using regular expressions in the CVI editor.

Something like:

Search: ({[~,]*},

Replace: (\1, A10,

Would change the string "(aei1," to "(aei1, A10,"

But what are the delimiters to use ? {} like in my example ? And what's the variable ? \1 ? $1 ?

I just can't find it.

 

In sed syntax:

sed -e "s/(\([^,]*\),/(\1, A10,/"

Real Time PlotXY

$
0
0

Hi, I'm trying to plot a real time line profile of a 640x512 image at 30 Hz (the line profile is only 640 pixels) and it seems that the plot just can't keep up.  Am I pushing the PlotXY function beyond is limits or am I just doing something stupid?  Sample code below:

 

startPoint = imaqMakePoint(1, rowToPlot -1);

entPoint = imaqMakePoint(640, rowToPlot-1);

spotImProfile = imaqLineProfile(camImage, startPoint, endPoint);

 

dataSize = spotImProfile->dataCount;

 

for(i = 0; i < dataSize; i++)

    spotProfileData[i] = (short)(*(spotImProfile->prfileData + i));

 

spotPlotHandle = PlotXY(panelHandle, PANEL, xProfileData, spotProfileData, 640, VAL_SHORT_INTEGER, VAL_SHORT_INTEGER, VAL_THIN_LINE, VAL_NO_POINT, VAL_SOLID, 1, VAL_GREEN);

 

DeleteGraphPlot(panelHandle, PANEL_SPOTIMGRAPH, spotPlotHandle, VAL_DELAYED_DRAW);

 

 

I don't have internet access on my programming machine so if I missd a tpyo its safe to assume the actual code is correct.

 

Graph settings are:

Control mode: Hot

Data mode: Retain

Smooth update: Yes

 

 

Has anyone else tried Real Time PlotXY with ~640 data points and updating at 30Hz?  My program runs fine without the plot.  Intermittantly the plot updates at ~30 Hz but for the most part it is 1 Hz at best.  Thanks!

 

FeralPhysicist

 

 

 

 

 

distribution kit run time engine

$
0
0

Hi is it possible to create a distribution kit with a higher version RunTimeEngine than the one being used to create it? I would like to include cvi2009 rte with my distribution kit built using labwindows cvi 9.0..

 

Thanks!!

C interface Funtcion cannot write an array to Labview

$
0
0

Hi

I have developed an vi in labview2012, and used the C Interface to convert the vi into api which can be used in Labwindows\CVI.

However, when I use the function NiFpga_WriteArrayU8, I cannot transport the array to labview. Can anyone help me?

I use the funtion in this way:

NiFpga_WriteArrayU8(session,NiFpga_Card4_SPI_ControlArrayU8_ArrayTx_SPI1, WriteData,1) 

NiFpga_Card4_SPI_ControlArrayU8_ArrayTx_SPI1 is the control ID in Labview

WriteData is an pointer which point to an unsigned char array .

Looking forward for reply.

michael

Implicit declaration of Function

$
0
0

I upgraded from Labwindows 2008 to 2013

 

When I now build my project in Labwindows 2013 I am getting many errors like these:

  236, 5    error: implicit declaration of function 'GPS_DisplayErrorStatistics' is invalid in C99. Make sure that you include the function prototype. [-Wimplicit-function-declaration]

  246, 5    error: implicit declaration of function 'BER_DisplayErrorStatistics' is invalid in C99. Make sure that you include the function prototype. [-Wimplicit-function-declaration]

  256, 5    error: implicit declaration of function 'NDAT_DisplayErrorStatistics' is invalid in C99. Make sure that you include the function prototype. [-Wimplicit-function-declaration]

 

No problem when I build the project using Labwindows 2008

 

errorStat.h

void GPS_DisplayErrorStatistics( int displayIfZero );

void BER_DisplayErrorStatistics( int displayIfZero );

void NDAT_DisplayErrorStatistics( int displayIfZero );

 

errorStat.c

/****************************************************************************************/
/*                                                                                                                          */
/*  Display any BER errors which may have been detected during collection     */
/*                                                                                                                          */
/****************************************************************************************/
void BER_DisplayErrorStatistics( int displayIfZero )
{
 ProcessError(BER_Stats.bytecount_errors, "Data Byte Count Errors");
 ProcessError(BER_Stats.checksum_errors, "Checksum Errors");
 ProcessError(BER_Stats.BER_errors , "BER Unreasonable Errors");
 ProcessError(BER_Stats.MSE_errors, "MSE Unreasonable Errors");
 ProcessError(BER_Stats.SNR_errors, "SNR Unreasonable Errors");

}

 

Calling function in other file

/***************************************************************************************/
/*                                                                                                                         *
/*  Analyze BER statistics                                                                                  */
/*                                                                                                                         */
/***************************************************************************************/
void AnalyzeBER( void )
{
 BER_DisplayErrorStatistics( FALSE );
}

 

 

What can be wrong?

 

Thanks!

John W.

 


windows.h and datasize.h clash

$
0
0

My project requires both of these files, but when I include them there are "typedef redefinition" build issues.  I can reproduce the issue by just creating a minimal project.  I can successfully include windows.h or datasize.h but not both.  I tried putting windows.h as the very first include file.  The path for the windows.h file is c:\program files\national instruments\cvi2013\sdk\include and the path for datasize.h is c:program files\national instruments\cvi2013\include.  Any recommendations?

Thanks, Scott

Labwindows CVI XBox or PS3 Controller Interface Help

$
0
0

Hello,

 

I am trying to find examples that show how to use an XBox 360 or PS3 controller from within LabWindows / CVI.  Does anyone have any ideas on how this can be done?

 

Thank you,

Scott

[CVI 2013] Error load .Net assembly in release configuration / OK in debug configuration

$
0
0

Hello,

 

I use an Net assembly (c#) for my CVI2013 application, i can run it (no problem for debug configuration), but if i try to run release configuration
 => Error

 

(Could not get CVI .NET error description. A .NET Framework version 1.1 or higher, or the CVI .NET modules may not be installed on your system. If not already present, install the required .NET Framework. Then repair the CVI Runtime Engine installer.)

 

The .NET is installed.

 

Could you help me ?

 

Thanks;

@++

Detecting a usb comport by serial number

$
0
0

How can I find the comport number assigned to a usb comport using cvi.  I need to test six (6) devices using usb comports and need to either permanently set the comport numbers in windows or have CVI dynamically find the devices by serial number and obtain the windows comport assignment.  Does anyone have an example program that performs this task?

Qué datos pongo en el archivo sqldistsupp.dsn para poder crear mi DSN?

$
0
0

CVI en su Kit de conexión SQL contiene un programa para crear un nuevo DNS llamado sqldistsupp.exe que se ubica generalmente en C:\Program Files (x86)\National Instruments\Shared\CVI\redist\x64 o \32. Cuando había el MySQL ODBC connector versión 3.51, funcionó muy bien llenando el archivo sqldistsupp.dsn con los datos siguientes para dar de alta un nuevo DSN:

 

MySQL ODBC 3.51 Driver
DSN=BASE_DE_DATOS
server=localhost
database=base_de_datos
user=root
password=******
option=4325376
Description=Base de Datos

 

Cuando intenté usarlo con el MySQL ODBC connector version 5.1 intenté usar los mismos datos, y me crea el DSN pero no llena los datos más que del nombre del DSN.

 

Quiero saber cómo le hago o qué datos pongo para que se llenen los datos correctos

 

P.D. adjunto el programa que se distribuye con el toolkit y el archivo .dsn que uso para x64

la página del MySQL ODBC connector es: http://dev.mysql.com/downloads/file.php?id=415029 para x64

Qué datos pongo en el archivo sqldistsupp.dsn para poder crear mi DSN?

$
0
0

CVI en su Kit de conexión SQL contiene un programa para crear un nuevo DNS llamado sqldistsupp.exe que se ubica generalmente en C:\Program Files (x86)\National Instruments\Shared\CVI\redist\x64 o \32. Cuando había el MySQL ODBC connector versión 3.51, funcionó muy bien llenando el archivo sqldistsupp.dsn con los datos siguientes para dar de alta un nuevo DSN:

 

MySQL ODBC 3.51 Driver
DSN=BASE_DE_DATOS
server=localhost
database=base_de_datos
user=root
password=******
option=4325376
Description=Base de Datos

 

Cuando intenté usarlo con el MySQL ODBC connector version 5.1 intenté usar los mismos datos, y me crea el DSN pero no llena los datos más que del nombre del DSN.

 

Quiero saber cómo le hago o qué datos pongo para que se llenen los datos correctos

 

P.D. adjunto el programa que se distribuye con el toolkit y el archivo .dsn que uso para x64

la página del MySQL ODBC connector es: http://dev.mysql.com/downloads/file.php?id=415029 para x64

Advantage of Fmt over sprintf

$
0
0

Are there advantages of using fmt over sprintf in CVI code? On the surface, they appear to be very similar down to the interpretation of the format string. I understand that the sprintf format string allows for more options, but those aren't always necessary in my projects.

 


How to contorl PoCL in CVI

$
0
0

Hello,

 

I am using an NI-1433 board and can communicate with my JAI camera and use power over cameralink (PoCL) to power the camera. I would like to turn this on / off so that the camera is only powered when the software is running.

Can this be done?

If so, how?

 

DSN

execution error: Undefined symbol '_imaqCreateImage' referenced , during .exe

$
0
0

during execution or debugging of some NI-imaqdx with Labwindows 2013 examples i've this error:

error: Undefined symbol '_imaqCreateImage' referenced in "c:\Documents and Settings\All Users\Documents\National Instruments\CVI\samples\IMAQdx\Grab and Basic Attributes\cvibuild.Grab and Basic Attributes\Debug\Grab and Basic Attributes.obj".

 

i need to control a webcam camera with labwindows using imaq and imaqdx function.

i write also a new program like example i correctly link the .lib and .h file of niimaq and niimaqdx...

the project compile but when i try to create and .exe (in releese and also debugging configuation) it occours the same error ...

what i have to do?

thaks

regards

 

Async timer and mutexes ?

$
0
0

Hello all,

I rarely used async timers, but now I do need them.

They run in a separate thread, right ?

Meaning in some cases I need to use mutexes or critical sections ?

 

I don't remember seeing functionnality for those in CVI. I normally use the pthread library on Linux, so I don't know what you guys recommand in CVI.

Thanks.

How to work with realloc function in CVI. When i am trying to reallocate structure,It is returning NULL value.

$
0
0

How to work with realloc function in CVI. When i am trying to reallocate structure,It is returning NULL value.

 

separatedVal =  realloc( separatedVal ,(i+1) * sizeof(struct Separate));

 

here i am getting separatedVal = NULL 

How to get the motherboard serial number?

$
0
0

Hi

 

i am writting an application which will encrypt the motherboards serialnumber and other info to do an activation of my application.

inevitably locking my program to a specific PC.

 

Does anyone know how i can get the motherboards serial number?

 

I tried the wmi but get so many errors like missing prototype and not declared.

I dont know when to start using the Windows Management Instrumentation with regards to Lab windows/CVI.

 

Can anyone help me?

 

Thanks

Shako

 

 

Viewing all 5349 articles
Browse latest View live


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