Quantcast
Channel: LabVIEW topics
Viewing all 67026 articles
Browse latest View live

Do I have to preallocate memory of parameters that dll calculates

$
0
0

I'm using Call Library Function node to call .dll functions.

 

For example one of the function that I use is defined as:


unsigned long OpenInterface(void  ** Handle, unsigned long CommunicationType, void * pHandleInterface, unsigned char *PartNumber, unsigned long *pSize, unsigned long maxSize);

 

When I call this function I have to define input parameter "Handle" for it to function properly, and the function returns me PartNumber, pSize and other parameters.

 

My Question is:

Do I have to define constants of all output parameters before function is called? If I don't, do I have to be worry about somekind of memory errors? For example function OpenInterface calculates for me "Handle" in both cases: 1. If I define parameter handle as 0 before function call or 2. If I don't. 


DETT Trace private methods

$
0
0

Hi everyone,

 

I'd like to get some user-defined trace events from a private method. That doesn't work however: They don't show up in DETT. I can generate trace events from public methods just fine.

Is there a way to enable this besides making all methods public for debugging?

Write to spreadsheet is adding a new blank row after each run

$
0
0

I have a VI that is collecting data, and then writing it to a spreadsheet. The problem I am having, is that after each run it will add a new blank row at the top of the spreadsheet. The last run will have the data starting at row 2, row 1 is the name of the part tested, and then the part before that will have the data starting on row 3 part before that starting on row 4, and so on. The interesting thing though is that the name for each part is always on row 1, and it is only the data that is being moved down a row each run. In the snipped the disconnected line is the array of data collected.

LabVIEW Object Oriented Programming Tutorial

$
0
0

Hi,

 

I need to learn LabVIEW object-oriented programming. I have tried to learn it in the past and found it very difficult. Could anyone help me by providing a link to any material that teaches the object-oriented programming of LabVIEW very easily? If anyone could do the same, it would be very helpful. Thanking You. 

Discover all Classes and llbs being called by a vi

$
0
0

I have a VI that was created by a developer no longer with our company that I'm trying to re-engineer (One version of his SW works, but what's in version control, and complete - doesn't). It is a VI that is part of a larger program and it's contained in the higher level program's project. This lower level VI is a major component of the higher level program and it contains a number of sub VIs that are component VIs of various classes and llbs.  

 

I'm trying to discover a means through (scripting?) where I can open a reference to the subject VI, and then pull out the names of the classes and llbs that are being used, because their subject VIs are sprinkled throughout.

 

Any hints?

 

 

Confusion with extremely basic monte carlo pi program

$
0
0

Hello all,

I am having the most peculiar behavior with an extremely simple VI that I do not understand.

I am writing a program to approximate Pi by randomly generating points within X: [0,1) Y:[0,1), calculating the ratio of points inside an inscribed circle and outside of it in a square. I understand the math and the theory perfectly fine.

 

What I don't understand.....:

superBasic.png

