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

How to well-aligned print a 2D string array to a textbox?

$
0
0

I have a 2D string array ,the elements are random but with a maximum lenght.I want to print the array to a string box but ,unable to get a output of well-alignment.

Here is the code.
Code

 

I want to output aligned like this.Although maybe it is not able to align it precisely,but more or less is OK.

well alignment

 

Or is there a way to display a table in a string box?

Any ideas ,thanks!


Motor adapter driving 2 motor

Save report VI from report generation toolkit is broken

$
0
0

Hi all,

I created a data log vi using report generation toolkits. Initially it worked and then I copied the vi to another folder and tried to run it but ended up with a broken vi.  The error occurs in the save report vi of the report generation tool kit.   Please see attached vi and screenshots. I'm sure if you run the vi, it might work on your machine but won't work on mine. That's why I find it wired. Has anyone seen this kind of issue before?

frequency resolution or bin size in power fft?

$
0
0

Hello,

I am using the "SVFA Power Spectrum" VI to process mic pressure data. I want to show my result in FFT format with dB as my units, my question is how can I make this data look more presentable by lowering the amount of data points displayed without loosing the frequency range. My questions are:

 

i) is it possible to control the frequency resolution without changing frequency range / sampling rate?

or

ii) Can I somehow input a block size?

or

iii) Can I control the resolution band width also without changing the sampling rate and in turn the frequency range.

Reading from PNG

$
0
0

Hello,

 

I am working with the RAW data from a FLIR thermal image, using it to generate my own temperature images. The problem is that the data is written as a .PNG file, and I must have access to the data WITHOUT using VISION, because while I have a license in the laboratory I work, the client itself does not.

 

I tried to access the data using the Read PNG File.vi and using the IMAQ ImageToArray.vi. The results are different, but the image is the same. In Read PNG File.vi, the data is stored as a U8, while in the IMAQ ImageToArray.vi, the data is stored as I16. The results obtained with the IMAQ ImageToArray are correct, because I processed the data and obtained the results that were expected.

 

Does anyone know how to access the correct data in the PNG file, that is, the data obtained with IMAQ ImageToArray, without using vision?

 

Kind regards,

 

André

 

 

 

Keithley 2410 Source Meter Voltage not Outputting Correctly

$
0
0

Hey everyone,

 

I'm working on a program utilizing a Keithley 2410 SourceMeter and it's giving me a bit of greif honestly. The programmed voltage (which shows correctly on the front panel) is not the voltage that the instrument is outputting. The voltage shown on the front panel under the editable output is 0.7v but the actual output is 2.24v.

 

Has anybody worked with these successfully in the past that can point me in the right direction here? Is it just iffy hardware? All the other instruments are working perfectly.

 

Thank you,

 

Anthony

Exporting graph as image

$
0
0

Is it possible to export a graph from the front panel as an image in TIF format???

Advice on combining Matlab with LabView for a task

$
0
0

For the task described below, please give advice on what parts should be performed in LabView, what parts should be performed in Matlab, and the best way to get the Matlab code running on LabView.  I am a Matlab programmer with no experience in LabView or MathScript; I am working with a LabView programmer who hasn't integrated Matlab before. So your advice will help us figure out our approach. Here is the task:

  • LabView is running on a machine and generating text files every 10 minutes containing time stamped measurements of temperature, humidity, pressure, etc.
  • Every hour, I need to concatenate all the text files from the past hour, extract the temperature measurements, and perform some statistics. 
  • Presently I have a Matlab function which estimatates the statistics.  The input to the function is the hour's worth of temperature measurements. The Matlab function estimates a FFT from the measurements, scales and sums the FFT output, and estimates the mean and median of the temperature measurements. There are also constants that are passed to the function as inputs, such as a scaling factor for the FFT.
  • The output of the Matlab function is 3 summary values (temperature at resonance, peak temperature, and mean temperature). These values need to be time stamped and written to a text file. We produce 1 set of summary values every hour.
  • We expect a lot of debugging as the Matlab code is integrated with LabView, since this is a new application.

How much of this task should be performed in LabView (just the file concatenation and writing the output file, or all of it, or ...?) What is the best way to pull Matlab into this (MathScript, or use Matlab Coder to generate a *.exe executable or C source code, or skip Matlab altogether?)

Because the code only needs to run once an hour, and because we are new to this, execution speed is less important than getting something running.


