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

Daqmx in Labwindows

$
0
0

hi,

i am new to LabWindows. Can anyone explain me the procedure to test multiple DIO's Simultanuously using Daqmx in LabWindows. i have tried with example code but could not able to understand it. please help me to do this.

 

Thanks.


how to set the order of pages of different rows in a tab

$
0
0
i am learning labwindows now and have met a problem about how to use the "tab" There are some pages to display in different rows in a tab.However, i find out no way to separate the pages in rows according to my willings.It is automatic setting about "multiple rows" in "tabs fit mode".

listbox

$
0
0

hi , i want to use a listBox to display information from file ,so i use a control file path and ListBox , but there a problem , that when i enter as a file path a .txt or texte word , it sent an error.

C plugin function call overhead on real-time system

$
0
0

Hello NI forum members.

 

I'm developing a real-time application (32-bit) on a PXIe-8115 machine (Phar Lap ETS 13.1 operating system) for control of robotic devices. In order to deal with the variety of hardware interfaces that our robots use, I'm working on a plugin system, to load a different DLL (that implements a defined interface) according to the type of robot we are using. The functions implemented by each DLL include sensors (i.e. joint encoder) reading, control algorithms (step) and actuation (write control setpoint to joint motor), that need to run on a tight loop, every 5ms.

 

Using the RT time measurement functions ( GetTimeUS() ), I can verify that the loop itself (which runs in an independent thread) takes around 1us, and calling just an empty plugin function (does nothing and return) adds almost 500 us to its duration. For a single joint robot (3 sensors read + robot control step + joint control step + motor write), simple empty functions cost me more than 3ms, leaving not much room for more processing and actuators.

 

I was expecting the overhead of a indirect (function pointer) call, which would be the same of a direct call without inlining optimizations, but it is taking much more. I got similar results on LabWindows/CVI 2013 and 2015, and, in comparison, runned similar tests on a Linux system (with clock_gettime() ), where the overhead for dynamically linked library function call was in the range of nanoseconds.

 

Is there something particular about this system that I should know in this case ? Could be a way to alleviate the problem ?

 

 

Sorry for possibly bad English and thanks in advance.

How to make an icon bar similar to menu bar but with picture buttons?

$
0
0

Good afternoon,

 

I made an application with a UIR which contains a menu bar with options like "Load configuration file", "Save configuration file as", etc.. but i would like to insert another "row" below that menu bar in the panel which will contain icons (maybe "picture buttons") as most of the known programs and i do not know how to implement it. I was able to insert picture buttons individually but locating them in the panel with the mouse and not being part of a group like the items of a menu bar.

 

I want to have a final appearence similar to the following image: 

Icon bar.PNG

 

Thanks in advance!

 

Best regards, 

 

Alejandro

conocer la cantidad de movimiento del mouse

$
0
0

¡Un saludo a todos! 

 

¿Cómo pudeo conocer los punto x e y en los que se encuentra mi raton desde un eje de coordenadas? ¿Es posible hacer el sumatorio de estos puntos?

 

Gracias

Questions: code navigation, -search, -highlighting

$
0
0

Hello,

 

  1. When using 'Ctrl + I' to go to a definition, is there a handy way / shortcut to go back? It jumps around in a file, opens another file and I want to go to the caller of the particular variable / function.
  2. Is there a history of search results? I use the search quite often but sometimes I want to search withing a block of code that I found in the current search. When I do that, the current search results disappear.
  3. Are there Add-ins for CVI that allow some better code highlighting? E.g. different colors for datatypes, macros, functions, passing parameters, globals, pointers etc, or if a variable is selected and all usages of this variable are highlighted withing the current block. At least in Visual Studio this improves the readability greatly.

 

Thanks!

Does CVI 2015 include NI Update Service in a Distribution Kit?

$
0
0

Some moths ago I updated my development system from CVI 2012 SP2 to CVI 2015 and some weeks ago I released the first application developed with CVI 2015.

One of the customers says that NI Update Service started to open on his PC asking for some updates.

He says he didn't install this application by himself.

 

Does CVI 2015 include NI Update Service in a Distribution Kit?

 

