Subscribe: LabWindows/CVI
http://forums.ni.com/rss/board?board.id=180
Added By: Feedage Forager Feedage Grade B rated
Language: English
Tags:
application  call  cvi  labview  labwindows cvi  labwindows  main panel  main  max  nifpga  panel  panels  read  slow  time 
Rate this Feed
Rate this feedRate this feedRate this feedRate this feedRate this feed
Rate this feed 1 starRate this feed 2 starRate this feed 3 starRate this feed 4 starRate this feed 5 star

Comments (0)

Feed Details and Statistics Feed Statistics
Preview: LabWindows/CVI

LabWindows/CVI topics



LabWindows/CVI topics



Published: Sat, 24 Feb 2018 16:31:27 GMT2018-02-24T16:31:27Z

 



ARDUINO/LABWINDOWS CVI 2017

Fri, 23 Feb 2018 08:34:29 GMT2018-02-23T08:34:29Z

Heloo!  I want to talk to a microcontroller to tell him when to control an engine (support that carries a camera) using the ARDUINO card under LABWINDOWS; However, I have never done this task and I am new in using this software. I am curious to know if there are some precautions to take into account to choose features that are advantageous for LabWindows as interface / function , manipulation ..,. Are there any developers with this type of experience who could have ideas and who could help me ??? thks




Adaptive Filter Implementations using CVI

Thu, 22 Feb 2018 19:47:58 GMT2018-02-22T19:47:58Z

I see discussion on adaptive filtering methods and implementation in LabView forums and sample demos, but don't see anything on this topic relative to CVI.   I am starting an investigation on adaptive interference canceling.  Would appreciate hearing about issues and implementations on the topic.  Thanks.




NI MAX (measurement & automation explorer) not installed with NI-DAQmx version 17.0

Thu, 22 Feb 2018 02:05:06 GMT2018-02-22T02:05:06Z

I use LabWindows/CVI on a Windows 7 machine and recently installed NI-DAQmx version 17.0.  Now I can't find NI MAX installed anywhere on my computer.  The webpage: www.ni.com/product-documentation/53366/en/ clearly states at the top that NI MAX is included with the NI-DAQmx installer.  Yet after I ran the NIDAQ1700f0Runtime.exe installer twice and rebooted each time there was no NI MAX anywhere.  Then I came across webpage: https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000000P9tuSAC which states,  "The NI System Configuration package only contains MAX, the System Configuration API, and the NI Network Browser. It is the closest to a direct download for MAX.  But after installing syscfg1700runtime.exe I still can't find NI MAX anywhere on my computer.  Please reply with any thoughts or ideas you might have.




ProcessSystemEvents() slowing down

Wed, 21 Feb 2018 17:12:18 GMT2018-02-21T17:12:18Z

