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

display actual time like a digital clock

$
0
0

Are there better ring control options?  I'm looking for one that allows text input into the selection like a text string.  I've found that when the standard ring control has focus, the up/down cursors are the only supported keyboard keys for navigation.  

 

It would be great if you could start typing and it would navigate toward your choice.


My application seems to randomly lose focus?

$
0
0

Hi,

 

I have a CVI application that uses an ActiveX control to display a PDF file on a panel.  I created navigation buttons to allow a user to view the next / previous PDF file in a series.  The names of the PDF files included in the series are read from a configuration file so that the PDF file library content can be tailored for a particular need.

 

The app is working pretty well except that when I select my 'NEXT' navigation button to display the next PDF file in the series, it works 2, maybe 3, sometimes 4, but rarely 5 times in a row until my project quits executing the command button callback events.  It seems random on how many times it might work before this happens.  I found that if I click somewhere off my app panel, I can then come back to my app and click my 'NEXT' button and will work again for a few more tries and then hang again.

 

Note: my app has a timer and its events continue to run when the problem occurs, so based on forum searches, I've attempted to put 'SetForegroundWindow'() and 'MakeApplicationActive'() calls into the timer callback but I still can't get my app to retain focus.  This behavior really has me baffled.

 

Any ideas?  Thanks!

 

Tim

CVI 2010 missing EVENT_VAL_CHANGED

$
0
0

We are using LabWindows 2010 SP1 on Windows 7 and Windows 10.  Our application was upgraded from LabWindows 7.  Never had this problem in LabWindows 7.

 

We have are having a problem that the EVENT_VAL_CHANGED is not being sent to our callbacks after a ring selection has been changed.  This happens in release mode and when debugging the program in the IDE.  This happens with more than one ring control but is somewhat random when it will popup (problem happens 5% of the time).

 

Ring control mode is Hot in the UIR.  No SetCtrlAttribute calls were made on the ring control.

Steps:

1) Change ring selection from default selection, no callback

2) Change the ring selection back to the default selection, no callback

3) Change ring selection from default selection, no callback

4) Change the ring selection back to the selection value, no callback

5) Change ring value from default value, the program does get a callback with EVENT_VAL_CHANGED

 

What could cause the event to be lost?

 

better ring controls

$
0
0

Are there better ring control options?  I'm looking for one that allows text input into the selection like a text string.  I've found that when the standard ring control has focus, the up/down cursors are the only supported keyboard keys for navigation.  

 

It would be great if you could start typing and it would navigate toward your choice.

2017 Windows SDK compiler issues

$
0
0

I've tried to compiling code with LabWindows CVI 2017 that compiled on LabWindows CVI 2013.  I get errors when it is using the SDKHeaderFiles 8.1, would anyone know why?

 

 

