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

Error while processing VISA signal through MatLab script

$
0
0

Hello there,

 

I am trying to make a simple voltage aquisition from a VISA connected Multimeter, feed the voltage reading (it's an array, but I feed only the frist element for this example, just until i manage to make it work) and use a MatLab script with a build-in function to plot this voltage. I get an error, and I have no idea why... Can anyone help?

 

P.S. I know I can do this simply and easily all by LabView, however due to the specific class project, I need to do interfacing between LabView and MatLab.

 

Thank you all in advance!!!

 

Bests,


G.


Error 1184 extracting website data

$
0
0

Hi 

 

I have a code which takes thermocouple temperatures from a DAQ every 5 minutes and also takes weather data from this website at the same time: http://willowsweather.1066.net

 

It writes all of the data to a TDMS file. The only problem is that occasionally, and seemingly randomly, I get this error code which stops the writing to TDMS

 

I'm not sure what's causing the problem so any suggestions would really help, it works fine most of the time and I have previously reached TDMS file sizes of 2600kb before the error is produced so I don't know what causes it...

 

Thanks

Joe

LabVIEW crahses after passing structure pointers to DLL from LabVIEW

$
0
0

Hi,

 

I have a DLL which returns a table (array) of 33 values after passing its arguments correctly.

I need to pass two structure pointers as arguments to an API of this DLL from LabVIEW.

For this, I have used call library function node and the structure arguments are created with Type "Adapt to Type" as there is no direct cluster passing facility in drop down menu of "Type".

Whenever I run my VI, each time LabVIEW crashes directly.

I am unable to find out the exception because of which LabVIEW crashes immediately.

Please find attached herewith a .zip file which contains -

1. My VI

2. DLL which is being called

3. Screenshots of the documentation of API, (there are total 3..one for API documentation and 2 for its arguments that need to be passed)

4. One screenshot of C example for your reference

 

Kindly provide me with the solution at the earliest as I am stuck and can't proceed with my further development.

 

Best Regards,

Snehal 

vi server - Error 1000

$
0
0

Good Morning All,

I have two simple VIs thats basically running timer with nothing else (Vis are called Left and Right). I am trying to learn and understand VI server capabilities. Eventually I will have 3 VIs running (Main calling two sub VIs Left and Right). Each VIs (Main to Left and Right, Left to right, and Right to Left) will have Data, Controls and Indicators passed to and from each other. Codes sample images below. When running Main that calls Left and Right I'm getting error 1000. I have read most blogs related to VI servers on this forum but could not fix the prob. Any help is appreciated. 

 

 

read ttl with NI9205can

$
0
0

Hello,

 

I would like to read a TTL signal using a NI9205 ADC.I've tried different way but no success.

I'm looking for tracks.

 

Thank you

Repeated running record and play from WaveIO gives error -5

$
0
0

Hello,


we have a problem in LabVIEW. We use the library called WaveIO. The purpose of this part of the program is simultaneous generating and recording signal using a sound card. (We have tryed both ASIO and standard drivers allowed by this library). We need to play and record the signal. After that increase the generated signal level and play and record again.
We have modified the example vi from waveIO library but the original untouched VI gives the same error. We control the subvis (stop them) using a global variable "StopGlobal.vi". First step executes correctly but repeated execution of these subvi generates unspecified error -5.
We included simplified part of our code.

 

Thank you for your help. This is our first project in LabView so we appreciate any advice.

 

Access Violation + VI failed to compile error

$
0
0

Recently, a project I've been working on crashes labview when opening, resulting in:

 

Exception: Access violation (0xC0000005) at EIP=0x0000000140E6D53F

 

Attached is the failure log and the offending file.  Opening the "FP Refs.ctl" shows an error in the error list, stating "VI has failed to compile" and I'm not positive how to diagnose that.  Any advice is appreciated@

Export waveform without skipping a line

$
0
0

Hi everyone,

 

I use the "Export waveforms to spreadsheet file" vi in order to... export some waveforms to a spreadsheet file ! Smiley Surprised

I wired a "true" constant to "Append to file ?", and I noticed that it skip a line between two acquisitions. I wanted to know how I can avoid that, and write the data right after the previous one. I could just delete the empty lines with Excel, but for very long acquisitions it won't be very convenient.

Any ideas ?

 

Thank you for your help


search and replace nivssdf file

$
0
0

Hello everybody,

 

I can't achieve to make working my VI. It's suppose to get my nivssdf file, search the calculated channel section and replace by a texte writing in a constant block.

 

I think the problem come from the file, I achieve to make my VI working with constant block but when I try to add the nivssdf file, this program don't work...

 

Could you take a look ? See the VI in attached file

 

Many thanks !

Multiple Waveforms charts. LV gets slow over time.

$
0
0

Hello, 

 

I'm currently developing an application that captures data from four different channels of an A/D converter. This data is processed and different parameters are extracted: frequency, amplitude and phase. The application also captures the temperature from three different thermocouples. The purpose of this is to plot the evolution of the different parameters over time and this means that I need 15 different waveforms charts (amplitude, frequency and phase from four channels and the three different temperatures). 

 

From the performance point of view, it is possible? My experience is that the LabVIew gets slow when the charts have more data. When I start the application, the while loop that gets the data from the A/D converter and plots the data in the charts takes 2 min and after many hours it takes 10 min. This time is growing progressively. 

 

Do you think that it is a problem of the waveforms charts? Or maybe it is a memory leak?

 

Any help will be appreciated. 

 

Thank you.

 

 

Create a linear relationship

$
0
0

Hello,

 

I have a voltage input on my DAQ device from a volume sensor, and want to link this to the actual volume. Is there an easy way in which I can say that 0 Volt should be equal to a volume of 0 liter and 1.5 Volt should equal 20 liter and have a linear relation for the values inbetween?

How do I send Soft Key Commands Through GPIB to an • Agilent 8753D Network Analyzer

$
0
0

I need to automate a manual process on an Agilent 8753D Network Analyzer.  Most of the actions are via the soft keys.

The measuremnts are simple.   Set marker to X MHz. measure marker

I cant find examples of how to send Soft Key commands VIA GPIB to the analyzer

I have a library of the commands just no idea how to communicate

 

Daq assistant as input for formula

$
0
0

I need the output from my DAQ assistant to be the input in a formula node. But I can not do it since the terminals are different; dynamic data vs double [64-bit real (~15 digit precision)]. Is there a way in which I can use this dynamic data in a formula node?

 

FPGA

$
0
0

Hi All,

 

I am trying to execute single pulse generation at very high frequency using NI 9401 on 9039 chasis. I am using Single timed loop and just passing a boolen on or off to the I/O in the STL based on calculated tick counts as shown in the attached screenshot. I want a pulse at 2 to 10 MHz range. I am using 80 MHz derived clock for this. When I try 2 MHz, for 50% duty ratio, I am getting 290 ns for the on-state instead of 250 MHz. Can someone please tell what could be the reason? I was thinking that 80 MHz clock should be able to generate 2 MHz pulse with very high accuracy. This extra 40 ns happens irrespective of the clock frequency I use. Also the ticks t1 and t2 are coming exactly as 20. Please take a look and let me know if I am missing something.

 

STL_Delay.png

Update wavechart dynamically

$
0
0

Hello,

 

Here is modelisation of my real case.

Here are key points:

  • horizontal axis - variable iteration (integer) that increments in time
  • vertical axis - 3 variables X, Y and Z
  • these variables aren't updated at the same time ... first X, then (after a certain delay) Y and finally (also after delay) Z
  • I want that wavechart updates a particular curve when corresponding variable changes, i.e. when X changes, X curve is updated, but Y and Z remains intact.

Actually this code doesn't work - wavechart isn't updated at all.

Also additional problem - stop button doesn't work.

 

Thanks in advance.

 

 

dynamical_update_wavechart (0).png


[Bug ?] LV2015 SP1 : scrollbar of string constant

$
0
0

Setup :

  • LV 15.0.1f1 (32-bit)
  • W7 64-bit
  • Automatic Tool Selection = ON

Automatic Tool Selection.jpg

 

 

I have just noticed that, when trying to move the scrollbar of a string constant to change the visible text, the constant is moved on the diagram. With the scrollbar of a string control, the behavior is expected.

Scrollbar.jpg

 

Am I missing something obvious ? Is this a known bug ?

 

 

 

 

Modify parts of vi.lib. Specifically NI_MAPro.lvlib

$
0
0

I am working on an application that uses the Waveform with SGL Y_Value representation data type extensively. I have modified vi.lib/Waveform/WDTOps.llb by adding .vi's to the polymorphic .vi's in the library to allow working with the SGL Waveform data type natively. I have documented the changes in our development library repository so anyone else opening the application in development mode can copy my modified WDTOps.llb into their local directory.

 

I am attempting to do the same with some .llb's in the vi.lib/measure/ directory but I can't because all the .llb's are contained in a locked .lvlib (NI_MAPro.lvlib). Is there anyway to do this neatly? I would really rather add them to the stock polymorphic .vi's than to just copy the block diagram of one of the .vi's, modify it, and then save it in some other directory completely.

 

In my opinion, I should not have to do any of this - If LabVIEW allows me to specify the Y-Value array in a waveform to be of the SGL datatype, then the stock polymorphic .vi's in the vi.lib directories should include .vi's for working with them natively. I am reading 36 channels at 50kHz....so type casting isn't always a good option if I am doing a function on a streaming basis.

 

Thanks,

Corey

1800 rpm sensor using cRIO 9075, NI 8422 DI module, and prox sensor

$
0
0

For structural, mechanical, & controls engineering projects, contact me.

 

Ryan Moore, PE, CLD

ryan.moore@aiken-engineering.com

Aiken Engineering Company

Office: 281-580-8468

Certified-LabVIEW-Developer_rgb.jpg

 

This was more challenging than i originally thought. Please see the setup in the image below.

 

IMG_4778.jpg

Motor: Grainger 1TMW5

Prox Sensor: Grainger 1EWP1, telemecanique XS230BLPAM12

cable: Telemecanique xszcd101y

 

Motor is 1725 rpm. this will be a 28.75 Hz signal. Prox sensor rated for 1000 Hz per page 71,72 of Telemecanique Catalogue Inductive proximity sensors OsiSense XS. NI9422 lists 250 microseconds or 4000 Hz.

 

Note the following program names & screenshot jpg names refer to the configuration of the NI 9422. To change the NI 9422 configuration, right click NI9422 module in the project>properties>specialty digital configuration. Read the below linked article "Configuring Counters (Scan Interface)" and the other linked articles under "Selecting the Measurement Mode" http://zone.ni.com/reference/en-XX/help/372603F-01/riohelprt/config_counter_rt/ IMPORTANT: i found a bug that requires you to change the specialty configuration to None & deploy the module within the project, in between changing the configuration to anything but None. If you do not do this you will receive an "Error -1950679035 occurred at Shared Variable in RPM SENSOR with RPM MEAS-COUNTER-COUNT EDGES.vi"

 

 See RPM MEAS-None in the image below.

1.png

 

RPM MEAS-None does not work. Even for a slow rpm of 40, a 1.5 Hz signal, Datapoints are missed because of the "network overhead" of shared variables and the low priority of while loops per LabVIEW deterministic execution. i've found you cannot get the max samples per second of any module or reliable timed execution for anything but very simple codes with low Hz requirements. To understand more about this read the following NI articles


1. Tutorial: Creating a Real-Time Application
2. Getting Started with CompactRIO
3. Using the LabVIEW Shared Variable
4. Communication Between the FPGA, Real-Time Processor, and Distributed Systems
5. Getting Started with CompactRIO - Performing Basic Control
6. Using NI CompactRIO Scan Mode with NI LabVIEW Software

 

 

See RPM MEAS-COUNTER-COUNT EDGES in the image below.

3.jpg

RPM MEAS-COUNTER-COUNT EDGES works. It is more accurate & reliable than the below measure period method since it is averaging several periods. it uses the number of prox sensor trips over the RPM interval to calculate RPM. The key thing here is we are not relying on the while loop but more on direct I/O of the module per the NI 9422 configuration. Note that to reset the counter as shown in the 2nd frame of the sequence structure, you must use an invoke node, then drag and drop the NI 9422 module from the project to the block diagram to get the SD module constant "ni.var.io://ni-crio9075-019fe926/Mod3". then select the channel that the prox sensor is on. 

 

See RPM MEAS-MEAS PERIOD in the image below.

4.png

 

RPM MEAS-MEAS PERIOD works & is the simplest. The I/O shared variable outputs the period in microseconds. Note, per the above linked article "Configuring Counters (Scan Interface)", you cannot select measure hertz in the specialty configuration of the NI 9422 because the min Hz required is 3.9 kHz. I believe this is more for vibration signals. if you try the measure Hertz specialty configuration, the shared variable will output 0 Hz. 

 

 

See RT RPM MEAS-COUNTER-MEAS PERIOD with RT MAIN & RT Library in the image below. 

RT RPM MEAS-COUNTER-MEAS PERIOD.jpg

 

RT RPM MEAS-COUNTER-MEAS PERIOD with RT MAIN & RT Library is the most efficient architecture & has data logging. it is the most complex. 

 

Project is here

2.png

 

labview program working in highlight mode and not working in normal mode

$
0
0

Hi All,

 

I would like to explain my program first,

 

I wrote a program where trying to establish communication between Labview and microcontroller. By this program I am trying to select the serial com port automatically. I have attached VI which clearly shows the logic which I have used. Labview checks each and every port which are working on the computer, visa write 's' and waits to read 's' . If 's' is recived  then loop ends here and diplays the right port where the microcontroler is connected. Otherwsie it continues to search...... every logic is working I tried to check for all cases it is working but it is only working in Highlight mode. When I try to run in normal mode the loop is continuously running not able to read microcontroller properly. I have checked for the Baud rate,no of bytes ect.,,, tried out somany ways....but still it is not working.

 

I have checked with all the delays but i couldn't figure where the problem is coming from. I don't have much expirence with Labview......Can any one please help me to solve this problem?

 

Thankyou

Deepthi

Producer consumer - read sound input and handle user events

$
0
0

Hi,

I am working on a project that will be using sound input as an oscilloscope. VI should read sound input continuously, wait for user actions on the front panel and react. For example the acquisition has started, signal is being displayed on Waveform Chart and user changes range of the chart (XScale.Maximum Property Node). I know how to implement producer and consumer while loops with Event and Case structures to handle user actions on the front panel but what about data logging? Should I have another producer that continuously run "Sound Input Read.vi" and push acquired data into the same queue that another producer pushes user events to? If so how can I stop this another producer loop after user press Stop Button on the front panel?

 

Thanks in advance.

 

 

Viewing all 69264 articles
Browse latest View live


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