Stop Update and Start FPGA without stopping Front End VI

$
0
0

I have been working on a project for generation of waveforms using a PXIe-7961R FPGA using both a fixed clock and varriable clock generated by a PXI-5406 function generoator. I control both these systems from a front end VI that feeds the desired values to the FPGA and Function geneorator. Currently when I update the values I have to stop the FPGA and Function genorator with buttons then stop the main VI, start the main VI then start the FPGA (which will automaticly trigger the function generator). Is there a way that I can keep the main VI going at all times? I would still need to update the values going to the FPGA and list going to the function genorator as well as stop and start them to keep them in sync. However, not stopping the front end VI would have major bennifits for this project.

Thanks,

ZG

How to organize a reuse function that uses a .Net control

$
0
0

So I have a bit of a dilemma that I'm struggling with.  I found an neat function on the community that does what I want and uses a .Net 4.0 control.  I don't actually need the control to be seen, just be available to call into some system level functions.  It works great when in a project but I want to wrap this up into a reusable function, and put it on the palette with VIPM.  The problem is a VI on the palette isn't in a project, and according to this document "National Instruments strongly recommends that you always put VIs that use .NET objects in a project."  But if it isn't, then the .Net DLL needs to be loaded from "The directory that contains LabVIEW.exe".

 

What I think the article means is is needs to be found in the search path setup by LabVIEW and a default one will fine DLLs placed anywhere under the install folder.  So in my case putting the DLL under the user.lib will work just fine in source.  But if I go to build a VIPM package, it will automatically build in the dependencies to a path that won't really exist, and then dropping it on the palette will result in a broken VI. It seems to be looking for the DLL in a directory named <Package>_internal_deps and the control is broken.

 

I can look into finding ways to perform this same function using non-.Net controls and DLLs, but I'd like to know the best way to try to have a function on the palette, that uses a .Net control for future reuse functions.  Any suggestions?  Thanks.

 

EDIT:  And for bonus points, is there any complications when dealing with making applications?  I'd really just like to drop this VI from the palette into my code, and then when I build an EXE it knows the dependencies and includes the .Net control DLL.  At the moment it seems I need to specify to always include the DLL, and I need to make sure it is in a folder called "data" next to my EXE.  I typically have the application builder settings rename this Support Directory to "Support" but that doesn't seem to be good enough for .Net and I need a seperate folder called data with the DLL in there.  Please tell me there is a reason for all of this madness, and that it is Microsofts' fault.

[resolved] Changed user cannot open project

$
0
0

hello I hope you can help,

 

I have a project under a local user name, however the pc ned to connect to the network now and use a network user/pass.

 

I've created a new network user and logged in as a local administraitor, but when I try to launch my project it says 'Project or Libarary file cannot be opened'

 

any idea why that is? and what I might do to get around it?

 

 

Folder permissions, resolved 

 

 

USB connect disconnect using .net

$
0
0

I am trying to determine when an Android usb device is connected and disconnected. I have seen the library here:  http://www.ni.com/example/29394/en/ but I may not e able to use the supplied dll. 

 

I have seen the the I would like to use the .net interface to access this functionality as seen here: https://decibel.ni.com/content/docs/DOC-35148. I have not been able to figure out how to get to wm_devicechange using .net. 

 

Any help would be appreciated.

Timed nested while loops

$
0
0

Hi,

 

I want to create a VI using nested while loops. What I want is the outer loop to run for 24hrs and during this run after every 30 minutes it should switch to the inner loop. The inner loop runs for 1 minute, this I am doing with the elapsed time subVI.

 

I tried to use a remainder to check whether the elapsed time for the outer loop is a multiple of 30 minutes, based on the condition being true the inner loop would be started. But since labview measures time in milliseconds the remainder was never zero and thus I was not able to accompolish the needed functionality. I am not very familiar with Labview and I am only just starting off so suggestions of anykind are more than welcome.

Agilent 4294 LV 7.1 program doesn't work in LV2016

$
0
0

Hi All,

I am trying to run a VI written in LV 7.1 in LV2016. Program seem to go through initialization steps and get stuck in a loop. After some debugging I realized a message box doesn't pop up. If I copy this message box to a new VI it works. Can someone point me in the right direction? I LV knowlege is beginner level. Copy of the main VI attached.

Parallel serial visa read with arduinos, data is delayed

$
0
0

Hello,