Build Status (SDSR_VATS.prj - Release)
429_Test.c - 20 errors
25, 1 In file included from c:\WorkData\VATS\5798 Automated Test System\src\429_Test.c:25:
"Windows.h"(214,1) In file included from C:\Program Files (x86)\National Instruments\Shared\MSDTRedistributables\SDKHeaderFiles\8.1\windows.h:214:
"WinBase.h"(31,1) In file included from C:\Program Files (x86)\National Instruments\Shared\MSDTRedistributables\SDKHeaderFiles\8.1\winbase.h:31:
"minwinbase.h"(111,5) error: unknown type name '_Field_z_'
"minwinbase.h"(111,19) error: expected ';' at end of declaration list
"minwinbase.h"(112,5) error: unknown type name '_Field_z_'
"minwinbase.h"(112,15) error: duplicate member 'CHAR'
"minwinbase.h"(111,15) note: previous declaration is here
"minwinbase.h"(112,19) error: expected ';' at end of declaration list
"minwinbase.h"(128,5) error: unknown type name '_Field_z_'
"minwinbase.h"(128,20) error: expected ';' at end of declaration list
"minwinbase.h"(129,5) error: unknown type name '_Field_z_'
"minwinbase.h"(129,15) error: duplicate member 'WCHAR'
"minwinbase.h"(128,15) note: previous declaration is here
"minwinbase.h"(129,20) error: expected ';' at end of declaration list
25, 1 In file included from c:\WorkData\VATS\5798 Automated Test System\src\429_Test.c:25:
"Windows.h"(214,1) In file included from C:\Program Files (x86)\National Instruments\Shared\MSDTRedistributables\SDKHeaderFiles\8.1\windows.h:214:
"WinBase.h"(38,1) In file included from C:\Program Files (x86)\National Instruments\Shared\MSDTRedistributables\SDKHeaderFiles\8.1\winbase.h:38:
"fileapi.h"(934,75) error: expected identifier
"specstrings.h"(337,45) note: expanded from macro '__out_data_source'
"specstrings.h"(49,68) note: expanded from macro '_SAL_L_Source_'
1, 1 <scratch space>:61:1: note: expanded from here
25, 1 In file included from c:\WorkData\VATS\5798 Automated Test System\src\429_Test.c:25:
"Windows.h"(214,1) In file included from C:\Program Files (x86)\National Instruments\Shared\MSDTRedistributables\SDKHeaderFiles\8.1\windows.h:214:
"WinBase.h"(38,1) In file included from C:\Program Files (x86)\National Instruments\Shared\MSDTRedistributables\SDKHeaderFiles\8.1\winbase.h:38:
"fileapi.h"(934,75) error: expected ')'
"specstrings.h"(337,45) note: expanded from macro '__out_data_source'
"specstrings.h"(49,84) note: expanded from macro '_SAL_L_Source_'
"fileapi.h"(932,9) note: to match this '('
"fileapi.h"(954,50) error: expected identifier
"specstrings.h"(337,45) note: expanded from macro '__out_data_source'
"specstrings.h"(49,68) note: expanded from macro '_SAL_L_Source_'
1, 1 <scratch space>:61:1: note: expanded from here
25, 1 In file included from c:\WorkData\VATS\5798 Automated Test System\src\429_Test.c:25:
"Windows.h"(214,1) In file included from C:\Program Files (x86)\National Instruments\Shared\MSDTRedistributables\SDKHeaderFiles\8.1\windows.h:214:
"WinBase.h"(38,1) In file included from C:\Program Files (x86)\National Instruments\Shared\MSDTRedistributables\SDKHeaderFiles\8.1\winbase.h:38:
"fileapi.h"(954,50) error: expected ')'
"specstrings.h"(337,45) note: expanded from macro '__out_data_source'
"specstrings.h"(49,84) note: expanded from macro '_SAL_L_Source_'
"fileapi.h"(952,11) note: to match this '('
25, 1 In file included from c:\WorkData\VATS\5798 Automated Test System\src\429_Test.c:25:
"Windows.h"(214,1) In file included from C:\Program Files (x86)\National Instruments\Shared\MSDTRedistributables\SDKHeaderFiles\8.1\windows.h:214:
"WinBase.h"(42,1) In file included from C:\Program Files (x86)\National Instruments\Shared\MSDTRedistributables\SDKHeaderFiles\8.1\winbase.h:42:
"errhandlingapi.h"(88,1) error: unknown type name '__callback'
"errhandlingapi.h"(90,5) error: expected ';' after top level declarator
"errhandlingapi.h"(115,16) error: expected identifier
"specstrings.h"(481,78) note: expanded from macro '_Post_equals_last_error_'
25, 1 In file included from c:\WorkData\VATS\5798 Automated Test System\src\429_Test.c:25:
"Windows.h"(214,1) In file included from C:\Program Files (x86)\National Instruments\Shared\MSDTRedistributables\SDKHeaderFiles\8.1\windows.h:214:
"WinBase.h"(42,1) In file included from C:\Program Files (x86)\National Instruments\Shared\MSDTRedistributables\SDKHeaderFiles\8.1\winbase.h:42:
"errhandlingapi.h"(115,40) error: expected ';' after top level declarator
25, 1 In file included from c:\WorkData\VATS\5798 Automated Test System\src\429_Test.c:25:
"Windows.h"(214,1) In file included from C:\Program Files (x86)\National Instruments\Shared\MSDTRedistributables\SDKHeaderFiles\8.1\windows.h:214:
"WinBase.h"(46,1) In file included from C:\Program Files (x86)\National Instruments\Shared\MSDTRedistributables\SDKHeaderFiles\8.1\winbase.h:46:
"heapapi.h"(113,5) error: expected identifier
"specstrings.h"(392,35) note: expanded from macro '_Frees_ptr_opt_'
"specstrings.h"(49,68) note: expanded from macro '_SAL_L_Source_'
1, 1 <scratch space>:61:1: note: expanded from here
25, 1 In file included from c:\WorkData\VATS\5798 Automated Test System\src\429_Test.c:25:
"Windows.h"(214,1) In file included from C:\Program Files (x86)\National Instruments\Shared\MSDTRedistributables\SDKHeaderFiles\8.1\windows.h:214:
"WinBase.h"(46,1) In file included from C:\Program Files (x86)\National Instruments\Shared\MSDTRedistributables\SDKHeaderFiles\8.1\winbase.h:46:
"heapapi.h"(113,5) error: expected ')'
Build failed.

