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

Why is C code so much faster? (Image Processing)

$
0
0

Hello!

 

I am working on bigger application but I reduced it to show You a problem which I encounter at the beginning. I attach all the files needed to run.

 

This is simple rgb2monochrome algorithm which I implemented in C code and LabVIEW code. I don't now why C code is 4 times faster.

 

In C code I transfer arrays with pointers so I am working on certain area of memory. I thought that LabVIEW may be slower because it creates some unnecessary copies of arrays. I tried to solve this with In Place Element Structure and Data Value Reference but no effect.


I also tried to change tunnels into shift registers in some places (read in the Optimizing LabVIEW Embedded Applications). I changed options in Execution Properties of subVIs and I built EXE application to see if it will be faster. Unfortunately I still can't reduce diffrence between execution times.

 

I know that my algorithm may be better optimized but this is not main problem. Now both algorithm are implemented in the same way (You can check in cpp file) so they should have similar execution times. I think I did some mistake in LabVIEW code, maybe something with memory management?

 

And I have one more idea... Maybe nothing bad with LabVIEW code but something too good in C code Smiley Tongue? It is 64b library, implemented in normal way without forcing parallelism. Moreover i mark run in UI thread in CLFN. But maybe even so CPU handles this function with multi cores? I have 4 cores so then the difference in the execution times would be okay Smiley Tongue. But it is impossible, right?

 

I know opinions that LabVIEW sometimes is slower but about 15%, not 4 times. So I had to make some mistake... Someone knows what kind of Smiley Happy?

 

Regards,
ksiadz13


Flash Player Stream Info from Website

$
0
0

Does anybody here have experience loading a flashplayer interface from a website? Here's what I'm trying to do and what I have.

 

This is a radio stream from a local radio station. I'm trying to access the streaming playlist and the only place I can find this information is through this flash player.

The stream looks like this:

91X Player Now Playing.PNG

The part with "Advertisement Break" is the part that is actually Flash.

Here's what it looks like when I attempt to load it in LabVIEW:

91X Player LV Flash ActiveX FP.PNG

This is what the website looks like when first opening the player, so I think I'm on the right track, but it just stops there.

 

I used some HTML parameters from the website to get the player settings, which can be seen below (or on the webpage) along with the source code.

91X Player.PNG

91X Player LV Flash ActiveX.PNG

 

I'm expecting one of your to come on and tell me it's not possible, but any help would be appreciated.

subvi problem

$
0
0

Hi 

I have problem, actually when i try to create sub vis and when i called then in main Vi  doesn't run. Please help me Smiley Happy 

thanks a lot  

LINX 3.0 - LabVIEW for BeagleBone Black and Raspberry Pi 2/3

$
0
0

Hey everyone,

 

I'm excited to announce the launch of LINX 3.0 which adds the ability to deploy LabVIEW code to run on BeagleBone Black and Raspberry Pi 2 and 3 for non-commercial use.  The process of developing LabVIEW applications for BeagleBone Black and Raspberry Pi is almost identical to other LabVIEW targets like myRIO and cRIO.  Add a LINX device to your LabVIEW project, create a VI under the target and click run! 

 

 

We've also updated LabVIEW Home edition to include a license for Application Builder to enable users to build executables with LabVIEW Home.  If you've already purchased LabVIEW Home your existing serial number will now activate Application Builder.

 

I can't wait to see the exciting projects you create with LINX 3.0 so make sure to join us at LabVIEW MakerHub to get started and share your projects.

 

 

-Sam K

 

 

 

 

 

 

FPGA Memory errors when building...

$
0
0

I am building an FPGA application for an sbRIO-9636. I just added a memory item to act as a circular buffer.

The memory item has the size set to 414000 U8 items. When I build I get an error in the compilation status window that starts like this.

 

"LabVIEW FPGA: The compilation failed due to a Xilinx error.

 

Details:

ERROR:sim - User configuration exceeds BRAM count in the selected device

ERROR:sim:963 - IP initializer could not set IP core parameters on IP model

