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

Controlling NSI2000 from LabWindows

$
0
0

I'm trying to use LabWindows 2015 to interface with Nearfield Systems Inc.'s NSI2000 antenna control program.  Does anyone know how to do this?  The NSI2000 manual says their software can be controlled from an outside application by using Active-X.  But when I use CVI's "Create Active-X Controller" wizard, I have to choose from a list of dozens of registered Active-X servers starting with "NSI", none of whose function lists appear to correspond to the selections on NSI2000's user interface. 

 

To make things more confusing, there is a registered Active-X server called "NSI2000" in the list, but when I try selecting it I get an error message saying "Error loading type library/DLL".  NSI's tech support says this is because "the reference to NSI2000 is an Active-X executable, not a DLL".  They referred me to the NSI2000 scripting manual, but the only example it gives is about controlling NSI2000 from MS Word using macros.

 


Labwindows CVI and debugging MSVC++ dll

$
0
0

We are using a DLL written LabWindows/CVI  as code module for Teststand . This DLL calls a DLL written in MSVC++.  Is there any chance to use  the Labwindows/CVI debugger to debug into this MSVC++ DLL ( if this MSVC++ DLL is build with the "right" options) ?  Or is this possible only using  the MSVC++ Development environment ?

DAQmxCreateTask when called,the GUI hangs

$
0
0

 

Hello Guys,

 

I have created a UI which connects to a hardware. I have started writing code for the hardware connection in my UI source code which can be seen below. As soon as the code executes the DAQmx configure code: -DAQmxCreateTask("Dev0-R",&taskHandle[0]);, the UI hangs and does not work further. Can anyone tell me what exactly is the problem. I an not connected to any hardware currently but creating a task command should work in my case. I am confused how to go further. Please help.

 

// Code is shown below

 

TaskHandle    taskHandle[4];

