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

while loop with shift register

$
0
0

Hi all,

 

First I want to say that I appreciate all the help people get here!

So this week I posted this thread about doing several live edits on a graph:

https://forums.ni.com/t5/LabVIEW/Live-editing-multiple-graphs/m-p/3662802#M1029428

I've made two subVI's for the functions I need: a VI for calculating the max, min, avg, and mean of the array, and a VI to clip data in the graph. The problem I encounter is this: I need to be able to do both SubVI's live. So when I clipped some data, I want it to recalculate it's max, min, avg and mean. So I need them both in a while loop. However, the max, min, avg, and mean function doesn't work with a shift register, it keeps updating the data in some way I don't really understand (Some explanation would be appreciated Smiley Wink ). The clipping function does need the shift register, because I want my program to remember the things I've clipped. I've thought about doing a while loop in a while loop but when I looked into that, it seemed that it isn't a good option.

On another note, I would like an undo option for the clipping function, but I have no idea where to start. So maybe some tips to get me started would be nice. 

I've attached the main program (sorry if it's a bit messy), the subVI's, and the file I read.

 

Thanks a lot in advance!!

LvL

 


Debug runtime loaded dynamic dispatched VI in executable

$
0
0

Hello everyone,

 

i have a problem which i cannot wrap my head around and i hope someone can provide an answer. I was messing with the MGI solution explorer example (log data into HTML or CSV depending on loaded class) provided where there is a dynamic dispatched VI loaded from a class in a PPL file during runtime. My problem is the following: 

-I want to debug the different overrides of the d.d. VI

-If i open the VI in development env. without the child classes loaded into memory then as expected i can only open the VI of the parent class

-After loaded them into memory i can select which override i want to open (as expected)

The problem occurs if i decide that i want to debug the d.d. VIs from a debuggable exe which calls them:

-I build the exe as debuggable  and open a debug session and everything is working fine but even if i load the classes into memory i can not select the overrides for the d.d. VI.

I hope someone has experienced a similar problem and have a solution for it. (BTW i am using LV2015 and i am attaching the example provided by MGI)

 

Thank you in advance!

 

-Imre

 

Converting different types of data to ONE byte array

$
0
0

Hello,

 

i have a quick question about labview.

for example if i have a bunch of variables like

 

bool bVar1

int iVar2

dint dVar3

string Var4

 

and i want to have this data in ONE BYTE array (input rule for an external function)

how can i solve this?

thanks in advance

web interface design tools for RPi3 web service publishing

$
0
0

Hello,
I'm not very experienced in designing a proper web page. We were able to broadcast web service with RPi3. We would like to send commands such as open / close or stop / start commands to some systems working with lab view through web page.

In LINX 3.0 - 07 | Web Services, I have seen commands for importing data from the lab view in the main.html file. What I want to do is just like the example. In this regard, do you need to know what commands are required to communicate between the lab view and the web interface, and what tools do you recommend to use?

Thanks.

Graph chart

$
0
0

Hello,

   Anyone knows how to fix X-axis(for example , X-axis  ranges form 0 to 100) when using Graph Chart?

I am presently experiencing difficulty in performing FFT for frequency below 1Hz

$
0
0

Good day,

 

I am presently attempting to do an Impedance analysis which involves the division of the frequency response of voltage and current (V/I). However, I am having serious challenges with performing this operation at the low frequencies (1Hz - 10mHz). How I code currently is by using an Index array to specify the frequency bin (for the particular frequency) that I want to divide. However, for the low frequencies the index array doesn't accept figures less than one. Moreover my sampling frequency and number of samples is both set at 100,000Hz and 100,000 samples. 

 

I will appreciate help with this. Please find attached my code. Thanks 

My cRIO9082 cannot be connected, and its status in the NI MAX shows 'inconsistent IP settings'

$
0
0

Just as the title, my 9082 can work well yesterday, and I didn't change any settings, but this morning, it can't work any more.

I can not connect it through Lab view, so I tried to restart the computer, the D-link, and the 9082, it seems not make any difference. And the status shown in NI MAX is 'inconsistent IP settings'. However, I tried to change the network setting in NI MAX to static as well, it seems no make any difference.

I don't know what to do next.

Using HTTP to access webpage

$
0
0

Hi,

I have a server unit (requires username and password) which I would like to gain access using the LabVIEW program.  The program I am trying to create is to take the webpage's source code using HTTP through TCP.

However, when I run the program, I am unable to login and access the source code data inside.

The result I keep getting is the source code of the initial page which asks for a username and password.

 

I am not sure is what the problem is.  I am using LabVIEW 2017.

Any help is appreciated.

Thanks

Data InData In


TCP OPEN CONNECTION ERROR 63

$
0
0

