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

Wrong ASCII values for control characters in Variables and Stack Call in CVI2013?

$
0
0

Hi,

 

I think there is an error in  "Variables and Call Stack" window if you want to look for your variables in ASCII format.

The control characters (0 -  31) are not shown correct. They are shifted 2.

For example:

Character in Decimal format is 10 (LF) but when you are chancing to ASCII format it is showing \012.

The same with 13 (CR). This character is \015 in ASCII format.

 

I think that was no problem in CVI2012.

 

Best regards

 

Gunther


Is it possible to generate pulses on a ctr out and simultaneously read them on another ctr input using one NI PCI-6601?

$
0
0

Hi,

 

 

I am trying to output a pulse train on ctr0 OUT and I want to receive them on CTR1 SOURCE of the same NI PCI-6601 card, but no use! :-(

 

The pulses are generated OK, but the acquisition fails within timeout (10 sec.). The generated signal has 1 Hz frequency and 20usec high time. I've studyed the NI examples for this.

 

Can anyone help me, please?

NewMenuItem() Event Callback Data

$
0
0

Hi,

 

I am having trouble passing a string to the callback function using NewMenuItem(); 

I am able to receive the 'Menu Item Id' properly in the callback function but the 'Event Callback Data' is not being sent correctly to the callback function. I would like to pass a string as 'Event Callback Data'.   A little help please?

 

Thanks!

 

Sinnas

 

 

State of the MSB

$
0
0

Hi,

 

I need to check the MSB of the following:

 

char J_Serial[30]
       0:0x190c21eb

 

Another example of a posible number to be checked is 0x80000059

 

Thanks

Simon

RegSetValueEx to Create ODBC Entries

$
0
0

I am using CVI 5.0.1 and would like to create ODBC entries without using the ODBC manager in Administrative Tools.   I do not have access to the new CVI functions:

 

RegWriteString()

 

which would make it simple.  Any sample code using the SDK functions such as RegSetValueEx would be helpful.  I have written a sample program containing:

 

const char dname[] = "V2002ERR";
LONG kstat;
  
   
    kstat = RegSetValueEx(HKEY_USERS,"Software\\ODBC\\ODBC.INI\\ODBC Data Sources",0,REG_SZ,dname,8);

 

It returns a 0, which is ERROR_SUCCESS, but does not write the key value.  I am missing something somewhere.

 

Thanks in advance, David

 

 

 

 

Le point d'entrée de procédure DeleteCtrlArrayItem est introuvable dans la bibliothèque de liens dynamiques cvirte.dll

$
0
0

Bonjour

 

Je résume rapidement mon problème : J'utilisais CVI8.0 tout fonctionnait bien, jusqu'au jour où nous avons voulu passer à CVI13.0...

Le projet anciennement compilé sous 8.0 fonctionnait parfaitement bien et depuis il m'est impossible de seulement le lancer!

 

Une fois la compilation terminée avec la mention "build succeeded" le message d'erreur en pièce jointe apparaît...

Lorsque je lance un debug (32) j'ai le même message qu'en Release (32) sauf que "DeleteCtrlArrayItem" est remplacé par "CmtGetLockEx"?? et bien sur sans fonctionner car suite à cela l'application me dit que l'executable ne peut pas être lancé et se ferme...

 

Si quelqu'un y peut quelque chose, merci d'avance pour vos retours!

How to discard or release mutex in labwindow CVI.

$
0
0

Hi,

 

How to  release mutex  in labwindow CVI.

 

I have one existing DLL . This DLL  using method 'CreateMutex(NULL, TRUE, "USBDriverRunning");' . 

 

We need  to create another dll , this DLL be  release Mutex   'USBDriverRunning'.  

 

Thanks

Mukesh Kumar

File access permission denied

$
0
0

I occasionally have problems building a CVI project due to an error of the following type:

 

Failed to copy z:\CVI Projects\SCPI_Test_6485\cvibuild.SCPI_Test_6485\Debug\SCPI_Test_6485.exe to z:\CVI Projects\SCPI_Test_6485\SCPI_Test_6485.exe. File access permission denied
Build failed.

 

I most recently saw this with CVI 2013, but I have also seen it with CVI 2012.  I tried to delete the executable, but I received a message from Windows stating that the file was in use by another process (this was after closing CVI).  I didn't find an obvious entry in task manager for the process that had the file open.  After logging off and then back in, I was able to build the project.  I noticed that there was an old entry on this topic from 7 or 8 years ago.  Has anyone one seen this problem with newer CVI versions and WIndows 7?


definitions for CAObjHandle: stdtst.h, userint.h & cviauto.h

$
0
0

When building application in 64-bits with CVI 2013, I've an error about CAObjHandle that in several files:

userint.h:typedef intptr_t    CAObjHandle;
cviauto.h: typedef intptr_t         CAObjHandle;    

stdtst: typedef int    CAObjHandle;    

first files are from CVI (C:\Program Files (x86)\National Instruments\CVI2013\include) and second from teststand (C:\Users\Public\Documents\National Instruments\TestStand 2013\AdapterSupport\CVI): I make a DLL with CVI and then call its functions from a seqauence in teststand.

 

If I compile in 32-bits, there is not such an error as types have then the same size...

 

What can be done to solve that?

Active control is outlined

$
0
0

When running my application, the active control in the UI has a black outline that I find unaesthetic.  Is there a way to make it disappear?

 

Thanks.

DDC DataPlugins-Use

$
0
0

hallo,

 

in a project I have to use tdms-data-format to store and read data. there is a data-plugin existing to transform our most used data-format (FCS3) into tdms. but I have to do this from inside a c++ - project without using LabView, DiaDem or DataFinder.

 

i use the dominonilibddc-dll to write/read my tdms-files. is there a possibiliy to use data-plugin from inside this dll ? it would be much less work to apply the dataplugin vs. write my own code and convert the file step by step.

 

or is there a generally other solution to use a dataplugin without these three software-packages ?

 

thanks and best regards

 

Simon

send file to serial port using comfromfile

$
0
0

Hi,

 

I am current working on a project with requires to transfer a bin file to the controller, if the file is valid i will get the correct respose.

if we send a file in hyperterminal using send text file option i am getting response from the controlller as file valid.

I want to send a file through the code i used comfromfile function i am getting invalid file reponse from the controller even i tried byte by byte with comwrtbyte also i received the same invalid response..

I cross checked the rs232 configuraiton of both hyperterimal and my code..both are same..even i checked with port sniffer tool to capture the port data..both are same.

I am not able to find what is the issues with my code. what is the differece in the Hypertemail and CVI functions..

 

Regards
Vikram Kumar P

integration of a DLL through .h and .lib file

$
0
0

Hello,

 

In our application we use a DLL that is delivered with .h file and a .lib one but not for CVI.

In the past, qith CVI8.1 we applied the procedure in CVI from .h file to generate the .lib file and it was OK.


With new CVI2013 version I made the same twice: once selecting 32bit DLL, creating a MyDLL_32.lib file, and second selecting 64bit DLL, creating a MyDLL_64.lib file.

In CVI project, I've integrated voth .lib and depending on the build settings, the 32 bits or the 64 bits is highlighted.

 

Everything looks good ate compilation but execution creates a global fatal error as soon as I call any of the functions from this DLL.

 

I made a minimal project that uses that function and create the error.

 

The same project recompiled on CVI8.1 is not compatible if I keep the .lib files from CVI2013: I replace the initial one (MyDLL.lib) and it is OK.

 

How can I investigate in the creation of .lib files from CVI to find the error?

 

Other change: the PC used for new dev is W7 64 bits while one for CVI8.1 is XP 32 bits.

 

Regards

labview web server help

$
0
0

i want to build a labview server for remote monitoring of labview vi. can any body help???? i used web publishing tool of labview it gave me a url like
http://acer:8000/test14.html but this is not working on remote system.... ???? how can i access this adress from an other system...

How do I control a ZPL label printer via USB

$
0
0

Hello,

 

I need to control a Zebra GX430t label printer via the USB interface, using ZPL II commands. While creating the ZPL II code is not a problem, I kind of get stuck on how to transfer the commands to the printer.

I can not use the Zebra GX430t as my standard printer, because it is used by another task.

I was searching for a way to connect trough NI-VISA, but cannot find the printer there as a resource.

Do I have to use the Windows SDK?

 

Can anyone please point me to the right direction?

 

Thanks,

Greg

 

 


using Assembly file in CVI

$
0
0

I have legacy system which uses a age old GPIB card.

am in a process of creating a application to communicate with the system.

on research i find there is only .asm (assembly) file is available to communicate with the GPIB card.

can i still be able to use that assembly file in CVI to communicate with that instrument.

 

Thanks in Advance

IVI

Scan for float in string

$
0
0

Hi,

I'm trying to read a 4 byte IEEE 754 float from a string (array of char) using the scan function. I tried all kinds of formatting versions described in the help but I can't get it work proper. I receive a the string from a COM port. It looks like this in Hex (the float value is in [] brackets):

 

FF FF FF FF 86 1A 1E 6C 82 22 01 07 00 00 11 [C0 52 8F 9F] DB FF ...

 

The string format is always like this. The first 15 bytes are some commands I want to skip and then I need to read bytes 16, 17, 18 and 19. The result in this case should be -3.290016.

 

Here is the last of my many attempts to extract the float:

 

char buffer[24];

float myFloatVal=0;

...

Scan(buffer, "%4f[i15b4]", &myFloatVal);

 

This example returns "0" for myFloatVal.

Any advice would be most welcome!

 

 

 

DBConnect fail

$
0
0

DBConnect return -100;

When I move my released program to another computer, DBConnect failed and return -100.

But the program run OK on the computer where I build.

The computer where I move the program to has installed MS Access 2003,Word 2003, Excel 2003.

 

the code:

DBInit (DB_INIT_SINGLETHREADED);
 char CurrentPath[MAX_PATH];
 GetProjectDir(CurrentPath);
 char DBConStr[MAX_PATH];
 sprintf(DBConStr,"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=%s\\%s;Persist Security Info=False",CurrentPath,"Result.mdb");

 DBhandle=DBConnect(DBConStr);

fpga

$
0
0

hi im using spartan6 board, using labwindows version 8.5, i receive data via rs 232 port from the board, my problem is i am receiveing set of data 3 times.. example.. 8 bit data (23,ac,5d,5c) transmitter sends only once but receiver receives thrice and waits for the next set of data to receive, again receives thrice the received data, i have used FlushInQ() but no use. My requirement is it should receive only once and should wait for next set of data to receive.

sample of my program is given below, 

 

InstallComCallback (1, LWRS_RXFLAG, 1, 0x7E, Event_AutoDetect, autobuf);

 

void Event_AutoDetect()

{
ComRd (1,autobuf,6000);

FlushInQ(1);

 

for (i2=rx; i2 <= (2803); i2++)

{
rec[z] = (autobuf[i2]);

xxxxxx

xxxxxx

xxxxx

}

fclose(rfp);

// CloseCom (1);
// printf("\n");
}

global protection fault in cvirte.dll

$
0
0

LabWindows 2010, running on XP.

My program has two windows, each controlled by different threads but interacting via TSQ's - The Virtual O'Scope window can operate independently, but it always is opened when the test window is opened. If I run through a whole test, things work properly. If I open the test window, which opens the VOscope window, and then immediately close it, I consistantly get a General Protection Fault in the VOSCOPE window, in cvirte.dll, which crashes the whole program. Any ideas where to look for the problem would be appreciated. I've made pretty sure that all calls to controls in the various panels are made only from the appropriate thread that created that panel - thus the TSQ's.

Viewing all 5348 articles
Browse latest View live


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