I hope it doesn't, or I hope there is an easy way to avoid this.

 


Panel/Control Resize

$
0
0

Hello,

I am working with some legacy code, and I am using LabWindows CVI 2010 (might be updated to 2015). Part of the code builds a panel with controls at runtime, with code like:

 

// Main panel.
selectPanel->handle = NewPanel(0, tempBuf,centerY-127+BORDER_WIDTH, centerX-198+BORDER_WIDTH,300,400);
...
//Button
selectPanel->deleteCtrlBtn = NewCtrl (selectPanel->handle,CTRL_SQUARE_COMMAND_BUTTON,"DELETE",258,114);
SetCtrlAttribute (selectPanel->handle, selectPanel->deleteCtrlBtn, ATTR_WIDTH, 76);
SetCtrlAttribute (selectPanel->handle, selectPanel->deleteCtrlBtn, ATTR_HEIGHT, 26);
SetCtrlAttribute (selectPanel->handle, selectPanel->deleteCtrlBtn,ATTR_CALLBACK_FUNCTION_POINTER, deleteCtrlBlkBtnCB);
SetCtrlAttribute (selectPanel->handle, selectPanel->deleteCtrlBtn, ATTR_LABEL_BOLD, 0);
...More controls etc...

 

So most attributes, like size and position is set at runtime. If I want to make this panel (with controls) user resizable (with minimize and maximize) can I build an UIR file
for that panel instead of the runtime code to solve my problem?

 

Best regards,
ChristianG.

 

P.S. I am very new to the LabWindows development environment. D.S.

Disabled control receiving events

$
0
0

Hello,

 

If I have set the attribute ATTR_DIMMED to 1 (active) on a control i.e. disable (or grayed out) the control. Will the callback function that is set for that control, receive any events at all? I have done this on a textbox control and the callback function does not get called anymore (until ATTR_DIMMED  is set 0).

 

Best regards,

Christian G.

I try to manipulate a vector analyzer by cvi code, I want to initialize the frequency, bandwith, number of points and power, I tried with this code but it does not work, help me please

$
0
0

I try tomanipulate avector analyzer VNA bycvicode, I want toinitializethe frequency,bandwith, number of pointsand power,I tried withthis codebut it doesnot work, help meplease

code :

case EVENT_COMMIT:
   
   rsvna_ConfigureFrequencyStartStop (vnaHandle, 1, 380.0e6, 400.0e6);
   
   rsvna_ConfigureBandwidth(vnaHandle,1,100.0,Normal);
   
   rsvna_ConfigurePower(vnaHandle,1,-10);
             
      rsvna_ConfigureSweepNumberOfPoints (vnaHandle , 1, 300.0e3);

Get the number of connected user to an access database

$
0
0

Hello,

I want to develop a function that return the number of connected users to an access database. I have CVI 2013 and the SQL toolkit.

 

Thanks in advance ! 

------------------------------------------------

Bonjour,

J'ai une base sur le reseau, et je voulais développer une fonction (CVI 2013 + toolkit SQL) qui me renvoie le nombre des utilisateurs connectés à cette base. 

 

Merci d'avance !

keithley 2200 list mode

$
0
0

Hello,

 

I am trying to create a list and send it to the power supply Keithley 2200

 

This code should creates a list of  5 items and trigger OUTPUT

 

Ke2200_WriteString(instrumentHandle, "TRIG: SOUR BUS");
Ke2200_WriteString(instrumentHandle, "LIST: STEP 5\n");
Ke2200_WriteString(instrumentHandle, "SOURCE:LIST:MODE CONT");
Ke2200_WriteString(instrumentHandle, "SOURCE:LIST:COUT 2");

Ke2200_WriteString(instrumentHandle, "SOURCE:LIST:VOLT 1, 2V");
Ke2200_WriteString(instrumentHandle, "SOURCE:LIST:VOLT 2, 2V");
Ke2200_WriteString(instrumentHandle, "SOURCE:LIST:VOLT 3, 5V");
Ke2200_WriteString(instrumentHandle, "SOURCE:LIST:VOLT 4, 6V");
Ke2200_WriteString(instrumentHandle, "SOURCE:LIST:VOLT 5, 1V");

