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

Executable icon doesn't update when .ico file is changed

$
0
0

I'm having a similar problem to this thread, but with my executable file.

 

I have a project in LabWindows 2015 SP1 using Windows 7 Pro.  I created an icon file and set my project to use it by selecting Build -> Target Settings -> Application icon file with Configuration set to "All Configurations".  Later I created a different icon file and changed the target settings to use the new file. 

 

When I build my application, I'm seeing something strange.  The icon that shows up in my Windows folder for the application is the old one, and if I create a shortcut to the application on my desktop, I get the old icon.  But when I run the program, the icon in the upper left corner of my main panel is the new one, and so is the one that appears in the taskbar.

 

I tried the solution suggested in the original thread (deleting the cvibuild.xxx folder), but it didn't help. 

 

I did find another solution -- renaming either the executable file or the folder containing it to any other name causes the icon to change to the correct one.  So this isn't a big problem, but I thought I should report it anyway since the behavior doesn't seem right.

 

If I subsequently rename the file or folder back to the original name, the icon reverts to the old one.


Is it possible to select a specific table cell and have the row and column number returned?

$
0
0

I can't seem to find a function that will do this. I previously used EVENT_TABLE_ROW_COL_LABEL_CLICK to get the column information when a column header was clicked, but now I need the row and column information when a specific cell is selected.

 

Thanks!

Version of NI Update Service

$
0
0

Hello NI,

recently the NI Update Service wanted to update itself to a new version, 16.0.1. Fine.

After the update, the version number says 16.0.0.33.

Smiley Wink

CVI调用MATLAB生成的DLL

$
0
0

这几天一直在研究这个问题,都没有调用成功。

matlab写一个简单的求和函数:

function value = my_add(a, b);

value = a + b;

end;

mex -setup

mbuile -setup

deploytool 分别生成过C library版本和C++ library版本的DLL文件,在CVI中隐式调用和显式调用都没通过。

求高手提供一个可用例程,多谢~

How to call a DLL (generated by MATLAB) in LabWindow CVI?

$
0
0

The function, for example:

function value = my_add(a, b);

value = a + b;

end;

Use the deploytool in MATLAB generate my_func.h my_func.lib and my_func.dll。I want to konw how to call the DLL in CVI?  Is there anyone who konws how to make it?

Excel_RangeSort

$
0
0

I'm trying to sort a list of name but I always got an error.

The code is the follows:

void SortAnagrafica (void)
{
 int     i = 0, j = 1;
 HRESULT    esito = 0;
 ExcelObj_App  ExcelAppHandle = 0;
 VARIANT    TempVariant;

 
 // Open new Range for Worksheet
    esito = CA_VariantSetCString (&MyCellRangeV, "A1:A1000");
    // Get Sheet
    esito = Excel_SheetsItem (ExcelSheetsHandle, NULL, CA_VariantInt(SheetNr), &ExcelWorksheetHandle);
    esito = Excel_WorksheetRange (ExcelWorksheetHandle, NULL, MyCellRangeV, CA_DEFAULT_VAL, &ExcelRangeHandle);
 CA_VariantClear(&MyCellRangeV);
    // Make range Active   
//    esito = Excel_RangeActivate (ExcelRangeHandle, &ErrorInfo, NULL);
 
 while (OratorioEstivo[i].Progressivo != 0)
 {
  CA_VariantSetCString (&MyVariant, Anagrafica[i].Cognome);

  Excel_RangeSetItem (ExcelRangeHandle, &ErrorInfo, CA_VariantInt(i+1), CA_DEFAULT_VAL, MyVariant);
 
  i++;
 }

 esito = CA_VariantSetCString (&MyCellRangeV, "A1:A1");
 esito = CA_VariantSetBool (&TempVariant, FALSE);
 esito = Excel_RangeSort (ExcelRangeHandle, &ErrorInfo, MyCellRangeV, ExcelConst_xlAscending, CA_VariantNULL(), CA_VariantNULL(), ExcelConst_xlAscending, CA_VariantNULL(), ExcelConst_xlAscending,
                          ExcelConst_xlNo, CA_VariantNULL(), TempVariant, ExcelConst_xlSortRows, ExcelConst_xlPinYin, &MyVariant); 
}

 

