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

Issues with DAQmxStartTask function

$
0
0

Hi Folks,

 

I am using NI-PCI-DIO-96 for IO connections and using NI-DAQmx functions to support in  CVI.

 

 The issue is when i call DAQmxStartTask  function to start a new task for a new port in same device (eg: switching from port0 tasks to port1 tasks for Dev1), all my previous tasks on port0 are reset to 0. The system seems unable to hold previous values for that port.

 

When i emulate the same in NI-MAX using test-panels, i dont see any issues while setting different channels in different ports.

 

Can you please help to figure-out any possible fixes for this ?

 

Thanks,

Jack

 


Missing "OK" button label in MessagePopup window after CVI 2017 run time update

$
0
0

Hello

 

I have a new PC with Windows 10 Professional 32bit ver 1706;

On this computer there were installed few LabWindows7 applications (only with run time).

Because I also have applications programed in newer versions of the LabWindows 2015, 2017, I decided to update run time engine on this PC.

After that, in every LabWindows application, there is missing "OK" button label in MessagePopup window (picture below).

Popup_OK.png

 

Rest popup windows look fine.

MessagPopup returns no error;

 

First installation 2017 run time was correct, without any errors. After as I found the problem, run time was reinstalled and next completely removed.

I tried to find any registry entries connected with creating Dlg box in Windows but with no result; I tried to check if there are any problems with fonts.

 

I probably have to reinstall the system but before that I would like to ask if anyone had similar problem and like to share with the solution or have an idea what I can do anymore?

 

Thanks for any advice

 

Boolean macros definitions

$
0
0

Hello everybody,

I am back to an issue I see it was touched here and there, but I would like to come to a "standard" solution for it.

I am using LabWindows/CVI 2017, so it has clang 3.3, with most of the clang 3.3 headers available.
I told the IDE to include the path to the clang 3.3 include files in its directories for compiling, plus I AM using the clang compiler.

I want to use bool, false and true ANSI C99 macros as per the C99 documentation and the clang 3.3 documentation.

I therefore #include <stdbool.h>

Compile error: use of undeclared identifier 'false'
Where the problem may come from? I opened stdbool.h and found:

 

#ifndef __STDBOOL_H
#define __STDBOOL_H

/* Don't define bool, true, and false in C++, except as a GNU extension. */
#ifndef __cplusplus
#define bool _Bool
#define true 1
#define false 0
#elif defined(__GNUC__) && !defined(__STRICT_ANSI__)
/* Define _Bool, bool, false, true as a GNU extension. */
#define _Bool bool
#define bool  bool
#define false false
#define true  true
#endif

#define __bool_true_false_are_defined 1

#endif /* __STDBOOL_H */

 

This is very straightforward code, so I came up with a very silly idea: in my header file (.h) I catch-up the definition of these macros before and after the stdbool.h inclusion:

 

#ifdef __STDBOOL_H
    #error __STDBOOL_H defined already!
#else
    #error __STDBOOL_H NOT defined!
#endif
#ifdef __cplusplus
    #error __cplusplus defined! Graph.h will undefine it so that stdbool.h can define it again
    #undef __cplusplus
#else
    #error __cplusplus NOT defined!
#endif
#ifndef bool
    #error bool NOT defined!
#else
    #error bool defined already!
#endif
#ifndef false
    #error false NOT defined!
#else
    #error false defined already!
#endif
#ifndef true
    #error true NOT defined!
#else
    #error true defined already!
#endif
#ifdef __bool_true_false_are_defined
    #error __bool_true_false_are_defined ARE defined already!
#else
    #error __bool_true_false_are_defined NOT defined!
#endif

#include <stdbool.h>

#ifndef bool
    #error bool NOT defined!
#else
    #error bool defined already!
#endif
#ifndef false
    #error false NOT defined!
#else
    #error false defined already!
#endif
#ifndef true
    #error true NOT defined!
#else
    #error true defined already!