This is my program. If i set "# of points" to 1 - ~40000, the program works fine and a relatively decent approximation of pi comes out (e.g. 3.1522). However, if I exceed ~40000 points, my program suddenly gives a clearly incorrect result, sometimes being ~0.5, sometimes being negative (which shouldn't be possible). I would like to know, why is this occurring and can it be rectified?

 

Knob on mac

$
0
0

I created a knob I could turn for a temperature conversion module. When I use the trackpad, the knob goes crazy! I thought it might be because of the trackpad so I used a mouse and the same thing happened.

 

It might be worth mentioning that I'm using the evaluation copy. 

 

What's happening and how do I fix it?

Moving average of 2d array (image).

$
0
0

Simple program for moving average. It extend border of array and apply filter (square with chosen length  mean at each point). Then it come back to initial size.


Building Executable - how long should it take?

$
0
0

Hi there,  I'm trying to build an executable in LabVIEW NXG but it's taking quite a while and LabVIEW's CPU usage has been pretty close to 0% throughout.  How can I be sure this is working?

 

My program has 10 sub VIs ranging from 25-60 KB, 1 sub VI at 163 KB and the main VI at 153 KB.  Building was taking nearly 3.5 hours before I cancelled it.  Is over 3.5 hours a reasonable amount of time for this size of program, or is something else probably wrong?  I have seen mention of hierarchy or 'levels' of VIs - maybe that has something to do with it but I'm not sure exactly what it means. 

 

Any help is greatly appreciated.  Thank you!

error 1950678943 only once, cRIO 9035

$
0
0

Hello,

 

I get error -1950678943 when I start the PC host vi. But only once. If I stop and start again, the error does not come back and everything is working fine. I tried open shared variable library vi already in a sequence structure, but it does not change anything. Also put some delays in, does not change anything either. The main vi calls a subvi that reads all variables from the shared variables library. Seems there is no way of delaying the running of that vi. I.e. I start main vi, this will start the sub vi. Does not wait a few s to when I actually need the data from that sub vi, even though that would be after these delays are finished.

 

Thanks!

NI OPC error and DIAdem launching failure

$
0
0

Our computer gets the following error:

NI OPC Servers

Invalid or missing user information [data is corrupt]

 

We've just installed DIAdem 8 and its license driver. Starting DIAdem also fails.

 

Much appreciate your help.

I want to acquire images with AVI file using NI 1776 Smart Camera and LabVIEW

$
0
0

Hi everyone, I would like to save avi files with NI 1776 Smart camera and Stream CVS.lvproj (http://www.ni.com/example/31000/en/) in Lab VIEW, and measure the displacement of objects with Vision assistant. However, I need to change some programs of Stream CVS .lvproj, and I don't know how to do. So please tell me how I should change the programs of Stream CVS .lvproj to stream avi files. 

The actions that I addressed are listed below.

1. I put the right click on (0.0.0.0) in stream CVS.lvproh and added IP address of NI 1776 Smart camera from properties 

2.  I changed the Camera name of Remote.vi to Cam 0 containing NI 1776 smart camera, and the port number to 3363.

3. I added the IP address of NI 1776 Smart Camera to remote IP address of Local.vi and changed the port number to 3363.

4. If you execute remote.vi and local.vi in that order, the errors attached below appaers.

 Remote.vi and Local.vi.png

 

  

Labview failed to call python

$
0
0

Hi,

I find the new LabVIEW 2018 can call Python natively, so I tried this new function on my computer. I find several examples (PythonNode_AddTwoDoubles.vi, PythonNode_AddTwoIntegers.vi and other examples found in this forums), these examples are very simple, only contain one or two functions, such as "hello world". But none of them can run properly. Every example returns an error code "1663". I can't find any explanation about this error code. image.png

 

I installed 32bit LabVIEW and 32bit Anaconda3 on my computer with win10. My Python interpreter works fine with other softwares and I already put python36.dll into the system path.Can anyone help me with this problem? Thanks!

 

Xy Fan

While creating installer,it shows an error of NI-DAQmx Drivers

$
0
0

In my code i m not making any use of NI DAQmx drivers but still while crating installer it showing an error as"DAQmx drivers" not available on your system.
Can anyone help me to get rid of this error?

 

Error screenshot is attached for reference

Need help around writting and reading a control from web server.

$
0
0

So I'm having a problem when writting from a web server to a control. I'm trying to achieve writting from a global variable to a variable called "DO Lines" and I simply don't have an idea of how can I change a control via web server and also changing it manually over LabView. I can read the value of global variable over the web server, but I can't write to it so it changes the "DO Lines" variable input to the "NI Elvis Digital Writter". Any idea or example how to achieve it? I'm not an expert with LabView but every advice, help or example with help out a lot. If you want me to, I can post the whole project. I attached the first VI and the Write.vi and some .jpgs of the files there.

Thanks a lot!


Communication with FANUC CNC oi-TF using NI OPC Server

$
0
0

I am trying to communicate with FANUC CNC oi-TF using NI OPC server to get data from CNC. To communicate we need FANUC FOCAS library files. I have those files in the right location. But when connecting with CNC I am getting an error saying "Fanuc Focas Ethernet Unable to start the GE Focas Data Window Library services". If anyone worked with this CNC kindly help me in this issue.

 

Note: when choosing device in OPC server it doesn't show oi-TF model, so I am choosing open model to connect. But LabVIEW help shows oi-TF is supported. 

LabVIEW FPGA - Code Execution Speed

$
0
0

Hi,

Can someone explain why the For Loop in the snippet below takes 50 ticks to complete? Input array has 12 elements. I would expect less than 40 ticks:

For Loop Execution Time2.pngThe thing is that I need the whole loop to take less than 40 ticks so I can acquire with a rate of 1GS/s. I have not tried to increase the FPGA clock rate yet.

LabVIEW 2018, 3xNI-9223, cRIO-9045

Getting niimaqdx.dll after launching application developed in labview

$
0
0

We have developed an application using Labview, but getting the Error while launching the application, before restart the system

After Restarting the system it works well

Can we reload the required dll after installation without restarting the System using LabView Application

Please Verify the Screenshots 

Can Format into String convert to uppercase?

$
0
0

hi everyone!

i use the format into string function quite a lot,
and sometimes i wish i could get some string input out as uppercase/lowercase.

i have read through the help (the format specifier page too) but couldn't find anything.

 

so the chance is slim, but maybe there is?

 

regards & thx for your time!

 

EDIT: to clarify, i mean the text of an enum, which is converted to string with "%s".

 

 

Error -1074395984 occurred at IMAQ ReadFile

$
0
0

Hi,

I received some images that I cannot open in LabVIEW. I can open in Matlab, Windows viewer, ImageJ and other sw but not in LabVIEW where I get this error :

Error -1074395984 occurred at IMAQ ReadFile.

 

I can forward you the image but it is huge (bigger 100M). Here below the link to download it:

https://we.tl/t-Dz5HTQHU0J

 

Thank you

Viewing all 67026 articles
Browse latest View live


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