ERROR:sim - User configuration exceeds BRAM count in the selected device

ERROR:sim - Failed to initialize IP model.

ERROR:sim - Failed executing Tcl generator.

ERROR:sim - Failed to generate 'ReallyLongUniqueName_ReallyLongUniqueName'. Failed executing Tcl generator.

 

ERROR:sim:877 - Error found during execution of IP 'Block Memory Generator v7.3'

 

Release 14.7 - Xilinx CORE Generator P.20131013 (nt) Copyright (c) 1995-2013 Xilinx, Inc. All rights reserved.

 

I have attached the entire error read out.

 

Please help!

How to limit Shared Variable Engine SVE to only publish to one network device

$
0
0

I have multiple network cards installed in the PC, and they are configured to be on seperate subnets.

Is it possible to limit the publish scope of the Shared Variable Engine to only publish shared variables to one network card?

Export Waveforms to Spreadsheet File Function using Continuous Acquisition

$
0
0

I am using a cDAQ-9178 chassis with an NI 9236 strain gauge module to collect analog strain inputs from 3 gauges. I want to sample at 100 Hz but this strain gauge module has a minimum sampling frequency of 794 S/s, so instead I am sampling at 1 kHz and decimating my data to 100 Hz. I currently have a program that works well for what I want to do (attached as Strain_Finite.vi), except it uses finite acquisition. I would prefer to use continuous acquisition so I can see my strain-time curve develop during my experiment. 

 

The problem I am having is that once I switch to a program that uses continuous acquisition (attached as Strain_Continuous.vi), my Export Waveforms to Spreadsheet File function only records the first data point in the spreadsheet. I need help configuring my Export Waveforms to Spreadsheet File function to record all my data points. I suspect the issue stems from having the For loop inside the While loop but I'm not entirely sure. Any suggestions for this issue would be greatly appreciated!

 

I previously submitted a message post asking for help on how to use the Export Waveforms to Spreadsheet File function in a continuous acquisition configuration, linked below. I am using the Export Waveforms to Spreadsheet File function as opposed to the Write to Spreadsheet File function to write my data to a spreadsheet since this allows me to have data headers and a time column.

http://forums.ni.com/t5/LabVIEW/Write-Continuous-Analog-Strain-Inputs-to-Spreadsheet-with/td-p/3275408

 

Thank you,

 

Alberto M.

 

From VB to Labview

$
0
0

Hi:

 

I am trying to create a LabView VI ( I am using LabView 2010 we are up-grading next week to 2015 but I need to finish the VI in Labview 2010 )  to control a Keyence SR-752 barcode reader. I have been able to connect to the reader send commands for lights ON/OFF and take pictures and live view. I do have a problem is getting the decode barcode information. Below is the VB.NET section I am having problem with. I any could give me a helpping guide

 

 


how to generate pwm at Digital output using ni 9401

$
0
0

Hello,

   I am using cDAQ 9184 chassis and NI 9401 as a digital output module. I need to generate a PWM so that my output signal can vary from 0 to 5V (By varying  duty cycle of PWM). I did generate PWM using square wave present in the simulate signal block. But it provides an analog output. So, please suggest me some way to generate PWM at my digital output of NI9401 so that I can vary my output voltage.

 

Thank you

internet toolkit license

$
0
0

I have two development PCs. Both are running LV2013 and use the Internet Toolkit. One of them works fine the other has an error: Library that contains the VI or item is not properly licensed. Under details it explains

 

This VI or item belongs to a library that is expired or invalidly licensed. Activate the license of the library to edit or run the VIs and items the library owns. For more information on activating this VI or item's owning library, see the error message on this VI or item's library.

 

I have the VIs for the toolkit under source control so they aren't in the usual place however both PC are that way.

 

On the one with the errors I  downloaded and installed the ITK. No joy.

 

How do I get this properly licensed?

 

Norm

FPGA

$
0
0

Hello 

 