Currently I am using two arduinos to read in data from temperature and humidity sensors asyncronously. Each arduino sends back 4 floats, separated by commas, with a termination character of '\n'. In labview, this data gets broken up and then pushed to live plots. Additionally, the data gets written out to a file - arduino #1 and arduino #2 have their data sent to different files. It is important to note that the arduinos have different rates by which they send data over the serial comms. Ideally, we'd like the data from each arduino to come in and update the plots in real-time independent from each other. 

I am having an issue where the data does not seem to be displayed real time. I can touch a thermocouple and then ten seconds later the temperature will change. This delay seems to get bigger the longer the program runs for, which is a problem since we use the live output from the plots to determine when to initiate various cooling processes.

I am wondering if due to the different rates of data the arudiunos push, if there is some sort of buffer somewhere that has a "backlog" of the faster arrduino data and it is waiting for the slower arduino's data before it does anything. This is of course a data-flow problem, but I am fairly green with LabView and was looking for some advice or pointers. I'd like to mention that the arduinos are not sending data quickly; they are sending about every two seconds or so. 


I2C NI-845x Read VI returning incorrect data

$
0
0

I am using I2C Basic VIs in the VI attached (version 15.0) in LabVIEW 15 to send a command to a TI bq20z75. There are a couple of commands to tell the device to send back particular data for example current or status. Most of them work fine, but if I try to send anything above 0x4F the bytes I read back from the Read vi aren't correct. The read VI returns the same bytes from the last succesful command. It doesn't throw an error.

I tried to put a wait between the write and read but that didn't work. I changed the initialization settings but that hasn't helped. The software that ships with the TI device can query these commands without an issue.

Has anyone seen this before or have an idea what can be causing this problem?

Eclipse Help: Program "gcc" not found in PATH

$
0
0

Hi All.

I know this is not a LabVIEW question, but some LabVIEW developers use Eclipse. I think...

 

I'm trying to work my way through the NI tutorial: Getting Started with C/C++ Development Tools for NI Linux Real-Time, Eclipse Edition

And I'm sad to say that I can't figure it out. I follow the directions. I get the following errors:

   Program "g++" not found in PATH

   Program "gcc" not found in PATH

Google tells me that it probably has something to do with compiler installations on my computer. But dude, I am a LabVIEW developer - I don't normally have to deal with that BULL@#*%! (THANK YOU JEFF K)

 

So does anyone out there have enough experience with Eclipse to be able to help a noob that hates text languages even more now?

 

Thanks in advance

Error Reading Binary File generated with LabVIEW in MatLAB

$
0
0

I have two different types of binary file that contains a cluster and an array of the same cluster that I can R/W fine with LabVIEW.

Matlab has an issue reading and requires me to input field name, type for each field, number of bytes, array size information...etc

Details on the file content in the attachment.

How can I define each element in my cluster data type so that Matlab can read my file or if there is any other method of making this data transfer possible that you would recommend?

Thanks

Communication error when attempting to compile FPGA

$
0
0

Hey all,

I've been having a problem when trying to compile an FPGA VI on a cRIO 9104 using Labview 2016.  It tries and fails to connect to the compile server, and it tells me that the Xilinx compilation tools aren't installed, though they are.  A screenshot of the windows is in the spoiler below.

error1.png

Using the same computer, I am able to compile a program from a seperate project on a cRIO 9063.  So I'm not sure if it's a compatibility issue with the 9104 or some other issue.  Any suggestions would be appreciated, thanks!

 

Removing false peaks using Peak Detection efficiently!

$
0
0

Hello,

I have data with peaks. From noise sometimes some peaks are inserted between two pulses. 

Adjusting the width of peak detector no works since the peaks varying in time. 

IF the vi would have any way to fix that the dectector only find peaks inside of certain window it would be easy.

I tried to use the interval times peak series to get 20 number mean value and check if the reading peak is 30% inside of mean value. The problem is if you get one false pulse, this method detects the first and like the next interval will be taking like bad too.

Sometimes you could get 2 false pulses or several between 2 real pulses. 

I would like to know if there is any easy, efficient way to accomplish that, and maybe i am complicating the way to do.

Maybe get Array Subset from the first peak and check if there is any peak in the (Mean time window-30%). 

I would be grateful to get some ideas to do it.

Best Regards, Fred.

Viewing all 67123 articles
Browse latest View live


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