The return value is: -2147352567

Do you have some suggests for me?

 

Fabrizio

iberr = 2[0x2] when using ibwrt() using NI GPIB-USB-HS

$
0
0

I am trying to communicate with an instrument using the gpib library in CVI. I can see and communicate with this instrument in MAX without problems. The instrument is connected to a USB port of the PC using the NI GPIB-USB-HS.  After I create the device using ibdev() when I try to write a command using ibwrt I obtain the following error: Function ibwrt(). iberr == 2[2x02]. Do I need to do something else to being able to communicate with the instrument? Has it something to do with the fact that I am using the NI GPIB-USB-HS adapter? 

 

Thanks in advance,

Manuel

How to delete a tdms & tdms_index file programmable.

$
0
0

I have a tdms and a tdms_index file that I open and display the data on a graph and after which I close.

I then want to delete this file using the function DeleteFile(filename).  I keep getting error -6 access denied. How ever

when I restart the program and go directly to delete the file it works no problem. I stepped through the program to ensure that

I was closing the file before attempting to delete it but I still get the -6 error. Does CVI not release the file until it exits?

Any help would be appreciated.


How to control an usb light / Comment piloter un gyrophare USB ?

$
0
0

Bonjour, devant réaliser un programme, j'ai comme tâche annexe de piloter un gyrophare sonore et lumineux par USB lorsqu'un seuil maximum est atteint. Ma question est donc: est-il possible, via LabWindows/CVI, de piloter ce type d'appareil ? Ou simplement activer ou désactiver l'alimentation d'un port USB?
Cordialement,
Matthieu

Hi, I'm french. During my internship, i have to control a light (like the police car's light) thanks to my computer (USB) thanks to LabWindows/CVI. Is it possible ? Or maybe can we start / stop the power on the differents USB ports ?
Best regards,
Matthieu

Excel Report - Save to specified location?

$
0
0

Hi, 

 

I've been using the Excel Report library to generate an excel sheet for a CVI project (CVI 2015). The library is working fine when I load it as an instrument to create new sheets, rename worksheets and change the file name but I can't seem to find a way to tell the sheet where to save it. I'd like to be able to save it to a specified folder so I'm wondering if there a simple enough solution to this or do I need to change approach?

 

Thanks.

use of undeclared identifier lineitem

$
0
0

When I tried to establish the communication between dde and excel, he suggested that the use of the undeclared identifier, do not know how to build this connection, please explain in detail, thank you!

DAQmx RegisterEvent error

$
0
0

Hi, I have following code:

void SetSingle (TaskHandle AITask)
{
DAQmxCfgSampClkTiming (AITask, "OnboardClock", numberOfSamp*2, DAQmx_Val_Rising, DAQmx_Val_FiniteSamps, numberOfSamp);
DAQmxRegisterDoneEvent (AITask, 0, fcn_measure_finite, NULL); 
}

 

for the first time its called its fine, but when I call this again, it gives me this error:

Done Event Registration has failed because event is already register within the task. Unregister the event before registering it again. I searched internet a lot but havent find anything...any ideas how to unregister event? 

Thanks.

create dll in CVI with C# dll

$
0
0

 i want to create a dll with cvi to call function in a C# dll.

when i use the dll ,which i created,in teststand and find it can't work.

 

TDM C DLL calls work as exe, not as DLL (Error -6204)

$
0
0

Hello all,

 

I was hoping to get some help on creating a DLL (I am using VS2017 but hope people on here might be able to trace or help on the issue) using the TDM C DLL functions.


I had everything working fine but one day the function started returning error -6204 when finding groups, and now I cannot even call the DDCOpenFileEx function without receiving the error.  When compiled as an application, all works fine.  When I change the calls to dll and compile as a DLL it simply returns the error.  Attached is a simple test code trying to simply open and close a TDMS file but when I call from LabVIEW, I cannot get past the error.  

 