Hi,

I need a Connection to several devices with TCP/IP.

In the past this was fine but now there is a problem I can’t solve...

I can connect up to 5 devices and everything is fine. As soon as i try to connect more devices I always get an Error 63.

I tried different  chronology and much more and don’t fine the reason for this behavior...

I added a simple Vi (SimpleVI) which should connect to 11 Devices...

 

 

Thanks for your  help.

 

 

 

Cluster Array, detect an event from an element of a cluster contained into the Array

$
0
0

Hi,

 

I send you my VI in order to give you an idea of whay my cluster array looks like. The array can contain 256 clusters. And in the clusters of the arrray, there is several elements. I would like to keep this kind of structure (array) for my programme. When the user press a button into the arrray from the IHM, I would to know by means of a reference for exemple which was the button pressed by the user. Then with this information, I would be able to treat/calcul the information. However, apparantly it is not easy... I can only know that the values contained into the array have changed, but I don't know which value has changed ... (There is only one value which change at a time).  If you have any solution ... Thank you very much ! Smiley Very Happy 


Have a nice day ! 

Scrolling of Frontpanel produces high CPU load and crashes COM-communication

$
0
0

Hello, I am using Labview 2014 32 Bit on a Win 7 machine (8 GB RAM, 6 core AMD).

I have developed a very complex measurement software over the last years with communication with > 15 external devices. Therefore my code is very big (many sub vis, many controls etc). Basically, I use a producer and a consumer loop using Queues. Additionally I have a device loop for time sensitive communication with my LASER

Recently, I noticed that the CPU load increases drastically when using the scroll bars. As a result of this my device loop for my LASER is not running as designed. Unfortunately, my laser needs to receive a command from PC every 500 ms - otherwise it will turn itself off. And this is my problem: When scrolling while the VI is running, the CPU load increases and the loop execution gets delayed to the point that my laser switches itself off and on until stopping the scrolling. I also used time-controlled loop with high priorities without solving my problem.

My question to the community: Is this a common problem for very big GUI - VIs? Is there an easy fix (except hiding the scroll bar)?

 I would appreciate any help I could get.

Best Regards

 

PS: My wait for event structure has almost 150 cases - could this be a possible reason?

Word Report Page Break

$
0
0

I'm trying to insert a page break in a word report.  The documentation on the "New Report Page VI" states that if I don't specify a bookmark, a page break is inserted at the end of the document.  This is not working for me.  Also, if I dig into the "New Report Page VI", it comes to the point where it is adding the break and the break type value is 0.  Everything I see says the a break type value of 7 is a page break.  I wonder if that is the problem.  I'm using Labview 2016.

Collect Data from DAQ for user inputted time interval

$
0
0

Hello,

 

I am fairly new to labview and for part of a work project, I am trying to collect Data from a DAQ for a user inputted time interval in order to average that data over that given time interval. Also, the DAQ cannot be contained in a separate loop, as this would interfere with the rest of the program and its functions. 

 

The process also needs to be continually reset and restarted, with the results being stored in an array for the user to see and compare with the previous results.

 

Is it possible to index into a loop for a certain amount of time rather than until the index reaches a certain size? Unfortunately, I am unable to upload the Vi for work confidentiality reasons.

 

Thank you!

 

How to send email when vacuum reaches threshold

$
0
0

Hello,

 

I have made the attached vi, which is supposed to take readings from a vacuum pump every second, average the last 60 readings, and report and log the result every minute.

 

When the vacuum gets below a certain threshold, I would like it to send one email notifying the user. However, it sends emails continuously. This is the part I am having trouble with.

 

How do I program it to send a single email when the vacuum crosses the threshold, but to not send any more emails?

Creating a digital waveform graph?

$
0
0

I don't know if this graph is right for my project but I figured I would try it. I was wondering how I would build the Digital Waveform graph from 2D data, if that's even possible.


How to correctly plot FFT

$
0
0

Hi,

 

I am tasked with taking the FFT of a 1D array of 2310 points. The dt value between each individual point is .142 seconds. So i believe the sampling frequency is around 7.0422 Hz. I have been trying to format the frequency axis correctly, so that my graph will correctly display at which frequency my peak is at. I have taken the FFT in three different ways, each displayed in the VI attached.

 

The first way, the graph is labeled "Resitance FFT using dt". After taking the FFT of the data, i wire the output to a build waveform vi with the dt value set to .142. The results of this graph display that i have a peak somewhere between 0 and .15 Hz, which is what i am trying to achieve, but i believe this is incorrect because the x-axis has the same scale as the original data(time) and not frequency.

 

