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

stopping a loop without waiting for its next iteration

$
0
0

I'm wondering if there is a good way, or even anyway to stop a while loop without waiting for its next iteration. Lets say you have a timer in the loop so it iterates once evey 10 seconds, then you have to wait 10 seconds for it to stop after a stop button is pressed which could be a problem.

 

Thanks!


daq asisstant flowmeter sensor

$
0
0

Hi all

I have omega flowmeter sensor sent at attachment and i want to create daq assistant.What should i select?I mean it is a digital sensor thats why i am choosing acquire signal-counter input and frequency.Is that right?

 

Thank you

I want to create new files at interval of 2 seconds from "Write To Measurement File"

$
0
0

I am a LabVIEW beginner; I want to create new files (with similar names such as test_01.txt, test_02.txt ...) at interval of 2 seconds using "Write To Measurement File".

Access Violation

$
0
0

I was playing around with user events and managed to produce some code that reliably crashed LabVIEW.  Thought I'd share (mainly because it amused me)

 

Note:  This was me playing around because I was curious to see if it would actually fire the event.

Access Violation.png

Actor framework message maker not showing up

$
0
0

Why don't I see the option for "Actor Framework Message Maker" in LV2015?

 

I have the Actor Framework project open in both version 2014 and 2015, but I don't see an option to launch the message maker in 2015.

 

Capture1.png

LabVIEW 2014

 

 

Capture2.png

LabVIEW 2015

Writing to Control by Reference in a Callback - Speed

$
0
0

Ok, I will try to use as few words as possible to describe my application!

 

I wrote a wrapper for .NET DLL since it was returning an event source of 0 for call-backs and LabView doesn't respond to those events!  Wow, was that a nightmare to figure out!  The wrapper just "retransmits" the events.  It doesn't even do any configuration of the library!

 

I'm having an issue where events seem to be buffered when my VI does things with front panel controls.  It is strange since it seems one type of event isn't buffered and all of the others are, but that could be my perception.

 

I have front panel controls that are written to by passing a control reference to the "Reg Event Callback".  I have about 30 events per second comming from three sources (90-100 events per second total).

 

Does anyone have any idea why my events would be "buffered" for up to a few seconds?  I can cover the eye tracking sensor and see a playback record of the events!  Slowing down could include something as simple as writing to a plot control at about 100 measurements per second.  It is especially slow when the X scale is compressing to fill up the whole history.  I've noticed that some controls are extremely slow, like sliders.  I set the priority to the highest and changed the execution system, but I'm guessing this doesn't impact writing to front panels?  I've also tried resizing the window so that the control that the callback is writing to isn't visible (this DOES make a program faster if you are writing fast to a slider) but it didn't change anything.

 

I've attached some snippets and my wrapper.

 

"Callback.png" is my callback function.  All of the vis in it only include a few multiply/divide functions.

 

"Register.png" is how I register for the event and it shows the control that the call-back writes to.

 

"Program.png" is what my program does after registering for all of the events!

 

I will have to reply to this thread with the wrapper.  Not enough attachments left!

Multiple Tabs, Multiple Producer Consumer Loops, can't click anything.

$
0
0

I am building an application which uses  a tab control to present 3 pages on the front panel, I then wire the tab control to a case selector on the block diagram.  Within each case I have built a producer consumer loop for the buttons displayed on each page.  This approach seems to work fine when there are 2 pages, but when I use 3 pages, the application fails.  I am not able to switch between the pages.  

 

Please help

Calculate distance between two points

$
0
0

Hi all,

Need few suggestions:

 

1. I am trying to find the distence( in cm) between two points using image processing(one is fixed intentionally other point is not fixed and keeps varying).

2. If I use ball of different diameters as a point here,can I find the diameter of the ball also simultaniously .

3. Both are in realtime.

 

Please help.


How to lock block diagram of methods of a class

$
0
0

Hi all,

I have several classes with private and public methods. I'd like to lock the block diagram of all the methods.

In Class property-> protection I've created a password;  Result of this is that all the private methods are hidden, but public methods are editable and their block diagram is visible.

The only solution seems to lock each single method of my classes (one by one).

Can you help me?

 

subpanel show vi by button and tree

$
0
0

I want to use the four buttons to control the subpanle to show VI0,VI1,VI2,VI3,but don't know how to do it ! Please give me some help!  

001.png

tree VI

$
0
0

I want to use the tree control to show different VI ,but do not how to do it! Please give some help!

  002.jpg

Text indicator scrollbar flickers while scrolling

$
0
0

LabVIEW 2015 on Windows 10:

 

Place a text indicator on the front panel and fill it with enough text to require you to scroll quite a bit vertically...Now start to scroll, move it up and down a bit. The scrollbar will flicker.

 

When a collegue of mine asked me about this I thought it was probably because of frequent updates of the text, but this even happens if there are no updates at all...just displaying a static text.

 