#endif
#ifdef __bool_true_false_are_defined
    #error __bool_true_false_are_defined ARE defined already!
#else
    #error __bool_true_false_are_defined NOT defined!
#endif

 

 When I build the project, I get this from the code file (.c) compilation:

 

error: #error __STDBOOL_H NOT defined!

error: #error __cplusplus NOT defined!

error: #error bool NOT defined!

error: #error false NOT defined!

error: #error true NOT defined!

error: #error __bool_true_false_are_defined NOT defined!

error: #error bool defined already!

error: #error false defined already!

error: #error true defined already!

error: #error __bool_true_false_are_defined ARE defined already!

error: use of undeclared identifier 'false'

 

Can anybody help me, please?

intmax_t and uintmax_t definition

$
0
0

This one is more tricky, as I can't do much as far as the code goes.

LabWindows/CVI 2017, I have this code compilation error:

In file included from p:\3. Engineering\3. R&D\70. OCT-MV\3. Development\2 Work\software development\C code\LabWindowsCVI\FASTTEST_GUI\macros.h:5:

"ansi_c.h"(31,1) In file included from c:\program files (x86)\national instruments\cvi2017\include\ansi_c.h:31:

"inttypes.h"(241,1) error: unknown type name 'intmax_t'

 

In inttypes.h the intmax_t and uintmax_t typedefs are used. They both produce this error.

intmax_t and its unsigned sibling are declared in stdint.h, though, and stdint.h is included both in ansi_c.h just before inttypes.h, and in inttypes.h itself!

So, why can't I have them acknowledged in my source code?

 

Function 'fwprintf' - CVI Library

$
0
0

Hi,  

 

I am trying to compile and application where they have used fwprintf function, which is normally exist in "wchar.h" library. Is there anyone know which CVI library have this function ?

 

169, 9 error: implicit declaration of function 'fwprintf' is invalid in C99. Make sure that you include the function prototype.

 

Thanks

How to show the live view of the integrated computer/tablet webcam (Win 10)?

$
0
0

I use Labwindows\CVI 2017, and I want to show the live view of the integrated computer/tablet webcam (OS Windows 10).

 

How can I do this? I don't find any solution.

Is there an ActiveX or something else to do this?

 

Does anyone have an example that suits me?

 

Thanks you very much!!!

 

How to generate a function panel file (.fp) properly in CVI

$
0
0

Hi!
[Windows 10; CVI 2015  15.0.0(413)]
I am developing a .dll in c using LabWindows/CVI. I need a .fp file to include it in the .dll so i can see function prototypes when i include the .dll in TestStand. 