Hello,   I'm facing a strange behavior of my CVI project. The project is quite big: several timers, probably more than 50 panels, and more than 500 controls (including graphs, trees and tables).   I'm facing to a slow down of my project over time. Usually, it is noticeable after several hours. At some point the slow down renders Ring manipulation extremely slow: the mouse cursor highlights items after 1 or 2 seconds (!).   In order to measure the slow down, I changed the call to RunUserInterface() to a loop including a call to ProcessSystemEvents(). This way, I've been able to measure execution time of the ProcessSystemEvents() call using clock().   At program start, the execution is below 1 ms. However, I can make it rise (I will explain later how I can do this) up to 3 ms. At that point, the execution time rises slowly over time. I haven't made precise measurement, but I would say it increases of 1 ms every 10 minutes.   I tried to put breakpoints at many callback functions, but I don't get any callback calls (when not doing anything), excepted in timer callbacks. So I tried to break on ProcessSystemEvents() and then "Step Into". I was able to confirm that I get only timer callbacks (apparently).   One strange thing is that I get up to 3 calls to each of my callbacks. But OK, that's CVI's internal way of doing, it's not important.   Anyway, it's looks like I don't get my own code executed, only timer callbacks (which I emptied) and CVI black magic.   So, I can only conclude that the ProcessSystemEvents() call is spending time at code I don't know.   Does anybody know what could happen ? Most likely I'm doing something wrong at my program start which triggers a bad behavior. If, ever, somebody has suggestions, I would be really interested.     Now, I'll try to explain what my program is doing when starting, and what I'm doing to "trigger" the slow down, or maybe only what i'm doing to "accelerate" the beginning of the slow down.   My program is quite big and consists of many panels which I have organized more or less in tabs. In fact, it looks like the popular Firefox extension "Tree Style Tab". The main panel has a tree control which lists panels. So, there is a graphic representation of the child/sibling relationship of the panels.   At program start, all the panels are loaded and "inserted" in this tree. Some of them are loaded several times. I also start some timers: one is running at 1s, one is running at 1 ms (I removed almost all code inside the timer callbacks).   When I want to trigger the slow down, I just click on one item of this tree which then shows the corresponding panel (and hides the previous one). I then use the keyboard to navigate in the tree (and thus showing different panels). If I navigate quickly (using keypress repeats) over all the panels I have (let's say, 20 panels in 1 second) I usually trigger the slow down as soon as I stop changing panels (sometimes I need to repeat the "navigation").   If I don't navigate quickly (let's say 1 panel every 2 seconds), I don't trigger the slow down (maybe it would appear hours after, I haven't tried). If I disable the timers, I don't trigger the slow down (maybe it would appear hours after, I haven't tried).   Up to now, I haven't been able to remove enough code to be able to publish a simplified version of my program which triggers the slow down fast enough, but I'm still trying...     So, now that you have read up to this point (I would be truly impressed if anybody have read this far...), here are some questions which could be answered to many people (from newbies to NI experts and NI officials): - has anybody ever seen such a behavior ? - how could I replace the ProcessSystemEvents call with something I can trace ? - has anybody have suggestions on how to investigate ? - why is there up to 3 timer callback calls in 1 single ProcessSystemEvents call ? - can my problem be related to EV[...]



InstallPopup popup does not result in a modal dialog box.

Wed, 21 Feb 2018 16:31:42 GMT2018-02-21T16:31:42Z

Environment: LabWindows/CVI 2017 FDS version 17.0.0 (295), Windows 7

 

In my application there is a main panel, PANEL, launched in the normal way using LoadPanel().  There is also an additional panel, OIVER, launched periodically using InstallPopup(). 

In the documentation for InstallPopup includes the following:

Displays and activates a panel as a modal dialog box.

You must call this function from the thread in which you create the panel.

While the modal dialog box is visible, the user cannot operate any other panels that you created in the same thread.

The panels for OIVER and PANEL are launched from the same thread and status = InstallPopup returns without error.  (i.e. status == 0).

The 3rd sentence in the description above seems not to be true.  If once the modal popup is launched, the main panel, or any of its buttons are clicked with the mouse, the main panel comes to the top, hiding the modal popup.  Additionally, all of the normal functionality of the main panel is available, thus making the panel created using InstallPopup anything but modal.

 

Is there a fix for this?

Note: I have tried using SetPanelAttribute(hOiver, ATTR_ZPLANE_POSITION, 0); as a workaround.

But because the popup is launched as a parent, this function fails.

 

 

 




XNET CVI Questions

Wed, 21 Feb 2018 16:17:22 GMT2018-02-21T16:17:22Z

Hello,

 

I have a couple of questions about using XNET in CVI.

 

1) Is there a way to get the time stamp of a transmitted frame without having to receive it on another CAN interface?

 

2) Is there a way to generate a callback when a CAN frame arrives instead of having to poll it?  There is one for Serial ports..., but I can't find anything for XNET Read Frames

 

Thanks,

 

Terry Moss

 




acquisition and image processing ?

Wed, 21 Feb 2018 09:28:59 GMT2018-02-21T09:28:59Z

Hello beginner in this software labwindows CVI 2017 I would like to do the acquisition and image processing (( that i want to spot markings on this image)),  but I do not know all the library that I must use and how the process thanks to help me about it friends
R : using labwindows/CVI 2017  and NI vision




nxdbGetProperty 사용하여 Signal의 Maximum Value 구하는 부분이 안되네요.

Wed, 21 Feb 2018 07:27:42 GMT2018-02-21T07:27:42Z

NI-XNET에 있는 Database Editor 를 토대로 같은 프로그램을 만들어 보려고 하는데요.

 

다른부분은 값을 잘 들고 왔는데 Signal의 Max, Min 값을 가져오는부분이 안됩니다.

 

예를들어 Max값을 가져오면

nReturn_N = nxdbGetPropertySize (RefData_Sig[For_i], nxPropSig_Max, &nData_Size);