Trying to figure out this issue I came over a similar issue that was reported here about table flickering, and low and behold - the strange solution for that issue; to drop a transparent decoration on top of the indicator (not covering the scrollbar though(it does not even need to cover all the text!)...actually works on the text indicator scrollbar as well (unless the user clicks on the text)

 

- A workaround, but why is it needed, and why does that work? Is this something planned to be fixed anytime soon?

USB 6008 AI and AO

$
0
0

Hi Friends,

 

I have a problem about usb 6008. Sample rate and number of sample can not determined by using sample clock function when analog output is used. How is determined these parameters for analog output? Also, there is a time difference between analog input signal and analog output signal. What is the reason of the time difference? How can I solve it?

 

Sincerely,

Labview error 1172 using rotronic HC2 probe

$
0
0

I am using the Rotronic  HC2-ic102 probe. The correct driver for the probe is installed and the probe works on another computer system using the same Labview code. When I use the HC2 probe on my computer system i get the following error,

 

hygrometer error.PNG

 

 

Could it be that the computer system I am using has two seperate drives a C: Drive and a D: Drive. Labview 2012 is installed on the D: Drive. I have tried running the Labview code on both drives but I still get the same error. The labview code is a single Vi saved in a folder with the DLL supplied by rotronic. Does anyone have an ideas why I am getting this error?

 

Application Builder

$
0
0

Hi,

I have an device running with a 7.1 executable, I need to make minors modifications ot it and I don't want to waste my time and transfer it to the newer Laview version I have (2013). But my "labview 7.1 application builder " CD isn't readable. I didn't find anything here.

Where can I download a "labview 7.1 application builder"?

Best Regards

Pierre


Convert two U8 to single 12-bit hex

$
0
0

This should be really simple, but for some reason I'm struggling to find a solution.    I have some 12-bit Temperature sensor data embedded into two U8's.   I need to strip-out 4-bits from the MSB U8, and add them to the LSB U8 to get a temperature reading in HEX.  

 

I have attached a simple snippett VI which emulates the incoming data.   The MSB U8 is typically 04h, 14h, 84h, or 94h, depending on which sensor the FPGA is reading.   Currently, the reading goes bonkers when the  the MSB U8 switches from 04h to 14h, to read the second sensor.

 

Thanks

 

system exec

$
0
0

I have written a DOS application and use the "system exec" sub-vi to execture.  It was running fine until I made a change to the DOS application.  The System Exec insists on executing the old version of the DOS program.  When I change names of the application, I'll then get an error code 2.  I have a suspicion that the DOS executable is copied someplace and it's that copy the System Exec insists on running.

 

The DOS executable resides on another PC on the network whose directory I've mapped to a drive letter.  I can copy the executable to a local directory, the same one with my VI, and it doesn't care.  I run the program from the command line, and it executes as expected and produces the new output.  The VI app runs the software, too, but produces the output of the old version.

 

I've modified the command string with "cmd /c" prepended to the actual command; e.g.,

 

Original:  "ppt arg1 arg2" -> Old output

 

Update: "cmd /c ppt arg1 arg2" -> New output

 

What is going on withing the system exec that it gets so particular?

 

Thanks!

connect strain gauge wireless module

$
0
0

Hello everyone,

 

I am about to start my labview program, but i dont have any idea how to proceed with.

 

Kindly somebody give me link to sample code for this.

 

i m using NI 3214 wsn and 9597 node wireless module

 

 

fft amplitude scaling

$
0
0

I am trying to use the vi "FFT Spectrum (Mag-Phase) VI", and I made a sample program to test it out, but I have encountered a problem regarding the scaling that I am confused by. The LabVIEW program is attached. In this program I create two sine waveform generators of ampltude 1 and with two different frequencies (20 and 30 Hz), and I append them together before sending them into the FFT vi. My problem is that I don't understand the output in the amplitude spectrum graph. It shows two peaks situated at the right frequencies, but their amplitudes aren't what I was expecting. The amplitude of the peaks are about ~0.35, but I was expecting them to both be 1 since I was inputing two sine waves with amplitude 1. Obviously the scaling is wrong, but I don't understand why. How do I correct this? Also, lets say I append together 20 sinewaves instead of two as in the example shown or instead input some generated noise. How would I scale the resuts so that everything would result with the expected amplitudes I was expecting?

Chunking a massive CSV file for easier analysis

$
0
0

I have a CSV file that contains 3 columns: time, voltage, and current.  This data spans a period of 12 days with 1ms between samples, and the file size is 53.4GB!!

 

I'm using LabVIEW to chunk this file into more manageable pieces for analysis using the Read From Spreadsheet File.vi and Write to Spreadsheet File.vi, and my method works great...to a point.  Here's a code snippet of what I'm doing:

Data Chunker.png

 

I'm using the "start of read offset" input to the Read From Spreadsheet File.vi to inch my way through the file, but since this is an I32 datatype it eventually rolls over and the VI errors out.  What I think I should do is delete chunks from the main file as I read and write them to their respective smaller file, but the method to do this is stumping me.  Are there any suggestions out there on how I could pull this off while still using the Spreadsheet File vi's (to avoid reinventing the wheel as much as possible)?

 

A couple ideas I'm toying with:

1. Iteratively delete data and reset the marker to "0" in the file (reading data in order of present to future).

2. Start at the END of the file (i.e. read the data from future to present) and iteratively set the file size smaller, thus deleting the chunks of data as I go.

 

Viewing all 69673 articles
Browse latest View live


Latest Images

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