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

Stop program at reading binary file

$
0
0

 I read binary file with IQ-samples from USRP (~ 90 Mb, Fs = 400 kHz). Then I demodulate FM-signal, resamle one to 44.1 kHz and listen on sound card. I read binary file by frames (40000 sampes,  Fs = 400 kHz ). Program works correctly. But if I set frame size equal 1e6 samples, program fails. Error 4 occurred at Read from Binary File in Read (LabVIEW: End of file encountered). Please tell me what should be the true condition of the output from the program? The idea is ending music playback does not coincide with the end of reading the binary due to intermediate buffers. Attached is an image model.

 

LV_edit.jpg


Controlling blinking rate of LED by three push buttons

$
0
0

Hi, I am trying to control the blinking rate of LED by three push buttons. When I press P1, LED blinking rate is 1s, for P2 - 0.5s and for P3 - 0.25s.

 

Problems occurs only when P2 is pressed, I cannot change to P1 while P2 is pressed. 

 

Please anybody can solve me that problem!

 

Thank you!

selecting between two output states within a state of state machine

$
0
0

i am trying to build a bidirectional visitor counter vi which use two IR sensors, each of these sensor stays on for 2 secs after thet are cut. I used a state machine to consider the three cases:
1.  Wait for either of the sensors
2. Sensor 1 triggered

3. Sensor 2 triggered

 

When sensor 1 is triggered, the vi is taken to state 2 where sensor 2 is disabled and a counter is incremented.
when sensor 2 is triggered , the vi is taken to state 3 where sensor 1 is triggered and the counter is decremented.
The problem is I cant find a way to wait for both the sensor in state1. I tried using two case select functions one after the other, but that does not work.

Remote control of non programmable toggle switches.

LV installer with RTE no restart

$
0
0

In Windows 8 after running installer built using LV which includes installing the Run Time Engine the PC will restart automatically.

 

I want this not to happen.

 

I have checked the setup.ini for relevant keys but couldn't find anything.  Is it possible?

How to program index display of a 2D array?

$
0
0

Hi Guys, 

 

I am interested to make the 2D array at the front panel to move up row by row by itself when the program runs. Is there any possible way to program the index display?

 

Thanks!

 

Regards,

Vanessa

sine waveform ptbypt: RLS input problem

$
0
0

i have a 2 part question : why is the output of a sine wave ptbypt.vi so small? each data point is in the order of 10E-15 . basically i want to add a sine ptbypt waveform to gaussian ptbypt wave form. but as i apply probe i see that the gaussian data point are very much larger than sine data points i-e 10E-3 . the summaiton of the two is then fed into an fir filter ptbypt. the fir is part of my rls algorithm which is suppose to predict the tap weights and remove the noise. but the tap weights always remain the same irrespective of the fact input is purely gaussian or purely sine. so when the summation of the both is applied to the input and the filter , changing the standard deviation of the gaussian doesnt effect anything either.
  if further leabration or cct is required please ask!.if someone knows what might the problem be, please help me out. ive hit a road bloack here. it would be very much appreciated! thankyou

Evaluate multiple conditions.

$
0
0

Hi,

I have three sets of routine developed in LabVIEW. I need to execute these blocks when certain condition is met, For example,

If condition 1 is true

      execute block 1

 

else if condition 2 is true

         execute block 2

 

else condition 3 is true

         execute block 3

 

Inputs and outputs are similar in each block. I was hoping to utilize state machine architecture but still not getting idea how to do it. 


Regards.


Read string control on pressing enter

$
0
0

I have a string control and a boolean button. The button is the input of a case structure. If TRUE I read the string control and send it through serial.

 

I want to set the button TRUE when I press ENTER (on the keyboard) after I finished typing into the string control.

I want to mention that I already set the "End text entry with Enter key" in Tools>Options>Environment.

 

Best regards,

Dragos

When using data binding in shared variable the properties does not update?

$
0
0

