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

Running in Compiler Define Switch?

$
0
0

Difficult to know how to ask this question?  Is there a #define that lets me know if I am running in CVI or as an executable.  Would be nice for debuggging, as I can put in test code that would not execute when I create the executable for distribution.

 

Just wondering..

 

Thanks, David


ni-272x modules on CVI program

$
0
0

Hello,

 

I tried to put ni-272x moudule for CVI applications and can't find the library or Instruments on my file system(C:\Program Files (x86)\IVI Foundation\VISA\WinNT).

 

Could you help me to find such as ni272X.fp (I guess...)?

 

 

Thank you so much,

 

Insuk 

 

Define ACQUISITION_START_TIME to Tektronix DPO3034

$
0
0
Hello,

I'm trying to define ACQUISITION_START_TIME to Tektronix DPO3034 through USB interface with CVI.
I managed to install the driver and can communicate with the oscilloscope.
When I write the delay value (3.5334E-005) this is what i get from the Spy:

1. IviScope_SetAttributeViReal64 (DPOScope, NULL, ACQUISITION_START_TIME, 3.5334E-005)
Process ID: 0x00001534 Thread ID: 0x00000874
Start Time: 17:29:42.456 Call Duration 00:00:00.015
Status: 0 (VI_SUCCESS)

That means that the right command was passed.
But... the delay in the scope comes with 0.4us resolution. That means that i can get ACQUISITION_START_TIME values of only 3.56E-005, 3.6E-005 etc.
This is what I get in the spy with GetAttribute command imeddiatley after the above SetAttribute command:

4. IviScope_GetAttributeViReal64 (DPOScope, NULL, ACQUISITION_START_TIME, 3.56E-005)
Process ID: 0x00001534 Thread ID: 0x00000874
Start Time: 17:34:11.995 Call Duration 00:00:00.016
Status: 0 (VI_SUCCESS)
(The actual delay on the scope screen is also 3.56E-005...)

Thank you for your assistent!

How to call a TestStand sequence from LabWindows/CVI

$
0
0

Can anyone point me to some documentation that will instruct me on how to execute TestStand sequences from within LabWindows? Are there any tutorials that explain the process?

 

I have done this years ago with LabVIEW. The company that I just started working at has asked me to determine how to do this from LabWindows. The company has a fully automated TestStand sequence to test their product. They want to give the technicians/developers the ability to test different components of their product. They prefer to execute selected parts of the fully automated TestStand sequence, such as power on, and then give instrument control to the technicians/developers for testing various failed parts of the total product. They want to do this from within LabWindows. Right or wrong, that is their decision that I must make work.

 

Thank you in advance for any help that you can recommend.

 

Bill

 

How to call a TestStand sequence from LabWindows/CVI

$
0
0

Can anyone point me to some documentation that will instruct me on how to execute TestStand sequences from within LabWindows? Are there any tutorials that explain the process?

 

I have done this years ago with LabVIEW. The company that I just started working at has asked me to determine how to do this from LabWindows. The company has a fully automated TestStand sequence to test their product. They want to give the technicians/developers the ability to test different components of their product. They prefer to execute selected parts of the fully automated TestStand sequence, such as power on, and then give instrument control to the technicians/developers for testing various failed parts of the total product. They want to do this from within LabWindows. Right or wrong, that is their decision that I must make work.

 

Thank you in advance for any help that you can recommend.

 

Bill

 

thread won't run in release mode

$
0
0

My application runs fine in Debug mode. I have several threads. A couple just blink some LEDS. In release mode they don't blink and my main function that is triggered by a button which runs a callback function that launches another thread doesn't work. 

Strip Chart history buffer

$
0
0

Hallo,

 

I have a little crazy question - is there some possibility to access strip chart history buffer?

 

I'm just lazy to develop data circular buffer management ....

 

Thanks a lot for any hint!

 

George

repackaging an instrument driver with CVI

$
0
0

Is it possible to create a distribution in CVI with out any source code to be compiled ?

Background : We want to port a program which uses an old HP 8712 analyzer to Windows 7 ( 64bit edition) . The installer for the instrument driver is a 16bit program . So it doesn't run on Windows 7 any more. The instrument driver  itself is a 32bit dll. But the source code provided is written in C++.So  you can't recompile from sources in CVI. The Idea is now to install the driver on  XP (32bit) and create an CVI distribution, which only contains the files installed by the old installer.

Is this possible ?  


MSCAL Read date incorrect.

$
0
0

I am developing an application in CVI 2012.  I am using Microsoft's Calendar Control to give the user a popup calendar to select a date.  It is an ActiveX control.  There are two different instances of this control in the program.  In the first instance, everything works as it should: the calendar pops up (i.e. is made visible), the user can select a date and the selected date is displayed in an indicator.  The second instance does not work as expected.  This is a list of what happens:

1. The first time the calendar is made visible, I set the date  using MSACAL_ICalendarToday.  When I read back the date from the calendar (using MSACAL_ICalendarGetYear, MSACAL_ICalendarGetDay, MSACAL_ICalendarGetMonth), I get the expected values but the calendar display is not updated.  That is, if the calendar has a value of 1/1/2014 set while editing the UIR file, if I set the calendar value to today (1/29/2014) I will read back 1/29/2014 but the calendar will continue to display 1/1/2014.

