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

Obtaining Z values from intensity graph (2d array)

$
0
0

Hi all,

 

I can't figure out how to take a 2D array, and sepearte out just the Z values into a 1D array so I can find the average of them, and std deviation etc..? I'm trying to write a program that analyzes some data I have taken, and I can plot it, take cross sections of it, but I can figure out how to average the intensity values in a region because I'm not sure how to seperate out the Z values form the 2D array.

 

Any help would be great!  

 

Thanks

 


Berkeley Lab has an opening for Lead Controls Engineer

$
0
0

Berkeley Lab is Bringing Science Solutions to the World, and YOU can be a part of it!

 

Position Description:

Berkeley Lab’s Engineering Division has an opportunity for an experienced Controls Engineer to lead the Beamline Controls Section of the Advanced Light Source (ALS) Synchrotron user facility. The beamline controls section is responsible for a large number of LabVIEW based integrated control systems used on the different X-ray experiments associated with ALS beamlines. In this position, you will supervise control software engineers and system designers in the research, development/design, installation, commissioning and maintenance of these control systems.

 

https://lbl.taleo.net/careersection/2/jobdetail.ftl?lang=en&job=82271

 

For more information, please visit our website: http://jobs.lbl.gov/

Orienting an array of dots in an image

$
0
0

I have images that consist of a circle within which is an array of 12x14 dots. The array remains constant in size, but it varies in intensity, rotation, and location within the circle and the circle itself varies in location in the image. My task is to measure the intensity of the dots. I need to figure out how to place the dot array into a known and repeatable (I can do it on any given image) orientation so I can locate the dots and measure them. Once I get them properly oriented, measuring them is easy. Figuring out how to get LabVIEW to programmatically orient the dot array to vertical or horizontal is not. Any suggestions? I've attached a sample image for reference.

 

Thanks

1/3rd octave band Ln Sound Stats (e.g. L90)

$
0
0

We have an implementation for overall (full spectrum) Ln which is basically:

 

1) Waveform->SVL Decimated Exponential Avg Sound Level.vi->Percentile function

 

This is produces expected results when compared to a reference implementation for a FAST (0.125s) time constant.

 

We are trying to produce this same functionality but discretely for each 1/3rd octave band. Our best attempt is:

 

2) Waveform->SVT Third Octave Analysis->Percentile function (for each octave band)

 

To mimic the first implementation, we break the waveform into chunks and run the octave analysis vi on them with (filter reset = false, restart averaging = true). The size of the chunks are chosen such that we get samples out of the analysis vi with the same time interval as 1). This implementation is giving quite a bit of error (~5dB) compared to our reference.

 

I believe the source of the error is with respect to differences in how time weighting is performed in the 2 implementations, because the error increases as we chop the waveform into smaller chunks.

 

Are there some other options in terms of how we implement this? We understand that it isn't valid to first time weight the signal and then perform linear octave analysis on it. Is there a way to access the filtered waveform from each filter bank such that we could take the approach from 1) above on each octave band's waveform?

 

 

Combine DAQ and myRIO VIs

$
0
0

This is a really simple question...

 

I have an experiment where I control a servo's position using a myRIO, and I record the servo position and various loads using a cDAQ 9178. I control the myRIO using a RT VI (main_control_v1 in the attached project), and I control the cDAQ with a single "basic" VI.

 

How can I combine the 2 VIs? I want to be able to set various control parameters and hit run once on a single VI to upload the parameters to the myRIO and start recording with the cDAQ.

 

Sidenote: Does Linx's Arduino toolkit for LabVIEW enable a "1-click exportation" of my servo control RT VI to an Arduino Uno? Or do I have to rewrite my code using the toolkit?

 

The recording VI is "experiment_record", and the servo control VI is "main_control_v1" in the "myRIO_filter_control" project (all zipped & attached). 

 

Data loss in LV when reading Keyence LS-9501 measurements via DLL wrapper

$
0
0

I am trying to use LabVIEW to collect information from a Keyence LS-9120 micrometer with LS-9510 controller. However, when I try to read measurement values in LV, the readings are completely off. The image below shows the readout in Keyence's LS Navigator software (top leftcorner) as well as the readout in LV (right) in green.

Capture.JPG

 