I have difficulties creating a .fp file. When i see guideline for creating .fp (http://www.ni.com/tutorial/6503/en/#toc6) i can see, that after creating the fp, there is already filled functions. But that doesnt work for me. When i go Options-> Generate Function Tree... i get the .fp file, but it is empty! Not prefilled with function prototypes.
Why in the guidline i have provided earlier (http://www.ni.com/tutorial/6503/en/#toc6) there are generated functions in the .fp file? What i need to do to achieve the same result? I want to avoid adding the functions manually and filling the parameters my self. 

I am enclosing snippets of my header file and what i fill into "generate function tree dialog".

Thanks for responds!

How to manual/auto scroll a listbox ?

$
0
0

Hello, hello,

so I have a list box where lines get added at the bottom continuously. I normally call

InsertListItem(pFil, FIL_LISTBOX, -1, Line, 0);

GetNumListItems (pFil, FIL_LISTBOX, &Size);
SetCtrlAttribute(pFil, FIL_LISTBOX, ATTR_CTRL_INDEX, Size-1);

so that the last line is visible at the bottom.

 

But if I add a vertical scroll bar, and I would like to stop the scrolling (while still adding new lines) if the user moves the scroll bar anywhere but the bottom position.

Catching the EVENT_VSCROLL event seems to give me the top index in eventData2 but I don't see how to use that info. First I have to wait for the user to release the mouse (or keyboard ?) This newTopIndex seems different that what I can read with GetCtrlAttribute(...ATTR_CTRL_INDEX...) Why is that ?


User switch between tab and independant panel

$
0
0

Hello all,

sometimes a panel is better in it own window, sometimes it's better as part of a tab... and sometimes the user can't make up his mind and it would be nice to have the possibility to switch between one and the other at will. I know there are a few differences between using a tabbed panel and a separate one, so before I spend some time on this, are there any examples of .UIR where the user can separate at will ?

For instance I don't think you can drop a panel onto a tab and hope to catch a DROP even. So some kind of button would be required. Any other issues to consider ?

Thanks.

content writing companies in india

$
0
0

iRealities offers affordable & high quality corporate content writing services, The company provides for low cost documentary film production services in Mumbai, eLearning is the use of technology to enable people to learn anytime and anywhere.

 

corporate content writer, corporate content, content creation agency, corporate content writing, content creator, content marketing, content marketing agency, content marketing strategy, content writing, content writing services

Unable to Load DLL's to RealTime Target

$
0
0

Hello,

 

I am trying to do deploy a code to a realtime Target from CVI, but getting some DLL errors. Before going to the details, here are the system details

  • Windows 7 Desktop PC (64bit OS)
  • NI Reatime 15 installed on PXI reatime target
  • LabWindows/CVI 2015 on Desktop pc
  • Microsoft visual c++ redistributable and run time components are installed on the pc

When attempting to deploy the code the following error messages were shown.

2.png

 

after clicking continue in the above dialog, following error appears.

1.png

 

The error on build output says "MSVCP100.dll (also MSVCR100.dll) cannot be copied to target because it could not be found"

 

if trying to use some daqmx functions, the following error also appears.

 

3.jpg

 

I have verified that MSVCP100.dll, MSVCR100.dll and nicaiu,dll are present in the Windows/System32 folder. 

what could be the problem? The RT system is fine though when simple codes are deployed.

 

 

localui building in visual studio

$
0
0

Hello,

 

I'd like to build 64bit .exe of labwindows cvi2012 program in visual studio 2012.

Localization lib (msvc64\localui.lib) is crashing on a free error while localizing the panels.

This error doesnt appened in the 32bit compilation of the software.

I'd like to add sources (like i did for inifile and toolbox) but i dont find any .c for localui.

Is there a way to download localui sources ?

 

Best regards,

 

G. Lacroix

CVI different Timers

$
0
0

Hi,

i Need some help to use two different timers in cvi (use with CVICallback).

I have tried several things, but with no really good solution.

 

What i want to do:

1.) I have two timers ( 1rst: 10seconds  2nd: 20seconds)

2.) With a START button i want to start the first timer(only one cycle ->10secons)

3.) If the cycle from the 1rst timer is elapsed, the second timer should be started.(also only one cycle)

4.) If the cycle from the 2nd timer is elapsed, the first one should be started again.(only one cycle).

5.) if i press a STOP button, all timers should be reseted.

6.) If START is pressed again ......Point Nr. 2...

 

It is like a pulse Generator, but i want to start every pulse manually.

 

I have written a code, with Timer CVICallback and Events: EVENT_TIMER_TICK....

Maybe anyone can give me a short example.

Many thanks,

Build EXE and create a install volume only with older LabWindows-CVI Runtime

$
0
0

Until a few days ago I only had installed LabWindows-CVI 2012 (SP1) [with Developer Suite 2012].

A few days ago I installed Multi-IDE Bundle 2017.

I can still open my projects in LV 2012 and I am able to compile them, but...

...now there is always added the LV 2017 Runtime to the installer package and after Installation a message claims that there is a DLL missing (mesa.dll) but this DLL is in the "Nation Instruments"-folder, but maybe in a newer version and the older one is needed...?

 

My question is:

By running more than one LabWindows-CVI-Version on a computer is it possible to create an EXE and an installer package ONLY with a CVI-Runtime of that one (old or new) LabWindows-CVI-Version?  (I need this for reason of compatibility.)