2. If I change the date on the calendar by clicking on a day (say 1/2/2014) the appropriate day will be highlighted but when I read back the date I get the date set in item #1 (1/29/2014). 

 

I am using exactly the same code for the first instance as the second instance except there are separate callback functions for each instance (and the variable names have been changed).  

 

It seems like the set functionality is working to the extent that the values are being set in memory but not updated on the GUI and then the get functionality is getting the values in memory but not what the user has actually selected.

 

Any thoughts?

 

Thanks.

How send menu shortcut keystroke from child to parent panel

$
0
0

Hello,

 

I have simple question:

 

Parent (main) panel has a menubar and menuitems (menu_callbacks), with some shortcut keys (like <F5>, <Ctrl>+<R> etc).

 

The task is propagate the keystroke from the child panel to the parent panel when the parent panel is INACTIVE.

 

I try to make solution via EVENT_KEYSTROKE and CallPanelCallback(), but this solution doesn't work correctly ...

 

Any hits will be appreciated!

 

George

LaunchExecutableEx() windowstate not working

$
0
0

I have the following line of code:

 

LaunchExecutableEx("C:\\Programs\\1234.exe", LE_SHOWMINIMIZED, &handle);

 

The problem I am having is that the exe launches in a maximized state even though I have selected a windowstate of LE_SHOWMINIMIZED, even with LE_HIDE.

 

What could this be??

SetCtrlVal used during Thread Function is working causes memory leaks

$
0
0

I am writing a program which works if... Or works not if...  - see the next lines... :-) ...

 

The program has one part, mainly GUI- and User-Interaction.

The other part is a DLL. In the DLL there are readouts over RS232 from a external controller-board. Sometimes the controller-board needs some time (known how much) and this time must pass by then the result can be read out from the controller board ... and so on ...

By not blocking the GUI-User-Program for waiting the return-value of the the DLL-functions (which need some seconds to be finished) I start in the DLL a thread with

 

CmtScheduleThreadPoolFunction(DEFAULT_THREAD_POOL_HANDLE, THREAD_FunctionX, &tmpTFP, NULL);

 

with "tmpTFP" as a type-instance of "TYPE_THREAD_FUNCTION_PARAMETERS":

typedef struct
{
    //
    int IntVal1;                // 1. Integer-Wert
    int IntVal2;                // 2. Integer-Wert
    int IntVal3;                // 3. Integer-Wert
    int IntVal4;                // 4. Integer-Wert
    int IntVal5;                // 5. Integer-Wert
    //
    int IntBuffer1[32];            // 1. Integer-Buffer (aktuell genügt einer)
    //
    double DblVal1;                // 1. Double-Wert
    double DblVal2;                // 2. Double-Wert
    double DblVal3;                // 3. Double-Wert
    double DblVal4;                // 4. Double-Wert
    double DblVal5;                // 5. Double-Wert
    //
    char CharVal1;                // 1. (Einzel-)Char-Wert
    char CharVal2;                // 2. (Einzel-)Char-Wert
    char CharVal3;                // 3. (Einzel-)Char-Wert
    char CharVal4;                // 4. (Einzel-)Char-Wert
    char CharVal5;                // 5. (Einzel-)Char-Wert
    //
    char CharBuffer1[1024];        // 1. Char-Buffer (akutell genügt einer)
    //
} TYPE_THREAD_FUNCTION_PARAMETERS;

In the GUI-User-Program I get quick a default-return-value of the thread-starting function.

Then I poll the DLL (some global state-variables are used for that) when it is finished.

Depending on the contacted (RS232) controller-board the waiting time depends on the "mood" of the controller-board.

 

In the DLL-polling-routine of the GUI-User-Program now everything is working fine - without using "SetCtrlVal" !

 

In my GUI there is a info/comment text-box for messages. If I make some User-Outputs by using "SetCtrlVal" I get always errors, caused by wrong "TYPE_THREAD_FUNCTION_PARAMETERS"-values in the thread-function. If I set a break-point at the thread-function start I see mostly false values in my transfer-structure-variables. If I set a break-point at the thread-function-caller "CmtScheduleThreadPoolFunction(...)" and at the beginning of the thread the values are (mostly) correct!

 

I tried many and different things - but:

If I  ONLY (!)  commenting out the one (!) line with "SetCtrlVal" the program works, all states are polled well out of the DLL.

If I replace the "SetCtrlVal" with a own written logging-file function everything works fine and after the program finished I can watch the log-file and see all user-info's. BUT with "SetCtrlVal" instead or together or (...) it does not work.

 

Maybe my description is not totaly clear, but believe me: ONLY ONE line - the "SetCtrlVal"-line - must be comented out to let the program work fine!

Because if the "SetCtrlVal"-line is in GUI-User-program, after the thread-call in the DLL, the DLL-Memory seems to be corrupted by the "SetCtrlVal"-Call in the GUI-User-program.

 

Best regards,