Remote Control of CANoe

$
0
0

Hello,

Currently I'm trying to remote control CANoe (11.0.47 (SP1)) from CVI (2012).
I have already found the solution for starting CANoe from CVI with "LaunchExecutableEx();". This function just starts the CANoe64.exe but until now I did not find any further command or function in the CVI-help that suits my problem.

The solution I already have for interacting with CANoe is based on Visual Basic Script. (thanks to CVI community!)

I wrote a little .vbs with the function I wanted and included the "shell32.lib"-library as well as the following code:
#include "shellapi.h"

...

ShellExecute(NULL, NULL, "c:\\...\\com_code - Test2.vbs", NULL, NULL, 0);

It works quite well so far, but actually I'm searching for a better solution in ANSI-C, that I can directly implement in CVI.

 

So my question is: Is there a possibility to directly control CANoe from CVI? For example: starting or stopping the measurement?

 

Thanks

CTRLARRAY SetCtrlAttribute function issue

$
0
0

I have multiple control types in a ctrlarray (textbox, leds, strings, buttons...).  I am trying to enable/disable them using a check box and the SetCtrlAttribute function.  I get the resource ID

TESTBED_1=GetCtrlArrayFromResourceID (panelHandle, CTRLARRAY_2);      

then am trying to DIM all items in the array using

SetCtrlAttribute(PANEL,TESTBED_1,ATTR_DIMMED,1);

it does not function?  can this be down or do I need to DIM them individually since they are different ctrl types?

CVI SQL Toolkit installation

$
0
0

I am trying to compile in Labwindows/CVI 2015 a project which require the file CVI_db.h.

 

I am not able to find it anywhere on my PC and when I am trying to install CVI SQL Toolkit 2.2 it stop because I have a higher version already install.

 

I can see that NI Labwindows/CVI SQL Toolkit Runtime 2.3 is install.

 

I have also TestStand 2016 install on that PC.

 

Where can I get this file and should I uninstall version 2.3 Runtime engine as require by the 2.2 version installer?


MQTT in LabWindows CVI

$
0
0

hi everyone, i'm trying to do a MQTT client in LabWindows and found somethings on internet like paho project, the prebuild bynaries can be downloaded from this page Eclipse Paho Downloads

 

i've tryed to import the code in CVI and worked correctly, attached the project that works, but i have to build my application in 64 bit and no 32 bit because the .lib and .dll where compiled in 64 bit i suppose.

 

this give me a problem because in my software i use the SQL Toolkit with this provider "Microsoft.Jet.OLEDB.4.0" that works only in 32 bit, i've tryed to use the "Microsoft.ACE.OLEDB.12.0" without success because give me the error in picture 

 

Errore.png

 

do you have any idea about how i can get this works? i have already tryed to install this Microsoft Access Database Engine 2010 Redistributable but the x64 tells me that i already have the x86 installed and can't install another one.

 

in my target PC i have installed the x64 and my software doesn't work for the same problem.

 

i have thinked to try this way Calling a DLL in LabWindows™/CVI™: Explicit Linking vs. Implicit Linking (Dynamic vs. Static) call the .dll explicit and not implicit, can be a good way?

 

 

Can't install C Code Generation for Labview 2018 evaluation

how does one prevent double clicking action on mouse

$
0
0

how does one prevent double clicking action on mouse ?

LabWindows/CVI 2017 f1 Patch not found by NI Update Service

$
0
0

Today,

browsing NI's web site hoping to find some information about a SP for CVI 2017 I discovered that at least a patch is available fixing an issue with the compiler. Although NI recommends this update for all users it does not provide any information about what is fixed, nor is this patch mentioned in this forum, nor is it found by NI's Update Service.

I would conclude that this leaves some room for improvement Smiley Wink So please, NI, add some release information and update your Update Service... Thanks!

Standalone UIR Editor

$
0
0

Hello,

I am using LabWindows CVI 2015 in an educational environment and my license server went down yesterday.  I can compile my binaries with Visual Studio 2010, but I have no way of editing the UIR file, and I desperately need my software finished ASAP.  Are there any standalone UIR editors?  A Google search revealed nothing.  Thank you for your time.