Could I set anywhere "use only LabWindows 2012" library/Runtime for "build"...?

lightbulb recording?

$
0
0

hi guys,
I am currently working on drivers for measurement board (glorified multichannel osciloscope)
I need the board plugged in order to run the driver, and they need to communicate in real time (at least as real as windows can provide)
I still need to fix few things, and lightbulb would probably help, but I cannot use it due to the driver losing synchronization with board and everything crushing.

 

Is there a way to set labview to record the execution of the program to see it in "slow motion"/"lightbulb mode" afterwards?

I apologize if the question is to easy, I could not find any viable answers on the internet.


Assembling a packet from a mixture of chars arrays and an int using Fmt

$
0
0

Hi,

I need to assemble a packet containing 2 qualifier bytes, 2 length bytes big endian, and variable length command bytes.

I can do this in one line and this is what I have come up with:

 

int Send((unsigned char *command,int port,int length) 

unsigned char qualifiers[] = {0xAA,0x55,0}; 

unsigned char packet[0x10005];

//length is length of command array and stored as little endian on my machine.

Fmt(packet,"%s%c[b2o1]%c%s[t-w*]",qualifiers,length,length,length,command);

 

To get the 2 length bytes in place with high order byte first i'm using the byte order modifier. Since i'm printing to a string I need to use %c because I don't want the int length converted to ascii. But i need length to appear twice as an argument to fill in the 2 length bytes in my packet.

Is there anyway to get the length in the packet correctly with 1 less length argument?

 

Thank you

CVI - Windows 10 - can't load DLL with VBA

$
0
0

I made a simple dll with Labwindows/CVI same years ago.

This DLL is located in the program folder and loaded from my cvi program; everything works fine.

Also I load the dll from a Excel Makro to use 3 exported functions.

 

This worked fine on XP and also on WIn7-32 and WIN7-64.

 

Now we want to use it on WIN-10 systems and it dosn't work on all this systems:

 

The CVI program normaly loads and uses the dll.

But the macro can't load or use the dll functions.

The error is "File not found", but the dll is in the right (same) directory.

 

If I take the folder identical to my WIN7-64 system it works.

 

Who can help me:

What changed in WIN10 for loading dll?

What can I do ?

 

 

Real-time OpenMP LabWindows CVI support

$
0
0

It appears that LabWindows CVI does not support OpenMP when using a real-time target.

 

When I change to a real-time target:

Build -> Configuration -> Manage Configurations... --> Edit... --> Target Settings --> Run-time support: --> Real-time only

 

This checkbox is grayed out:

Build -> Configuration -> Manage Configurations... --> Edit... --> Build Options... --> Enable OpenMP Support

 

I could not find any documentation stating that OpenMP is not supported on the RT target. Is the RT target explicitly not supported, or is there another setting I need to change?

 

LoadPanelEx error -94 when dll called from TestStand

$
0
0

Calling my LabWindows/CVI DLL from Teststand

I am getting Error -94 File not found from

panelHandle = LoadPanelEx(0, "Some.uir", PANEL, 0)

Target setting "Embed project .UIRs" is checked on the DLL project

If I step through the code within LabWindows/CVI I do not get the error

If I operate the DLL through a CVI executable application, I also do not get the error

The panel does not require user interraction.

Any Ideas?

 

Using Fieldpoint with CVI 2017

$
0
0

I am trying to use Compact Fieldpoint with CVI 2017.  Yes, obsolete hardware with new dev environment.  I have no choice, until "they" come up with money to refresh the DAS equipment.

 

I installed latest Fieldpoint drivers, version 15.x.  Recompiled the older app that uses Fieldpoint, launched it -- immediate error.  Cannot execute because the app is looking for cvirt.dll.  Not cvirte.dll, but cvirt.dll.  What in the world is it.  Is there a workaround?

 

Will appreciate help really fast.  Thanks...

Viewing all 5339 articles
Browse latest View live


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