Ke2200_WriteString(instrumentHandle, "SOURCE:LIST:CURR 1, 5A");
Ke2200_WriteString(instrumentHandle, "SOURCE:LIST:CURR 2, 5A");
Ke2200_WriteString(instrumentHandle, "SOURCE:LIST:CURR 3, 3A");
Ke2200_WriteString(instrumentHandle, "SOURCE:LIST:CURR 4, 1A");
Ke2200_WriteString(instrumentHandle, "SOURCE:LIST:CURR 5, 3A");


Ke2200_WriteString(instrumentHandle, "SOURCE:LIST:WIDTH 1, 0.001S");
Ke2200_WriteString(instrumentHandle, "SOURCE:LIST:WIDTH 2, 0.001S");
Ke2200_WriteString(instrumentHandle, "SOURCE:LIST:WIDTH 3, 0.001S");
Ke2200_WriteString(instrumentHandle, "SOURCE:LIST:WIDTH 4, 0.001S");
Ke2200_WriteString(instrumentHandle, "SOURCE:LIST:WIDTH 5, 0.001S");

Ke2200_WriteString(instrumentHandle, "SOURCE:LIST: SAV 3");
Ke2200_WriteString(instrumentHandle, "OUTPUT ON");
Ke2200_WriteString(instrumentHandle, " "SOURCE:FUNC:MODE LIST");
Ke2200_WriteString(instrumentHandle, ""*TRG");

 

 

There is no errors, but the code doesn't work. Any idea why???

 

THANKS in advance

EPOC time

$
0
0

how can I obtain the epoc time from jan 1 1970.  the time function runs the current time in hours, minutes,seconds.

 

SMC100 motion controller use with Labwindows CVI?

$
0
0

Hello,

 

I have a SMC100 series motion controller and I don't find the way to interface it with Labwindows CVI. I have only the Newport.SMC100.CommandInterface.dll but I don't know how to use it in Labwindows.

I found examples for Python and LabView but not in Labwindows. Doe anyone know how use the dll in Labwindows and call the functions?

 

I have already try this way but it does not work.

http://www.ni.com/tutorial/8503/en/

 

Thanks in advance 

 

 


How to change the language of NI MAX (from German to English)

$
0
0

Hello All,

 

I have recently installed an NI DAQmx package for workig with Labwindows. By mistake it was installed in German.

Now I am unable to find how to change the display language to English.

 

Do I have to reinstall the software or can it be done via some options?

 

Thanks

Raunak

Scan Modifier Integer To long Integer

$
0
0

Hi,

 

I'm searching to modifie the format of a integer  variable

 

For example :

 

int nb ;

nb=1;

 

change the content of the variable nb from 1 to 000001

 

 

Build info from executable file

$
0
0

Good evening,

 

is it somehow possible to retrieve build information from a .exe file generated by Labwindows/CVI? (E.g. which directory it was build from or which CVI version.)

 

Thanks!

including an XML file in the source code

$
0
0

Hello Guys,

 

First of all I would like to appreciate for immediate support you all are providing me by answering my queries. Hopefully I would like to contribute the same for this forum.

 

Coming to my query Smiley Happy, I have a scenario in which I would like to open my UI which has some controls. The labels on the controls are contained in an XML file. So as soon as I open my UI, the labels on the controls must get displayed from the XML file. I have already parsed the XML, the only thing I want to know is whether I could include a default XML file in the source code so that whenever a user opens the UI, all the labels of the controls gets published by reading the default XML.

 

Also, once working on the UI and making some changes in the labels manually in the GUI, these updates must get saved in the default file and when reopened again , appears with the changes last done.

 

Thanks a lot  for your help.

 

Best Regards,

Raunak

Does CVI support .NET remoting and casting?

$
0
0

I’m trying to interface via .NET to a 3rd party application which offers example code in LabView but not LabWindows/CVI.  Upon inquiring to why, the response was CVI still does not support .NET remoting and casting, two .NET features which are critical for interfacing with BeamGage.  Is it true that LabView has .NET features that CVI doesn’t?

Viewing all 5339 articles
Browse latest View live


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