I am using Ni Flexrio...when I am compiling the VI on my FPGA target then I got xilinx compilation errors stating that the IO component has illegal IO standard value.

 

Please help 

formula node

$
0
0

 

1.png

float
x,y;
-2*x*a+a**2-2*b*y+b**2=(-2)*c*x+c**2-2*d*y+d**2;
-2*x*a+a**2-2*b*y+b**2=-2*e*x+e**2-2*f*y+f**2;

 

But the Operating results shows me there had an error : it miss semicolon,how should I do with that problem?

teststand in subpanel

$
0
0

Hello,

 

I want to open the full featured teststand interface in a subpanel.

Problem is that I get a message "Labview: This property is read only while the VI is in a subpanel" and after clicking OK teststand in the subpanel stops running.

 

I am using labview and teststand 2009.

DB query increases memory usage - Keeping the last value of the executed DB query

$
0
0

Hello everyone

 

I am developing an application which reads a parameter name as input and gives its description as output. The application is supposed to connect to a database (PostgreSQL) and search in a "reference table" with two columns: 1- description 2- parameter. By connecting to database and using "DB tools execute query", the parameter is found in the reference table and reads the corresponding description.

 

I have developed the database connection and the query task in a SubVI which can be seen in the attachment.

 

I would like to see the description (output) constantly. However, the only solution that I found was executing query continuously in every cycle which leads to occupation of memory and increase of memory usage. So, I put this memory consuming part of the codes in a case structure which gets triggered by a "change detector" button. The memory usage problem solved, but I see the description (output) for a short time before being disappeared and the corresponding string indicator gets empty.

 

I also tried to use "Shift Register", but since the output eventually is stored in an array, it becomes problematic by changing the array size. 

 

Now I am looking for a solution to be able to keep the result of the query execution available to solve this memory usage problem.

 

I would be grateful if you could help me. Smiley Happy

 

 

Best regards

Iman

 

PS: I am using LabVIEW 2012 SP1.

Sign recognition project

$
0
0

Hello guys!

 

As you can see in the title I have some questions about a project I am working on.

To get things started, I am studying Automation, Computers and Electronics, and, along with 2 colleagues, we have to build an autonomous mini-vehicle that can drive between two while lines on a track and recognise few traffic signs  (such as: Turn Left, Turn Right, Stop, etc) for our diploma exam.

Our coordonating teacher`s first idea was to buy the myRIO board, because he had some previous experience with some FPGA based systems such as compactRIO. So we bought it. After that, he wanted us to try to do some image processing using Fourier Transform to obain some sort of graphs (for example: the two white lines on the track would give us some waveforms and we could tell our vehicle to stay between them). But the problem is that we all are beginners in LabView programming so we didn't manage to do this thing.

After that, we wanted to try something else. We managed to find a Face Recognition project that used some templates (eyes, lips and nose) and we thought we could modify that one by adding our own templates (the traffic sings) but that didn`t quite work either. The program is not as precise as we would want it to be.

So, my questions are: Has someone managed to do this kind of thing ? And if so, what is the best way to do it ? 

 

Please keep in mind the fact that we are new to this LabView / Graphical programming and we are trying very hard to learn it.

I hope I gave you all the necessary details and I assure that every advice you give us will help A LOT.

 

Thank you very much !

 


Getting an existing Excel Reference

$
0
0

All,

 

I'd appreciate someome taking a look at my VI. What the VI does is looks for an existing reference of Excel and if it finds one, it will make that the workbook reference. If it does not find one, a dialog box will open asking the user to brouse to an Excel file. If it finds more than one, it will pull all of the workbooks into a simple listbox for the user to choose which one that they want to use.

 

This was kinda a quick and dirty little VI (which will be used as a subVI) but I need a second set of eyes to look at it and give me suggestions for improvement.

SMTP Email Palette - Subject text format

$
0
0

Using the SMTP Email palette, if I include a colon in the string wired to the Subject input of 'Set Message Text Html.vi', it shows up as a question mark in the email Subject in the recipient's inbox.

 