Keyence's software shows accurate readouts for OUT1,2 but LV isn't even close. I've observed the following behaviors:

  • When the target is removed from in front of the micrometer, the outputs stop signalling in labview (as would be expected)
  • When the target is shifted/moved in front of the micrometer, the outputs see a spike in noise before returning back to a baseline. See belowCapture2.JPG

I got to this point by doing the following:

LabVIEW can connect to the controller, and the outputs respond to motion so that tells me at least some of the generated VIs work, but I have no idea why the readout values vary so dramatically from expected.

 

 

Euler Angles to Directional Cosines in FPGA space

$
0
0

Hey guys,

 

Relatively new LabVIEW user here. I am trying to implement some code that currently runs on an RT target and send it to an FPGA to do calculations.

 

Basically, we're running kinematics on RT (with inputs and calculations here) but I want to let the FPGA do the calculations because eventually I want to run the entire system on the FPGA. I was wondering how I could do this particular function in the FPGA space?

 

I have found how to do this function on a more fundamental basis (using inverse cosine and inverse tangent) but I am not sure how to run these complex mathematics on the FPGA side.

 

Does anyone have any ideas where I would even start?

 

Thanks heaps

Fourier power spectrum calculations

$
0
0

I have a programm that calculates Fourier Transform (FT) and Fourier Power Spectrum (FPS). I have data and I calculate Forier Trasform and Fourier Power Pectrum for this data. Everything looks right for FT but power spectrum looks very wrong. For example the larger value of amplitudes is equal 3.5E+2 on logarifmic scale, but larger value for FPS is equal 1.0E-12 on logarifmic scale. According my anderstanding power spectrum should be equal FT(k)^2. Window functions are not applyed in both cases.

Could you give me any idea how the power spectrum is calculated in LABVIEW?

Thank you.


LabVIEW Timed Loop

$
0
0

I’m currently working on a project where I’m required to generated soundwaves at different frequencies. I am having a problem when it comes to continuously running my code and saving the data. Is there a way I can get the program to generate the varies frequencies for 1 sec and record the data separately for each frequency?

CIP Data Array

$
0
0

I have managed to read and write arrays of data from a tag base PLC, with CIP TG READ Function, but when it comes to a structure of data I get lost. I have a global variable Process_Position_Data   an array with three element (BCD Data), has a structure, StInData of 20 members. Since my structure has 20 tags, beside my global variable, should I index individual tags from structure before feeding in to CIP function Read Tag, (two For loops one reading columns other rows), or after receiving output data. I am confuse, need help. Any body can give me an idea would help and will be appreciated.

Delay when a waveform chart stops recording

$
0
0

My head is stuck in an infinit loop and I can't get out.

 

I have a vi with a waveform chart on it that displays a capacitor charging voltage. There are two bits that are being monitored. One confirms when a switch is open the other confirms when it is closed (they are PLC bits). When the switch opens we start the recording. When the switch is closed we stop recording. No problem so far. The user wants the recording to continue a few seconds after the switch indicates closed so he can see the discharge side.

I'm stuck on how to do this.

TDMS Write data (1000 channels , 10 samples per second) ,

$
0
0

Hey,

So I'm reading in 1000 values @10hz each and then writing them to a TDMS file and flushing. Now each value is from a unique source and in the TDMS must be it's own channel. I am building an array (2d) of these single precision data points in a feedback node type pseudo buffer and then every 1 second ( so 1000channels x 10 points go to the true case which writes to TDMS)

For some reason the execution time is very inconsistent when I do this. anywhere from 10ms to 150ms spikes occasionally. What could be causing this. 

Looping initialise state in queued state machine

$
0
0

I am building an application where I have a standard state machine while loop. Due to benefits of queued state machines I would like to change to the queued version. However I have reached the following snag.

 

The attached picture "SM1.png" shows the standard state machine.

In my application I wait for a user to press the "Connect"-button. The program keeps looping the"Initialise"-state until that button is pressed. Afterwards, the "Run"-state is set. Then the state machine enables a variety of user options (move motor, disconnect motor, ...).

After the "disconnect"-button is pressed the "initialise"-state is looped again until the user presses the "Connect"-button.

 