nReturn_N = nxdbGetProperty (RefData_Sig [For_i], nxPropSig_Max, nData_Size, sData_Text);

 

일단 하나만 들고 왔는데요.

Database Edit에서는 값이 1인데 실제로 읽어오면 sData_Text에 00 00 00 00 00 00 F0 3F 값이 나옵니다.

2는 00 00 00 00 00 00 00 40

3은 00 00 00 00 00 00 08 40

0.1은 9A 99 99 99 99 99 B9 3F

왜 이렇게 나오는지 아시나요...???




Showing a Labview front panel from Labwindows/CVI

Tue, 20 Feb 2018 18:23:59 GMT2018-02-20T18:23:59Z

I have a data acquisition program that basically operates like this: 

User Panel: Front panel the user can configure acquistion (add calibration files, turn off and on inputs, set trigger type etc.) (this is for software being sold to customers).

Main Panel: Parallel loops that control the user panel and the 50 or so subvis that analyse the data (some of these call DLLs and .exes for more complex analysis).

The problem I've run into is that Labview really isn't built for complex calculations like this and building the subvis is tedious. I inherited this code and the previous developer used 50+ globals to pass data back and forth between the subvis simultaneously and put all these weird waits in to trick Labview into not crashing and its just a mess.It works, but its a mess.

I have never used LabWindows/CVI but from what I understand it may help me. I'm wondering if I can use it to essentially eliminate all the subvis and globals and do all my complex calculations and analysis in C (actually the DLLs it calls are in C) and just use Labview as the graphical interface. The only thing I haven't been able to determine from my research is whether I can call Labview front panels from LabWindows/CVI. For example, I have a sophisticated front panel with silver controls and custom logos (nice and pretty for the customer) that I want to be able to call as well as a multiple file selection vi (also pretty and sophisticated) that I can't really replicate in LabWindows/CVI. Would I be able to do this? 

Also, forgive me if I use incorrect terms, I'm self-taught in Labview (and other programming languages for that matter) and I'm still learning things. I hope I've been able to convey the basic gist of it! Thanks for your help!

 

Edit: This is Labview 2012 and LabWindows/CVI 2012 Full Development if that helps




Ethernet/IP

Tue, 20 Feb 2018 14:40:09 GMT2018-02-20T14:40:09Z

Hello,

 

I would like to communicate with a servo-motor using Ethernet Industrial Protocol (this does not correspond to TCP/IP, but TCP/IP is included in Ethernet/IP).