The second way, the graph is labeled "using df". The df value is .003048. I believe this method is the correct way to scale my frequency axis, but the results i receive give me a peak at a frequency from 0 to 0.0025hz. To check these results i decided to wire the output of my FFT to a filter with a low cut-off frequency of 0.01 hz and a high cut-off frequency of .5 hz, and then take the inv FFT. The results of this display a sinusoidal wave on the graph labeled "FFT->filter->inv FFT" which is exactly what the whole goal of this program was to achieve. What i cannot seem to wrap my head around is that my FFT plot labeled "using df" which I scaled using df has a peak at a frequency much lower than the  low cut-off frequency of my filter, so after i take the inv FFT of that data, nothing should appear since it should be filtered out. To me this suggests that the way i scaled the first FFT plot labeled "Resistance FFT using dt" is correct. Is there an explanation as to why i am obtaining these results?

 

Finally, the last way i displayed my FFT of the data was by simply wiring the output of the FFT vi to a waveform graph. This graph is labeled "no scaling", and i believe this FFT is incorrect because when you look at the x-axis the final point is at 2310, exactly the number of data points, so the x-axis is not scaled correctly at all.

 

So, what is the correct way to scale my frequency axis? Or does anyone know why i am obtaining these odd results and how to fix it? if i left something out of this post/ you need more info to help solve the probem, please let me know.

 

Any suggestions/corrections are much appreciated. Thanks for your time.  

TDMS Oddity

$
0
0

So, I was working on a project today, and came across this little (seeming) oddity while trying to read from a TDMS file.

 

For the current application, I'm moving around Group/Channel pairs in a single string with a (Smiley Happy delimiter... So essentially a string which says "Group:Channel" . When I want to read / write this channel, I figured I'd just pass it through a match pattern VI, and pass the two substrings into the "Read TDMS.vi"

 

Well... surprisingly this doesn't seem to be allowed.  It creates a broken arrow on the "Channel" input wire, saying that the types "String" and "(Sub)String" don't match.

 

This does not happen for the "Match Regular Expression" VI, and a seeming workaround is to just put in a "Type Cast" block...  See attached snippet.

 

I might be missing something here, but this seems to be an error of some sort.  This behavior occurs in both 2015 & 2017 (32-bit).  Snippet is 2017,

 

TDMS Oddity.png

Elevated Console, MKLink Issues

$
0
0

Okay so I have a LabVIEW program running in Windows Server 2012, and I want to call a command line program that can only be ran in an elevated command prompt.  What I'd really like to do is use the mklink to create a symbolic link to a file.  Now the user logged in is an Admin, and for testing I turned UAC all the way down, but no matter what I get an error saying I don't have the correct privileges.

 

So I created a batch file that I can double click and see that it is ran by default in a non-elevated command prompt, even though I am an administrator.  If I right click the batch file and choose Run as Admin, it runs just fine, and only prompts me to continue if UAC is turned up.

 

So how in the world do I make this work without jumping through hoops?  How can I make an elevated command prompt to be used in LabVIEW?  The best I could come up with was to create a shortcut to cmd.exe and in the properties set it to run as an administrator.  Then I think I can call this cmd.lnk from LabVIEW and pass the parameters into it.

 

I've done stuff like this on other OSs before and had no issue at all but for some reason when I go to Run and type cmd it opens a normal non elevated command prompt, and I assume this is the problem in LabVIEW.

 

I've also tried things like Runas and Psexec and while this allows me to run the program as any user, this still runs in a non-elevated command prompt.  Any suggestions?  Thanks.

Missing external triggers occasionally (due to tight timing?)

$
0
0

I am generating a pulse train from counter 0 on a PCI-6723 by following this example:

https://forums.ni.com/t5/NI-DAQmx-Examples/Generate-Retriggerable-Finite-Digital-Pulse-Train-from-Counter/gpm-p/3511332

 

The start of the pulse train is triggered by PFI0, which is wired to an external signal.

The timing is very tight between the triggers and pulse train. The trigger is set to come in every 200ms and a pulse train is set to last 200ms.

 

My problem is sometimes the trigger signal would just be ignored. I figured the reason might be the timing is so tight that when a trigger signal comes in, the counter is still outputting a pulse train from a previous trigger, thus ignores the current one. Any idea how to avoid this?

Interpolating data between two discrete data points

$
0
0

Hey so I am an extremely new user to Tabview so lease keep this in mind when helping!

 

I have created a XY graph with approximately 50 discretely measured points. However, I would like to interpolate what a point may be in-between two measured data points.

 

I understand that apparently you can create a line between two points on your graph and somehow create a function from which you can plug in say point Y to get out point X.

 

My question is how is this potentially done as I have been having no luck whatsoever and cannot find any help anywhere.

 

Thank you for any and all help in this matter!

Viewing all 69025 articles
Browse latest View live


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