LabVIEW 2012 with DSC.

 

On computer A I have a.lvlib with a boolean shared variable with alarms defined.  On computer B I have the same a.lvlib which I set the data binding to point to the shared variable on computer A.  Is it normal that the properties, like the "Ack" are not updated on computer B?

 

Thanks,

 

Michel

how I can have the three curves with the exact time stamp

$
0
0

I have a problem in the display of curves, I want each curve shows the value in time stamp. What i get it is that the diagram shows curves with a false time, it's fixed in the first time stamp.. what shoud i add on the bloc diagram to correct the program.

Error -1074360311 occurred at IMAQdx Open Camera.vi

$
0
0

Labview2012 
Vision development module 2012
Vision Acquisition Software 2012

After the error occurred
GetInstructionSetBitField(nivissvc.dll),Program can not be executed

Now
Labview2012 
Vision development module 2012
Vision Acquisition Software 2014
Device driver2014

Program can be executed,but also annex error occurred
Please help me,I do not know how to solve.

Archetecture help

$
0
0

Hi,
I'm attemting to take measurements with a DAQ and a Micro Epsilon laser and I was wondering about what archetecture type I should use. The problem is that I have a serial motion controller that I will tell to move a certain distance, when in place I will take a measurement then move to the next positon and so on - I must know that I have taken the measurements at each point. I have created a sample code to demonstrate the take samples section of code that I would use- essentially a for loop for each device and lots of notifiers to ensure that I get the number of measurements I need and that I only take one set of measurements per command.

Is there a better way of doing this or is this the correct way?


Regards,

Joe

An installer created with LV2011SP1 won't install on a machine with LV2013 installed

$
0
0

I'm currently working on several FPGA drivers generated with Labview 2011SP1, which include a dll interface and a test program to test functionality of the dll. I used an installation pacakge to install 1) the dll to system32

                                                               2) the .dll/.lib/.h to an absolute path on the target PC.

                                                               3) the .exe test program to an absolute path on the target PC.

                                                               4) the necessary NI components (The NI Labview Run-Time Engine 2011 SP1 f5 and NI R series RIO 13.1),

                                                                   via the additional installers section of the Installer dialog.

 

This has been working fine, up until the customer installed Labview 2013 on his system. When I then gave him the next release of the package, it fails to install, with the message <files> "Incompatible with products already installed". Via trial and error I removed various of the 4 items listed above and the problem only disappears when 4), the NI components are removed. I then uninstalled LV2013, and retried my installation and it works. The customer doesn't need LV2013 on the machine so this fix is ok for now, but I am now concerned that all these similar packages I'm producing, delivered to several different customers, could be prevented from working if a target PC contains a later version of Labview than the one it was developed on.

Can someone confirm this issue and how it can be rectified?

I've found the following http://digital.ni.com/public.nsf/allkb/F41A941BE2AFAC47862574B100736584 issue which is possibly the same issue, but with a much older version of LV (I'd have expected it to have been fixed by LV2011SP1!). The fix for the above issue is to uninstall the runtime engines, however they don't appear on the list of installed NI products, and to unsintall them I apparently need to use an unsupported tool called msiblaster? Even if this worked, if the customer wanted to use LV2013 in the future, how could I support that?

I'm getting increasingly frustrated that I spend more of my time trawling the forums finding fixes for LV bugs than trawling my own code fixing my own bugs... 

Phase difference between two IQ signals

$
0
0

I have two IQ signals they came from LTE Uplink Demodulator.I am using two VSTs and generated each Component carrier in each VST.

I saw there are many ways to calculate time shift( equivalent to phase difference) between two sine ways.

But i am not getting ways to calculate the time shift between two IQ Signls.

Anyone can please guide me or provide the ways to do.

 

My analysis: I did cross correlation between two IQ signls always peak is showing at center.I think this is wrong method for IQ signals.

 

 


Calling executable file generated from labview in C++

$
0
0

Hi,