Surge

Announcement: LabWindows™/CVI™ 2015 SP1 f2 and LabWindows™/CVI™ 2017 f1 Patches

$
0
0

Critical updates for the LabWindows™/CVI™ 2015 SP1 and 2017 Development Environments have been released. The patches fix an issue that can arise when compiling in 64-bit release mode with the optimization level set to no optimizations. Specifically, casting a double to a float can result in unexpected results when compiled in this mode.

 

The patches are recommended for all users of LabWindows/CVI 2015 SP1 and 2017. The patches are available for download on ni.com/downloads and will be available using NI Update Service shortly. You can view the issues fixed with these updates at the following links:

Regards,

 

Ryan Curtis

Product Support Engineer

National Instruments

TCPDISCONNECT event

$
0
0

Im not using the tcpcallback function but i want to check whether the server has disconnected or not .Is there a way to to use TCPDISCONNECT  event  in a different way than using it inside tcp callback function. any other methods are also welcome Smiley Happy 


Shortcut Keys Not Working In CVI 2013 Linux

$
0
0

I have an application that utilizes shortcut keys. In CVI 2013 for Windows they work fine. However when using CVI 2013 for Linux they do not work. If I revert back to utilizing CVI 2010 for Linux they do work again. I believe that this is a BUG within CVI 2013 for Linux.

 

I have created a simple test program with a togglebutton. The togglebutton has a callback and the main function additionally loops infinitely while calling GetUserEvent. The application is very mature and originally used the loop with GetUserEvent. Some functionality from mouse movements was required later in its life so callbacks were introduced for particular controls.

 

Anyways, I made the example program's event handling use callbacks and GetUserEvent same as the actual application for testing and the results came up the same - the shortcut key does not work when used with CVI 2013 for Linux. However, in CVI 2010 for Linux the shortcut key works fine.

 

I have uploaded a compressed tarball with the self contained example. It has a build script to build the test using both CVI 2010 for Linux and CVI 2013 for Linux. The scripts expect the root location of the NICVI installations to be /usr/local/natinst/NICVI2010 and /usr/local/natinst/NICVI2013. Thus, in order to try it out, you may have to alter the path based on your local installation path for NICVI20(10/13).

 

I am about to temporarily implement a workaround with one of the callbacks already used and the EVENT_KEYPRESS event. I say temporarily since this fix idea is a kludge for something that was caught by GetUserEvent prior to using 2013.

 

Someone please steer me in the right path or help with a patch.

 

Thanks,

-shrew

 

EDIT

I also tried the CVI 2013 for Linux f1 patch found here to no avail.

LabWindows/CVI 7.1.1 Post-Build Actions

$
0
0

Hello,

 

I'm having trouble with the Post-build actions in LabWindows/CVI 7.1.1.  All I'm trying to do is copy the dll from one folder to another folder after the dll is built.  The problem is the Post-build actions happen before the dll is built, which is of course wrong.  The Post-build actions do work properly in LabWindows/CVI 2017 but for this particular job I need to use LabWindows/CVI 7.1.1.

 

Has anyone else run into this issue?  Is there a fix for it?

 

Thanks

 

How to set current date in ActiveX DTPicker control?

$
0
0

I am using DTPicker for selecting date. I want the control to display current date in the DTPicker control on panel load. Currently it is populating the date in short format (dd/mm/yyyy) whats set during UIR designing. Can some one help me to set this through code?

Labwindows CVI Teststand Debug Error

$
0
0

I am writing my c code in labwindows cvi and making a dll project. I use my dll in teststand. In labwindows cvi it successfully builds the .dll and gives no error. When I start execution of my project at teststand using my built dll, it directly gives the error: -17004 saying could not load DLL or external library source: TSAPI. I used depedency walker for my .dll but it does not show anything sensible. How can I find the reason of this error? or a detailed error log?

 

Labwindows cvi 2013

NI Teststand:2013

 

Additional information: The error case is happening when I debug my dll (execute from labwindows) via teststand. When I directly open teststand and load my dll it starts without any error. Both my labwindows and teststand are at evaluation period (licences are not loaded).

mktime or MakeDateTime?

$
0
0

what do you prefer?

MakeDateTime has 2035 year limit but is easier to use.

mktime use a struct, maybe more complete, but more difficult.

also how do you handle DST? if you don't have the UTC time is impossible to know if a file where stored in DST or not, am i correct?

there are other time format that i don't know?

thank you

 

Viewing all 5340 articles
Browse latest View live


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