With the queued state machine (here) the states can be accessed randomly. The "halt"- and "resume"-buttons can be pressed before the "start"-button. In this example application it is not vital to press the "start"-button first.

 

In my application however it is vital. The motor needs to pass the "initialised"- and "connected"-state before you can pass the "disconnect"- or "move"-state.

 

How can I cleanly achieve the looping "Initialise"-state with queued state machines?

 

Kikusui PLZ303W Syntax Error w/ LabVIEW Program

$
0
0

Hey everyone,

 

I am working with load settings on a Kikusui during switching operations, and it is inconsistently generating a "Syntax Error" message on the front panel. Occasionally it is also causing an issue with load setting. The VI causing the issue is an instrument maker VI from NI (KIKPLZ3W Switching Operation (Configure).vi). I checked to be sure they are all valid commands, and I have tried adding delay time in between commands and it hasn't fixed the issue. The inconsistencies make me think something else is going on there, but I can't figure it out.

 

Has anyone encountered this issue before?

 

Thank you,

 

Anthony

How to downgrade from NI DAQmx 16.1 to 9.3 version?

$
0
0

I upgraded my operating system from windows XP to windows 7. Following this, I installed LabView 8.5 and for NI DAQ USB 6211, I installed the NI-DAQmx 16.1 version driver. But it failed to recognized the DAQmx vi's like Start Task, Stop Task, etc. So bit of searching in NI website here suggested DAQmx is not completely backward compatible with LabView. It turns out DAQmx 9.3 is latest enough to be compatible with LabView 8.5 . So I tried installing DAQmx 9.3 version but it failed popping message "Higher version is already installed". On trying to uninstall DAQmx 16.1, I realized there is no uninstall option either in the installation executable or at the installed path"C:\\Programs\NationalInstruments\".

 

Kindly suggest a solution to downgrage the DAQmx from version 16.1 to 9.3.


How to use waveform chart to plot 2 signals at different sampling rates

$
0
0

Hello,

Say I have 2 signals : one updates every half sec, and one updates every sec. I would like to display these signals in the same plot. I must use Chart and not graph for the "stacked plot" feature. I researched for an hour and my conclusion is that this is not possible for the following reasons:

1. if an array is wriiten, every time a different dimension array is written to that chart, the chart clears and re-init with the new number of plots.

2. if an bundle is written, the chart is fixed with the number of elements in the cluster, it is not possible to write a new cluster with different number of elements (wire error)

 

One interesting contradiction I observe is : only chart has "stacked mode" option, this indicates individuality, however it is not possible to update individual plots while not messing with the others.

 

Please correct me if I missed anything.

System Exac have no privilege

$
0
0

Hi all

i have a CMD script (.bat file) that i'm trying to call from my LabVIEW application .

when i simplly ran the .bat file (by doubble clicikng the file) everythign runs perfectlly

when i try to call the same file, using the system exac function (from within LabVIEW) i get the folowing error :

System error 1314 has occurred.

A required privilege is not held by the client.

 

any ideas how to solve this issue? 

 

thanks in advace Smiley Happy

Reuven Stahl

Read variable from PLC with MODBUS API Free library

$
0
0

Hello to all.

Thanks for reading this post and being able to help.

 

I would like to use a free library Modbus ( http://www.ni.com/example/29756/en/ ) (I do not know if there is another free library Modbus).

I can not find examples of this library.

Somebody can show me how to read variable Y25 from PLC in Labview with this library?? I am using RS232.

Or a link where I can find information?

 

Thanks a lot.

Download directory content from FTP

$
0
0

Hi
I'm workin on a LabVIEW application which need to interface with an FTP server to get and to put files.
Moreover, i need to download the entire content of a given directory. This directory is defined by user, so it's name and it's content are not fixed.


For example, this directory can contain several files and/or several sub-directories (which can contain several files and/or several sub-directories, etc.).


Is there a VI in Labview or through the LVTN which can do this operation?
Or need i to develop it myself?

 

 

Thanks.

 

Connecting zigbee with labview

$
0
0

I want to connect my zigbee device to labview through usb port. I am not using any microcontroller/microprocessor. With zigbee I am connecting an usb adaptor. So how to establish connection?

Viewing all 66935 articles
Browse latest View live