I am new to LabVIEW. I have to call an executable file  from C++ in a system where LabVIEW is not installed and Run Time Engine is installed. Can anyone please guide me with it. Thanks in advance.

All you Math Wizzes, Here is One For You

$
0
0

This is going to sound like an academic problem, but I assure you it's not homework :smileyvery-happy: :smileywink:.

 

TL;DR: Assume you have a piece of pipe that has some holes drilled in it. You have some other smaller diameter pieces of pipe that can be used as inserts to cover the holes. You can insert these from the right, left, or both the right and the left. What are the possible combinations, given the lengths of the inserts, that could be used to cover these holes.

 

Full version -- more details:

 

Assume you have a piece of PVC pipe some length, L. This piece of PVC may have some holes drilled in it that in certain situation you want covered. In order to cover these holes, you have combinations of slightly smaller diameter PVC pipes available that you can slide in. Now, based on where the holes are, you need to calculate which lengths of pipe to use. 

 

This would be a very easy problem to solve if you had the constraint of only inserting from the left or the right. But, let's say you have a pipe of length L=40 inches, and you have holes at +18 and -18 inches from the center. It may be more efficient material wise to put in, say, one 7 inch piece from each side so you only use 14 inches of material, rather than a 38 inch piece (assuming you had an insert that length). 

 

Of course, there are other constraints like time. It may be a lot quicker to put in one long piece than worry about saving material and putting in shorter pieces. But, I can filter out solutions based on those constraints. What I really need is, given inserts of lengths 7 inch, 14 inch, 22 inch, and 27 inch, what are the possible combinations that will cover up the holes in a given material. So, as an example.

 

PVC Pipe Length L=30, we will call the right edge 0, so with holes at +6 and +25 inches, a solution may be a 7 inch piece from the right, and 7 inch piece from the left. Another solution may be a 27 inch piece from the right and yet another solution just a 27 inch piece from the left. 

 

You get the idea. Also, I figured the worst case scenario for number of pieces used was L/(shortest insert) assuming they were all inserted from the same side. This puts an upper bounds on the number of pieces that can be used. But, this lead to tons of possible solutions still, because we have 7 possible insert lengths. So, we put a constraint on it -- combinations must include 3 pieces or less. One other constraint is, when inserting from the right and the left, you can't have the inserts overlap. So, you can't use a 27 inch piece from the left and the right on a 30 inch PVC pipe piece. And finally, the sum of the lengths of the inserts used has to be less than the PVC pipe itself (i.e. no overhang). 

 

So, I hope that was enough information. Curious if anyone can solve this; it is not an easy problem.

how to get the offset data in lock-in amplifier start-up kit?

$
0
0

I use a NI4474 card to get data (AC+DC) from my instrument, and use the LabVIEW's lock-in to read the AC signal out.

 

However, how can I read the DC (which is called offset) signal in this case? 

DAqmx in timed while loop, measurements are lagging behind?

$
0
0

I have an DAq MX which reads a voltage. The aquistion part is a while loop which has a 'Wait Until Next ms Multiple Function'  which is set to 100ms. The loop should thus run at 10 Hz. I wired a constant of 10 to the rate channel of the 'DAQmx Timing (VI)'.  But I think there is a synchronisation issue. If I run the program and let the voltage increase than I see the readings change but not increase. When I stop the program and start it again the readings are suddly a lot higher.

Is the buffer to big in this case or something? How do I synchronize the loop with the aquistion? So that it gets the latest reading?

Park Vector Transformation

$
0
0

Hello Friends,

 

Currently i am doing a induction motor interturn fault identification using Park Vector Approach.

 

To calculate the Park vector, we need a Stator 3 phase Current. I have measured the Phase current using Current Probe.

 

I have attahced the VI as per the Formula mentioned in the PDF.But i didnt get the Proper result.

 

I request to all for your valuable feedback.

 

Thanks

 

 

Viewing all 69324 articles
Browse latest View live


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