For example, sending "Test Completed at 10:00AM" as the email subject turns into "Test Completed at 10?00AM" on the receiving end.

 

How do I properly format the Subject string to get a colon on the receiving end?

How do I programmatically test all active channels in LabVIEW?

$
0
0

I have gotten as far as detecting connected modules and getting a list of all channels associated with the modules.  my problem is as follows, I want to be able to hook up wires to any channel and have labview do the following:

1)find all the modules. done.

2)find available channels on each module. done.

3) ping each channel to see if it has a value withing a range that tells me the wire is hooked up.  having trouble here.  I will describe below.

4) configure DAQmx based on the results.

 

many channels take multiple inputs. thermocouple, voltage, strain, RTD, resistance..........    i can get potential measurement types based on the module with property nodes.  when i go to create a channel in DAQmx, i cant just wire in a measurement type.  i have to choose what kind of measurement when i place "create channel" in the block diagram.  I might be able to get around it by making a case structure for every module or every measurement type, but if I do that, then i need a case for every module or measurement type made because that is the potential output of the property node.  i was hoping to modify the "create channel" vi to take a measurement type input, but no success.

 

long story short is that I am sure there is an easy solution, but I am missing it. 

I included what i have so far.  it's a bit of a mess as I was shotgunning ideas.

Remote VI Labview Web Server

$
0
0

Hello,

 

I would like to use Labview web server to access remotely to a VI running on a computer with Windows 7 and Labview 2010. I would like to be able to check the VI and to control it remotely.

 

In Tools/Option, I configured the web server as follow:

- Port HTTP: 80

- Browser access list *

- Visible VI *

 

In tools / Web publishing tools, I selected the VI and the Embedded mode with Request control when connection established. I entered a title name of the web page...

 

On the computer, where Labview is running, I have no problem to access the web page using either http://localhost/"VI name".html or http://"computer name"/"VI name".html using Internet explorer.

I do not see anything using Mozilla Firefox except the Title of the Web page.

It is said to download a plugin but which one?

 

On the remote computers, there are also problems:

- The first computer is running under MAC OSX and it is not working neither with Safari nor Firefox. Nothing is written on the web page.

- The second computer is running under Windows 7 and both trying with Firefox or Internet explorer I can see only the Title at the top of the web page.

 

It seems a problem of plugins...

 

Do you have any suggestions?

 

Regards,

Coralie

Problem with keyboard Shortcuts and editing

$
0
0

LV 2013, Win7

 

I'm an old hand at LabVIEW, but fairly new at using menus.

 

I have a window, where the user opens a file and edits it, and can save it.

 

What is actually edited is an array of clusters, each cluster contains several items. The user adjusts the array index and changes things around to suit.

 

There is an EDIT menu in the window, with the usual CUT COPY PASTE items in it.

 

The FILE menu has a SAVE item, with a Ctrl-S shortcut.


This pic shows the code attached to the MENU ACTIVATION? event, called when the user clicks on the menu bar, or hits a shortcut combo.

 

Note the WORKAROUND section:

 

Editing.PNG

 

 

The comment explains the point of the DUMMY - the problem is that LabVIEW (improperly, IMO) fails to terminate editing on a control before handling a shortcut key.  The value read is the old value before the START of editing.   Unless I force the focus somewhere else, then the file saved does not necessarily include the changes made to the field.

 

The above workaround works to solve that problem - but it introduces another.

 

I discovered that the EDIT menu will not work (neither mouse nor keyboard shortcuts).

 

The reason is simple: the edit menu works on the currently FOCUSED control, and since I'm changing the focus AWAY from the text control to a boolean DUMMY, the edit menu doesn't apply, so it gets disabled.

 

So, how do I get out of this?

 

Do I have to set all the fields to UPDATE VALUE WHILE TYPING, and lose the workaround?

 

Do I have to search for the focus, switch it to the dummy, then switch it back before saving?

 

 

Viewing all 68960 articles
Browse latest View live


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