I found some drivers on National Instrument website (NI-Industrial Communications for Ethernet/IP Software for LabVIEW, http://sine.ni.com/nips/cds/view/p/lang/fr/nid/209676), but the library in only available in LabVIEW. I would like to find - or create - exactly the same library, with same functions (EthernetIP CIP Get/Set Attribute Single for example), but usable with Labwindows. Would you know any solution to do that properly ?

Thanks for helping me,

 

Danaé




Using DAQmxGetDigitalPowerUpStates()

Mon, 19 Feb 2018 20:46:13 GMT2018-02-19T20:46:13Z

I was in doubt if this topic is best here or in DAQmx forum, but I choose this because any Labview related answer would be not useful for me and - on other hand - here I'm sure to find someone that will understand my C notation.
 

I'm trying to read the power-up state of DO bits with DAQmxGetDigitalPowerUpStates() function. 

Docs is here: http://zone.ni.com/reference/en-XX/help/370471AE-01/daqmxcfunc/daqmxgetdigitalpowerupstates/

 

When I read a single line status, i.e

...
int32 P0_0;
DAQmxGetDigitalPowerUpStates ("Dev1", "Dev1/port0/line0",   &P0_0, NULL);
...

it works.
When I try to read more lines:

...
int32 P0_0, P0_1;
DAQmxGetDigitalPowerUpStates ("Dev1", "Dev1/port0/line0", &P0_0, "Dev1/port0/line1", &P0_1, NULL);
...

it fails at runtime with a fatal error: "Missing argument to variable argument function."

Moreover, in the doc linked before is stated "channelName: The digital line or port to get the power-up state from. You can specify a list or range of channels". 
I assume this is wrong, too, because the variabile argument function cannot validate if we are passing a pointer to a single int32 or the base address of an array of int32s.

I will survive without using this function, but it will be nice to discover who is wrong or broken: me, the documentation or the function itself. (image)

All my tests were done with an USB-6212, if this is significant. 
Attached is a minimal program demostrating this behaviour.





Why does Auto Backup not backup the cws file?

Mon, 19 Feb 2018 08:36:25 GMT2018-02-19T08:36:25Z

Hello,

I am wondering why CVI does not also backup the *.cws file - is it by design or just an omission?

In case of a crash the source file can be recovered, but the tags (saved in the cws file) will be wrong if at least one line of source code has been inserted/deleted during the session.




Changing RingDial label at runtime

Fri, 16 Feb 2018 15:51:00 GMT2018-02-16T15:51:00Z

Dear Madam/Sir,

 I would like to change the labels of a ringdial control at runtime. 

I tried to use the command

ReplaceListItem (panel, TOF_RINGDIAL_MUX1, 0, "2Dx", 0);

to replace the old label at the item 0 with the new one ("2Dx"). The command:

GetLabelFromIndex (panel, TOF_RINGDIAL_MUX1, 0, zp);

shows that the label has successfully changed (zp="2Dx") but the appearance of the command when the .uir is loaded at runtime is as before the label change. Is there some command required to update the appearance?

Thanks

Regards

Luca




FPGA Interface C API - Cannot read DMA FIFO using NiFpga_ReadFifo - Timeout error

Thu, 15 Feb 2018 07:23:11 GMT2018-02-15T07:23:11Z

Hi All, 

I'm using CVI2015 Sp1 and FPGA Interface C API to interact with FPGA module PXIe-7962R. The goal is to transmit and receive data, between 2 predefined channels (one for TX other for RX), using RS485 communication standard that implemented in FPGA.

I followed the NI example about FIFO write/read and created 2 separate functions, 1 for writing data and another for reading.

When writing the data into the DMA fifo I run the following sequence:

NiFpga_WriteFifoU64 (*session, NiFpga_rs485_HostToTargetFifoU64_FIFOIN, fifo_Arr, txNOElements, TIMEOUT_MILISEC, NULL);


NiFpga_AcquireFifoWriteElementsU64 (*session, NiFpga_rs485_HostToTargetFifoU64_FIFOIN, &txElementsAcquired, txNOElements,
TIMEOUT_MILISEC, &stArrTxChannelState[chnNum-1].m_writeElements,
&remainingTxElementsInDMA);

 

NiFpga_ReleaseFifoElements(*session, NiFpga_rs485_HostToTargetFifoU64_FIFOIN, txNOElements);

 

The return status of each function is 0. I assume that "write" was performed successfully because the txElementsAcquired is same as tx Number of elements that required to write.

 

When reading the DMA FIFO I created the following sequence - 

NiFpga_ReadFifoU64(*session, NiFpga_rs485_TargetToHostFifoU64_FIFOOUT,
(uint64_t*)rxData, rxNOElements, TIMEOUT_MILISEC, &remainingDMA_RxElements);

 

NiFpga_AcquireFifoReadElementsU64 (*session, NiFpga_rs485_TargetToHostFifoU64_FIFOOUT,
&rxElements, rxNOElements, TIMEOUT_MILISEC, &stArrRxChannelState[chnNum-1].m_readElements, &remainingDMA_RxElements);

 

NiFpga_ReleaseFifoElements (*session, NiFpga_rs485_TargetToHostFifoU64_FIFOOUT,
stArrRxChannelState[chnNum-1].m_readElements);

 

But the return status of NiFpga_ReadFifoU64 is always -50400 - which is timeout. I'm reading the same quantity of elements as were written in a write sequence. After NiFpga_AcquireFifoReadElementsU64 the number of acquired elements is always 0, and remaining elements in DMA is 2. 

When running the LV bitfile using LabView interface, the procedure works fine - so I can assume that the bitfile is Ok. .

What do I miss with CVI? I ran the same sequence for other bitfile and seemed to be working.

I there any manual/help files for FIFO functions and how to use them? Because I didn't find any. 

 

Any help is appreciated, thanks in advance. (image)  




Perplexing problem with Keithley not being recognized

Wed, 14 Feb 2018 21:48:13 GMT2018-02-14T21:48:13Z

Hi all,

I know this has got to be a simple problem, but being a fairly new CVI programmer, I'm stumped.  First, I have a good amount of programming experience, but know next to nothing about how CVI works.

 

Here is my problem:

I wrote a small application that uses a Keithley 2701 using an Ethernet connection.  I developed the application on a system that has a full installation of CVI.  The application runs fine.  I built a distribution kit for the application so I can move it to a target computer.  On the dedicated computer I loaded a full install of dotNet, then the NIVISA software, the Keithley IO Layer, and then the Keithley Driver.  At that point I loaded and installed my application.  I get a -1073807343 error.

 

I then ran NiMax, and tried to configure a network device using the same connection string as in my application.  NiMax finds the device and can establish a session with it.

 

That should tell me that the necessary software is on the target computer.  So what have I done wrong?  It seems probable that I have simply neglected to configure something correctly in my distribution, or perhaps have a file used by my application in the wrong location on the development computer (and I have somehow compensated for that), and when the application runs it doesn't find the file.  Could it be a registry entry?

 

BTW, an application written by another individual uses the exact same setup for the NIVISA, dotNet, IO Layer, and driver as my code, and it runs fine...  So it has got to be something really really stupid.

 

I would appreciate any help you can give me.  This is driving me crazy...

 

 




Has Taskbar Button and un-minimized main panel

Wed, 14 Feb 2018 13:41:44 GMT2018-02-14T13:41:44Z

Hey everyone!

 

I find out that I'm not the only one who compliant about this:

https://forums.ni.com/t5/LabWindows-CVI/quot-Has-taskbar-button-quot-Windows-7/m-p/2438818#M62421

but unfortunately I did not find any good solution so far.

I am using CVI 2013 and work in windows 7.

In the application I made, more than one panel could be used.
The problem is:

1. In a case that the option "Has Taskbar Button" is checked, two identical windows of the main panel are displayed on the taskbar.
2  In a case that this option is unchecked and two different panels are displayed willingly (the main panel and another one) - when I minimize the two panels using the regular panel button, the main panel does not appear back on the screen no matter what I do. The icon of the application is still on the taskbar, but when I press on it, or try ALT+TAB nothing works. 

I understood from the previous post that there is some kind of unlikely way to un-minimize the panel (problem 2), but I need a solution that would be more intuitive to anyone who will use this application in the future. 

What can I do in order to solve these problems?

Thanks!

 




Multiple Counter Tasks

Tue, 13 Feb 2018 01:34:24 GMT2018-02-13T01:34:24Z

Hello everyone.

This isn't specific to Lab/Windows, but I don't see a thread specifically for NIDAQmx.

 

I'm trying to get multiple tasks to operate at the same time.  We actually have 2 PWM (measure duty cycle) signals and possibly an encoder signal.  The person buying the card was hoping a PCI-6351 would work as it has 4 counter channels.  Although the card doesn't have built in option to measure duty cycle, I figured I could use two continuous tasks to read the on and off pulse times.

 

I can't get two tasks to operate at the same time.  Through my trials I get an error no matter what I try:

- can't reference the same input line in two channels

- can't have two counter channels in the same task

- can't have two counter tasks active, using the same timebase resource?

 

There must be something (hopefully simple) that I am missing.  What good is a 4 counter card if I can only use 1 at at time.

 

Grateful for any feedback!
Mande.




documentation feedback gone

Sat, 10 Feb 2018 17:15:57 GMT2018-02-10T17:15:57Z

Hello NI,

I remember that once there was a dedicated online form for feedback on the help but it seems to be gone.

I am missing this feature because once in a while I stumble across some typos, missing information (e.g. missing default values) or the like and it seems sort of overkill to open a support request just for reporting such details - and also most of the times I am just too lazy for such an effort.

What should we do if we still care about documentation?




cvi TestStand

Fri, 09 Feb 2018 10:42:18 GMT2018-02-09T10:42:18Z

i use cvi for execute a seqFile but after i exite the application i get a warning message : "References to PropertyObjects were not released properly, but a list is not available. "

i close the sequence before exite and i discard all the TSUIObj but the same warrning allways




Precedence of Callback Functions

Wed, 07 Feb 2018 10:50:22 GMT2018-02-07T10:50:22Z

Hello all,

I have 2 observations about this: http://zone.ni.com/reference/en-XX/help/370051AC-01/cvi/uiref/cviprecedence_of_callback_functions/

First, how come the chained callbacks are not represented ? They should happen before anything, right ?

Second, how come the main callback isn't called for timer events ? Is there a reason for that ?