I think it might be how I set up the project but want to get some advice.  Attached is the sample code, I can also attach the VS2017 solution if people would like to check my settings as well.  If someone has time to confirm they can get it working, I would greatly appreciate it.

TDM C DLL calls work as exe, not as DLL (Error -6204)

$
0
0

Hello all,

 

I was hoping to get some help on creating a DLL (I am using VS2017 but hope people on here might be able to trace or help on the issue) using the TDM C DLL functions.


I had everything working fine but one day the function started returning error -6204 when finding groups, and now I cannot even call the DDCOpenFileEx function without receiving the error.  When compiled as an application, all works fine.  When I change the calls to dll and compile as a DLL it simply returns the error.  Attached is a simple test code trying to simply open and close a TDMS file but when I call from LabVIEW, I cannot get past the error.  

 

I think it might be how I set up the project but want to get some advice.  Attached is the sample code, I can also attach the VS2017 solution if people would like to check my settings as well.  If someone has time to confirm they can get it working, I would greatly appreciate it.


Lab Windows 2015 Getting Crashed

$
0
0

Hi,

Whenever I restart my PC or when I open and close Lab windows CVI, it is getting crashed. Due to this am not able to run my application in my PC. Can anyone please help me on this. 
Below are the screenshots and details of the Issue that am facing.

2017-04-20 20-18-13_Shishir SumanKumar_0A_Caterpillar ‎[started_ 7_48_14 PM].png

 

Problem signature:
Problem Event Name: APPCRASH
Application Name: cvi.exe
Application Version: 15.0.1.239
Application Timestamp: 57636e58
Fault Module Name: cvirte.dll_unloaded
Fault Module Version: 0.0.0.0
Fault Module Timestamp: 58252fc2
Exception Code: c0000005
Exception Offset: 6886df9b
OS Version: 6.1.7601.2.1.0.256.48
Locale ID: 16393
Additional Information 1: 0a9e
Additional Information 2: 0a9e372d3b4ad19135b953a78882e789
Additional Information 3: 0a9e
Additional Information 4: 0a9e372d3b4ad19135b953a78882e789

Simple console application on real-time target

$
0
0

Hi,

 

I am looking into creating a simple console application on a real-time target. However, it doesn't seem like it will be as easy as I expected. I noticed in the BIOS that Legacy USB Support is turned off since the Boot Configuration is LabVIEW RT, and there seems to be no way to override that. I was hoping to use the stdlib and fgets or something of the sort, but it seems that will not be an option.

 

What are the options I have as far as implementing this? I just need something simple to read in a line from the keyboard when available. 

 

Thanks in advance, and please bear with me, I'm new to LabWindows/CVI Realtime module.

 

Ricardo

InsertTreeItem cause fatal run time error

$
0
0

Run into this weird problem.  The inherited code has ~ 10 thousand lines.

 InsertTreeItem(panel, TREE, .............., NULL);

causes crash ONLY in debug version !  not in release version.

The Tree is defined as an "int", the last parameter (NULL) is invalid, so crash make sense.  But ONLY in debug version ?!  How could this happen ?

From customer point of view, don't fix it if not broken (and I am not paid to fix bugs.  It's a hardware upgrade project.);

from developer point of view, I can't debug this file if not fixed.

 

 

General protection fault when using Windows Creators Update

$
0
0

Hello,

 

I've just migrated to Creators Update, and any application fails when exiting with a "General protection fault" message.

I'm using CVI 2015 SP1f1 and I confirmed the issue on different computers using NI sample projects.

 

Has anyone an idea on how to solve/avoid this issue ?

 

Regards.

 

Extrapolation of an isotherm

$
0
0

Hello,

Please, I am intraineeship and I work on a project and I have been blocked for several days on a problem.

I trace an isotherm that arrives up to 0.23 and I want to extrapolate to 1.

If there are tools that do extrapolation on CVI thank you for helping me or give me ideas how to do.

Thank you all.

Viewing all 5348 articles
Browse latest View live


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