F.

 

'Speed' errors while accessing mouse click events?

$
0
0

Hi,

   I have built a software where the the panel has a CVI callback function registered. The function tests whether for two cases, first EVENT_LEFT_CLICK, and then EVENT_LEFT_CLICK_UP. The user is supposed to maintain the click pressed for a while (~1 second), and there is no problem there. However, I have found that if by error (that users often commit) several quick clicks are made, sometimes the click down event (EVENT_LEFT_CLICK) piece of code is not read. I have reduced the probability of that problem by setting the speed of double click (on Windows) at the maximum. 

I suspect that if I could eliminate the double click event, this problem would be almost completely solved, and only limited by the speed at which the processor can update the mouse events.

 

Hope you understand my problem.

Thanks!!

 

 

 

Undefined symbol ___cvi_toolbox_smart_type_default_types

$
0
0

Hi,

 

I have a project that was last built using CVI Version 9.1.0 (Build 427).

 

I need to modify it and would like to use the latest version of CVI.

 

The build fails with a linker error:

 

Undefined symbol '___cvi_toolbox_smart_type_default_types' referenced in "toolbox.obj".

 

I presume one of the toolbox functions I've used has been changed or depeciated, but which one?

 

Does anyone know which function this error is associacted with? I'd rather not have to look for every programmer's toolbox funtion in my project.

 

Regards,

 

John

Traces in labwindows GRAPH

$
0
0

Hi i have a question , Idont know how to put two or more traces(I mean grafics) in the same GRAPH,somebody can help with that question, sorry for my English.

Alex

 


mensaje de error VIPM-Batch Process Error

$
0
0

error.png

 

 

Muy buenas noches, disculpen que moleste pero es que tengo este problema estaba intentando intalar el toolkit de arduino para labview 2013 pero me salió este mensaje de error y la verdad nose que hacer y quisiera que alguien me pudiera orientar para que pueda resolver este problema. 

La computadora que tengo es una HP Pavilion g4 Notebook PC procesador AMD-E2 VISION

Windows 8 pro.

64 bits

excelreportdemo project link error with CVI2010 on windows 7, 64-bit operating system

$
0
0

I am trying to run the excelreportdemo project in CVI2010 on windows 7, 64-bit operating system. I have the Excel2013 installed as well. I have chosen the build configuration as release or debug for 32 bit system so to be compatible for the test platform for production.

 

However, I get 12 Project link errors as following:

 

Undefined symbol '_ExcelRpt_RangeBorder@24' referenced in "excelreportdemo.c".
Undefined symbol '_ExcelRpt_WriteDataFromTableControl@16' referenced in "excelreportdemo.c".
Undefined symbol '_ExcelRpt_SetCellValue' referenced in "excelreportdemo.c".
Undefined symbol '_ExcelRpt_SetCellRangeAttribute' referenced in "excelreportdemo.c".
Undefined symbol '_ExcelRpt_ChartAddtoWorksheet@40' referenced in "excelreportdemo.c".
Undefined symbol '_ExcelRpt_ChartWizard@52' referenced in "excelreportdemo.c".
Undefined symbol '_ExcelRpt_SetChartAttribute' referenced in "excelreportdemo.c".
Undefined symbol '_ExcelRpt_WorkbookNew@8' referenced in "excelreportdemo.c".
Undefined symbol '_ExcelRpt_ApplicationNew@8' referenced in "excelreportdemo.c".
Undefined symbol '_ExcelRpt_ApplicationQuit@4' referenced in "excelreportdemo.c".
Undefined symbol '_ExcelRpt_WorkbookClose@8' referenced in "excelreportdemo.c".
Undefined symbol '_ExcelRpt_WorksheetNew@12' referenced in "excelreportdemo.c".

 

I have found a previous dicussion back in 2007. Unfortunately it did not help for the same problem on my new machine and CVI2010. Could anyone give me help on this/

 

Thanks!

 

Yuwei

 

 

.NET framework 4 cvi 9.0

$
0
0
Does CVI 9.0 support Microsoft .NET framework 4

what's a callback function?

$
0
0

 

What’s a callback function? 

I opened “a project from template”.  I selected a .uir.  I placed a box that I could put text in.  I double clicked on the box and an edit string box opened.  It’s looking for a Source Code Connection.  It wants a Constant name.  And in the next box it wants a Callback function.  I have some code that I think will make some resistance measurements using an Agilent 34970A.  There are a bunch of AG34970A_MeasureResistance(&gpib… things. 

 

Is the Callback function “AG34970A_MeasureResistance”? 

 

Charlie Reiss

410 993 1418

Baltimore, MD

Trying to use the NI discussion forum. 

I do see that this measurement routine starts with

Int ResistanceTest(double measurement[8])

Could that be what I should put in the Callback function box … ResistanceTest  ? 

 

Screen readers for blind users

$
0
0

Has anyone had experience with screen readers such as JAWS being used to read CVI apps?  Are there developer side issues I need to address? I'm just starting to learn about this, and would appreciate any CVI specific advice.

 

Thanks,

Ian

Viewing all 5362 articles
Browse latest View live


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