int main (int argc, char *argv[])
{
    int error = 0;
    
    /* initialize and load resources */
    nullChk (InitCVIRTE (0, argv, 0));
    errChk (panelHandle = LoadPanel (0, "PintschBamag.uir", PANEL));
    errChk (AttributePanelHandle = LoadPanel (0, "PintschBamag.uir", ATTR_PANEL));
    
    /* display the panel and run the user interface */
    errChk (DisplayPanel (panelHandle));
    
    /* Place for configuring the Hardware Channel connection*/
    
    /*FOr the DAQMx*/
    //char        errBuff[2048]={'\0'};
    
    /*********************************************/
    // DAQmx Configure Code
    /*********************************************/
    DAQmxCreateTask("Dev0-R",&taskHandle[0]);
    DAQmxCreateTask("Dev3-R",&taskHandle[1]);
    DAQmxCreateTask("Dev4-R",&taskHandle[2]);
    DAQmxCreateTask("Dev5-R",&taskHandle[3]);

 

//code ends here

 

 

Thanks,

Raunak

 

 

Canvas Clear - Clears the portion of a Loaded image

$
0
0

 

Hello Guys,

 

I am using a canvas which has an image loaded. I creates a rectangle over specific cordinates on the canvas to depict part of the image.

Now, when i close the panel, I clear the canvas rectange using :- 

CanvasClear (AttributePanelHandle, ATTR_PANEL_CANVAS, MakeRect (TOP,LEFT,HEIGHT,WIDTH));

 

I make this so that when I open it again I do not see previous rectangle marking.

 

Now the problem comes is that when I reopen my panel the rectangle is gone, but the loaded part of the image is also erased as can e seen in the below picture. How can I hoild back the loaded picture. Is there any alternative to canvas clear to remove the rectange.

 

BeforeAfter

                               BEFORE                                                             AFTER

 

 

Thanks

Raunak

can't see vision and motion module in version 2010 evaluation

$
0
0

I am trying to use vision and motion module in LabVIEW evaluation version 2010. When I go to the palette it shows an empty palette.

Can I install it manually?

I have already installed vision module 2015 on my system. I don't know how to configure it for LabVIEW.

What's the actual problem and how can I solve it?

How to build the 64-bit OpenGL programm in cvi 2013

$
0
0

Hello,

 

Since cvi opengl instrstrument does not support the 64-bit application buillding, anyone could make a method to build a 64-bit OpenGL application?

 

Thanks.

 

David Lee

How can i used CVI SQL Toolkit to read SQL image type?

$
0
0

Hello:

      One of the columns in my SQL Database is a image type,so how can i read the value of this colum?

create CVI DLL to be called in LUA

$
0
0

Hello everyone,

 

I am a LabVIEW user and new to LabWindows. Currently, I have to plan a project which needs to integrate software in different languages.

The situation is that I have one LabVIEW vi needs to be integrated into a HMI which is written in LUA. I am now thinking is it feasible to first convert LabVIEW vi or project first into CVI DLL and than call it in LUA. Does anyone have some experince/ advices about it? I found it is possible to using LUA in LabVIEW with LuaView. How about the other way round?

 

Any pointer will be highly appricated.

 

Cheers,

sparkle


Excel: Get number of worksheets, and each worksheet name

$
0
0

Hello,

 

I need to read the total number of worksheets within a workbook, and the name of each worksheet.
Can anyone please give me a pointer to the right functions?


Thanks,
Greg

 

A very basic question on the interface to Win32 API

$
0
0

Hello all,

CVI comes with the interface to Win32 API that permits to use system functions in our applications.

Now the fact is that as far as I can understand, this support is targeted to some old OS version, which means some more recent functions cannot be used. Nevertheless, if properly configured, CVI can use even those "newer" functions.

Just as an example, GetLocaleInfoEx () function is declared for use on WIndows Vista and upper systems, and on native CVI install is not found by the compiler (I'm using CVI2012SP1 till now).

 

Now, I know I can add /DWINVER=_WIN32_WINNT_VISTA /D_WIN32_WINNT=WINVER /D_WIN32_WINDOWS=WINVER string to compiler defines in Build options and the program compiles and executes well (I'm using Win7 so I'm ok) but I wonder if such a define can alter other parts of the SDK and move to unpredictable results. Tests I have made so far show no problems, but the SDK is so huge and so rich of version-aware definitions and inclusions that I'm absolutely not sure of what I'm doing with this Smiley Surprised

 

Can anybody share his knowledge / experience on this matter? Can some NI expert shed some light on SDK universe?

 

Additionally, some info on the difference between the following macros, which address the same OS version, would be useful:

#define _WIN32_WINNT_WIN6     0x0600
#define _WIN32_WINNT_VISTA    0x0600
#define _WIN32_WINNT_WS08     0x0600
#define _WIN32_WINNT_LONGHORN 0x0600

NAN in preamble makes labwindows crash

$
0
0

Hi all,

 

I am using Labwindows CVI 2015 (v 15.0.0) and I faced a problem where the symptoms where:

  • Autocompletion features not working
  • Labwindows CVI would not respond when trying to close the IDE

This was happening with only one of my project.  After investigation this was happening because  I was initializing some global variables (before main function) using NAN constant or NotANumber function.

Once I replaced NaNs by a finite value and initialized the global variables in the main or in any other functions both previously mentioned symptoms disapeared.

 

I have no idea if this is an expected behaviour but I though it would worth share the information as I found nothing else about these symptoms on Internet.

 

I Hope that will help others.

Oscilloscope development with NI USB 6001

$
0
0

Hello,

 

Im planning to develop a virtual oscillpocope using Labwindows/CVI for my university project. I was wondering if its necesary to use CVI Real Time or not? I heavent much experience with CVI and this will be my first project, so If you guys have any tips it would be great. And also is there maybe any similar project developed before that I could have a look? 

 

Thanks

Questions Regarding to flexibly determine the array size of data storage

$
0
0

I try to use CVI function below to load some datas from .csv file to the array I intended to use later:

filereturnvalue = FileSelectPopup ("c:\\Users\\Desktop\\FileDirectory", "*.csv", "", "Select Data File", VAL_LOAD_BUTTON, 0, 0, 1, 0, LoadFilePath); 

FileToArray (LoadFilePath, DATAArray, VAL_CHAR, MaxDataSize, 1, VAL_GROUPS_TOGETHER, VAL_GROUPS_AS_COLUMNS, VAL_ASCII); 

For "predetermined" data array, this is quite straight forward, because the size of array is already set.  However, I wonder if there is anyway I could use CVI directly import datas and determine the size of array on the fly?  Which means user don't need to know the length of data, and it could be determined while importing the file.

How to convert string to ViChar array?

$
0
0

Hello,

i created a wrapper for a ivi function and added to addtional parameters to it (Result and TXT).

It is working fine but how can i make the bold text working?

The "if" part works only problem in the else-path.

How can i set the string into the ViChar array?

 

Thanks for help

 

 

        void __declspec(dllexport) ConfigureOutputEnabled(ViSession vi,  ViInt32 index, ViBoolean enabled, ViInt32 &Result, ViChar TXT[] )
        {

             ....

            Result = IviDCPwr_ConfigureOutputEnabled(vi, channelName, enabled);
            if (Result != 0)
            {
                IviDCPwr_error_message(vi, Result, TXT);
            }
            else
            {
                //TXT[] = "No error"; //How to change this?
            }
        }

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


How do I use an ActiveX component?

$
0
0

Hello, hello,

I've just been given an ActiveX component (.ocx file) and some samples of Visual Basic to evaluate. Apparently VB is no longer available from MS (or where ?) and I was trying to use it in a new CVI project but what do I do with this ocx ? Adding it to the project doesn't do much. And what's the difference between Tools / Create ActiveX Controller and Server ? If I try the former, it's not in the list provided and selecting the ocx file with the [Browse] button gives me a "The type library is not intended for use on Win32". I'm on Win10 64, and I installed the component from a 64-bit msi...

 

Looking for the usually helpful CVI samples, I see plenty have the ActiveX keyword, but I don't see ocx files in their projects.

As you can tell I've never used ActiveX before and I'm lost.

Thanks.

very high memory consumption > 1GB!

$
0
0

Hello all.  I've got two deployed applications, both compiled under CVI 2015.  These apps have been running for over 1 year, pretty stable.  Every once in a while, I see some mysterious crashes, but rarely.

 

So yesterday I saw one of these crashes and decided to investigate more.  Turns out that one of the apps was consuming 900MB of memory!  It climbed to 1.3GB when I let Windows force close it.

 

Now the other application I mentioned above seems to be consuming this much memory as well.  These two apps share maybe 2% of their codebases: merely some logging, error handling libraries, general UI elements.  They have radically different requirements and core functionality.

 

And yet both, in steady state, after maybe 96 hours of continuous operation, are chewing up nearly 1GB of memory!

 

So there's clearly a memory leak here somewhere.  I ran the execution profiler but didn't see any big issues.

 

Are there any known issues with the 2015 runtime?

 

Any hints as to what I can look at for memory cleanup / optimization?

example simpftp does not compile

$
0
0

Hi,

 

I am developing an application in which I use the ftp function InetFTPAutoSend.  When I compiled I get unresolved symbol error:

  error: Undefined symbol '_InetFTPAutoSend@24' referenced in "...XPSWrapper.obj".  

I decided to check if it was a problem in my project by compiling the example simpftp provided with labwindows CVI, in both release and debug I get the same problem of undefined symbol:

Build Status (simpftp.prj - Release)
 simpftp.c
 Link simpftp.exe
  error: Undefined symbol '_InetFTPAutoRetrieve@24' referenced in "c:\Users\Public\Documents\National Instruments\CVI2015\samples\internet\simpftp\cvibuild.simpftp\Release\simpftp.obj".  
  error: Undefined symbol '_InetFTPAutoSend@24' referenced in "c:\Users\Public\Documents\National Instruments\CVI2015\samples\internet\simpftp\cvibuild.simpftp\Release\simpftp.obj".  
  error: Undefined symbol '_InetGetErrorMessage@4' referenced in "c:\Users\Public\Documents\National Instruments\CVI2015\samples\internet\simpftp\cvibuild.simpftp\Release\simpftp.obj".  
Build failed.

I could not find anything that worked to solve this issu on this forum.  Is anyone else using ftp function and managed to get it to work?

 

Thanks in advance to those who will take time to read and those who will take time to answer.

DAQmx NICAIU.DLL version error

$
0
0

Hi gang,

I'm debugging a DAQmx application I just updated to read a pressure sensor (load cell) with
an NI-9219.  I've used this code successfully a few years ago, but now it's no
longer working.  I'm getting a run-time popup error message about a DLL
(NICAIU.DLL) being the wrong version (see attached JPEG) but
I just installed DAQmx 15.1.1 and DeviceDrivers Feb2016 which are the latest
available and I still get this error.   My code is based upon a CVI example from

a few years ago for acquiring thermocouple readings

 

Thanks for any ideas on how to fix (or debug further) my problem,

 

Erik

 

 /*********************************************************************
*
* CVI Example program:
*    ContThrmcplSamps-IntClk.c
*
* Example Category:
*    AI
*
* Description:
*    This example demonstrates how to make continuous, hardware-timed
*    temperature measurement using a thermocouple.
*
.

 

 

Plot signal with few data

$
0
0

Hello everybody,

 

I have the followed problem. I would like to plot a signal that I have greated. I store the signal pattern in an array and this array I would like to give out with "Plot Waveform". The problem is now, that my signal can have a minimum of 4 values. The "Plot Waveform" function plots each position of the array into the graph. With 4 values the result is a triangle signal but that is wrong, the signal should be like a rectangle (Wave Drive signal). There are no steps between that. On the oscilloscope I have the correct signal with only for values in the array.

 

In the following 1 you can see the outcome. The signal has a offset of 5 V, just for information. The signal should be the signal in the following 2 (the orange one).

 

Hope someone can help me.

 

Best regards

 

 

 

 

Viewing all 5339 articles
Browse latest View live


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