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

Menu déroulant pour sélectionner des fichier texte et lire leurs informations depuis un dossier sur le bureau du pc

$
0
0

Bonjour,

J'essaye actuellement de développer un programme LabVIEW, qui permettrait de sélectionner ( à l'aide d'un menu déroulant ) un fichier texte qui serait dans un dossier avec plusieurs autres fichiers texte, et, de récupérer les coefficient que j'aurais au préalable inscrit sur ces fichiers texte pour pouvoir les utiliser par exemple dans une boite de calcul.

 

Merci d'avance pour toutes les personnes qui me fournirons leurs aide,

 

Cordialement Nathan.

 


Built .exe file missing ctl files

$
0
0

Hello

I have run into a strange problem. I am building a exe file to run my application on a non development machine. It builds and i can start it on my development machine without any problems.

 

When moving it onto another machine, it searches for two ctl files and doesnt find them. The strange thing is that if i just click cancel when asked to find the files, the application starts and runs without any problem. Even if i build the application with the files specifically included and when asked for the files being suggested the very folder where the files are clearly present the application just wont recognize them. But it still starts and works.

 

I am not sure what to do with this, i have tried what i think is most variations of including the files in the build. My client would rather not have to wait for the search and click cancel every time the application is started. If i was missing some drivers on the other machine it shouldnt have started.

 

Its Labview 2016. The controls are type defs, one cluster and one enum. They are used with shared variables (single process) if that makes any difference.

 

Anyone have any idea or suggestion?

 

Best Regards,

Nimgaard

Menu déroulant pour sélectionner des fichier texte et lire leurs informations depuis un dossier sur le bureau du pc

Parallel Case Statement Priorities

$
0
0

Lets say I have 2 case statements inside of a while loop. Is there a way to make one of the case statements a higher priority? For example, both statements A and B (see pic below) modify the same data. Statement B will run more often, but I want it so that if statement A is triggered to execute then it will execute immediately and pull out of statement B even if it hasn't finished. Currently, I'm running into an issue where statement A is triggered to execute but it doesn't always execute because the program is currently in statement B. Thanks!

 

LabVIEW.PNG

Acquisition deux AI tensions NI DAQmx USB 6003

$
0
0

Bonjour à tous,

 

Je suis actuellement confronté à un problème, je souhaite lire en simultané deux entrées analogiques sur mon boitier d'acquisition configurées en tension. J'ai trouvé des topics similaires mais ne répondant pas à ma problématique.

 

Ma première voie lit un signal de commande entre 2 et 12V (j'ai créé au préalable une échelle personnalisée pour pouvoir décaler mes niveaux de tension). C'est un signal PWM à une fréquence de 1kHz, je souhaitais faire une acquisition de 100 points à une fréquence de 100kHz mais je suis limité à 50kHz lorsque je lis une seconde voie analogique.

 

Ma seconde voie est un signal sinusoïdale -1V / 1V qui est le reflet d'un sinus 230V. Je n'ai pas besoin d'autant de point que pour le précédent, je souhaiterai réaliser une acquisition de 10 points à une fréquence de 1kHz

 

received_10214887309200003.jpeg

Vous pouvez voir les deux courbes sur l'image ci-dessus.

Mon champ PWM d'une fréquence de 1kHz à dans un premier temps une tension max de 9V. A la suite d'une commande, cette tension max chute à 6V. Mon système détecte ce changement d'état et ferme un contacteur générer un sinus 230V.

 

Pour réaliser cette tâche, je procède ainsi:

Capture.PNG

- J'initialise mes variables

- Je configure la taille de mon buffer; je démarre un chronomètre qui calcule le temps écoulé; et je pilote une sortie numérique pour faire varier mon champ PWM

- Je fais une acquisition de mon entrée analogique "PWM droit" pendant 10sec et j'insère les éléments dans un tableau; puis je pilote à nouveau ma sortie numérique pour faire varier mon PWM

 

Ce processus fonctionne pour une voie "PWM droit", je souhaite alors intégrer ma voie "L1 droit". Avez-vous une idée de comment je pourrai faire ? 

Mon objectif est de comparer en fonction des valeurs de mes deux tableaux le temps écoulé entre deux instants (PWM droit = 6V et L1 droit différent de 0)

 

Merci par avance et j'espère avoir été suffisamment précis dans mes explications

 

Gabriel Leroy 

Acquisition deux AI tensions NI DAQmx USB 6003

synchronising CTR or DIO lines

$
0
0

 

Hello dear community,

 

I would like to implement the following (s. attached pdf).

I have implemented the digital pattern on CTR0 with a retriggerable CO Task configured to acquire finite samples (s. Attachement). I am trying to implement CTR1 by using the same vi (triggered with CTR0) but i am encountering the problem, that retriggering occurs too quickly creating more than just the desired one pulse. CTR2, CTR3 should also have CTR0 as a start trigger.

With other words: CTR0..CTR4 should run synchronously.

 

Ideas are welcome !

 

P.S.

Please pardon that I already posted this text  in an older thread that I had started a while ago. Since the subject has shifted a bit in regard to that thread I decided to post a new topic.

Calculate table average grouped by another field

$
0
0

Hi - 

 

I am hoping to understand a simple way to calculate grouped summary stats from a table.  I'd like to calculate mean, standard deviation, and a number of quantiles (1%,2%, 5%, etc.) from a table.  I'd like these results to be grouped by other fields in the table.  I am providing a very simple example, but would like to be able to perform this calculation in an efficient way so that it works well for more complicated data sets.  My data sets have many grouped by terms and are not sorted by the grouping parameters.

 

In the example below, I'm showing how to calculate average values grouped by name.  I know I could sort them by name and look for changes in this parameter, then use those indeces to create subarrays and calculate averages from there.  I would prefer to use a function designed for this purpose like those available in SQL (minus the quantiles), JMP, and matlab.

 

Maybe the answer is use the mathscript function, but I've had issues with those mathscript windows being buggy in the past.

 

Is there a clean labview function which can perform these calculations?

 

Thanks,

Jennifer

 

NameValueAvg
John0.5374560.577731
John0.91844 
John0.279187 
John0.758893 
John0.394678 
Mary0.0073130.486202
Mary0.935343 
Mary0.432797 
Mary0.569353 

Resource not found: NI_MAPro.lvlib, NI_AAL_Sigproc.lvlib

$
0
0

Receiving error messages when trying to run the compiled version of a VI on a non developent target machine.

 

Configuration:

  • LV run time 2016 x64
  • LV development 2016 x64
  • lv visa drivers 2017

development machine also has labview run time, and development for 2015, including the sound and vibration toolkits.

 

 

How do I get rid of the error? 

Is there a way to force the compiler to use the lvlib that I need? 

Is there a way to identify which .dll the functions are using?

 

Executable runs fine on the development machine, however generates errors on non development machine at execution with regards to the lvanlys.dll and the associated NI_MAPro.lvlib and NI_AAL_Sigproc.lvlib libraries.

 

Other previous user posts 1, 2 have mentioned that this can be caused by the wrong version of lvanlys.dll getting incorporated into the build or installer.  I have tried both lvanlys.dll ver 16.0 and 17.0 without success.

 

I also tried to force the compiler to "always include" the NI_mapro.lvlib and NI_AAL_sigproc.lvlib libraries, but National Instruments released them in a locked state and prohibits the compiler from compiling them in this locked state.

 

Attached are the zip files that contain the executable, the vi code and the error message screen shots.

 

 

Fixed-point conversions for temperature and pressure

$
0
0

Hello all.  I am using a cRIO 9104 with a 9014 RT controller.  I am using C-Series modules 9401, 9221, and 9211 to read gas flow rate, gas pressure, and some temperatures.  I am using a Pulsometer and Differential Pressure Meter with the 9401 and 9221.

 

My code to read all three modules is in my FPGA, which means the values are coming out as Fixed-Point, and they are all wrong.  How do I convert these values to temperatures, voltages, and pressures?

 

As an example, the Differential Pressure Meter has a digital display and shows a pressure of about 12.23, but my Labview indicator is showing about 8.27. 

 

The temperature measurements are really off.  I know the temperatures should be at least 70°F, but Labview is showing -0.000013 or so.

 

The 9401 which works with the Pulsometer doesn't display anything at all (value of 0).  I used a counter loop that was mentioned in the Labview FPGA online course, but even that did not help.

 

Is there just arithmetic involved to do the conversions, or is there something else that needs to be done?

 

As a notice, we have this same type of program using a cDAQ-9188, and it works fine.  Of course, we are not dealing with Fixed-Point types and we are using DAQmx functions instead of the FPGA.  We want to use cRIO for reliability, as we want to avoid dealing with General Purpose PCs crashing right in the middle of the testing we do.

 

Please see the attached snippet

Stream multiple waveforms

Get Recently Modified Files

$
0
0

I need to create a list of recently modified files from a given folder on local net.  The folder contains thousands of files in hundreds subfolders.

The conventional method (attached) take way too long.  ~40 secs in office, > 5 min at home (with VPN).

I can do better with command prompt.  ~20 secs in office

Window Explorer (manually) can do it in ~5 sec  in office,  < 20 sec at home.

 

Anyone got a better solution ?

 

snippets.png

 

 

labview

$
0
0
Hi, i have to do a project that takes a 2D image (for example of a mauntain) and makes it 3D as a hightmap. Then i need to take from that highmap two random points and get the difference between them as a lenght. There are two main problems. First have less then basic knowlage in labview and secound - the project must be done till this friday (29.09.2017) If some one has done a project like that or at least has some clue, how to do it... that wouId be great. I have fount a forum post about, how to make a 2D image into a 3D, but no idea, how to modify it so, that i mesure two random points.

 

PXIe-7846 Target in LabVIEW FPGA

$
0
0

We currently have a LabVIEW FPGA project using a cRIO-9081 with multiple NI-9201 and NI-9485 modules.  We are starting a new project using a PXIe-1082 and PXIe-7846 Multifunctional Reconfigurable I/O Module.  I wanted to start developing the code before the hardware is purchase.  However, I don't see the PXIe-7846 in the "Add Targets and Devices on Networked Computer/Device" tab.  There is a USB-7846R and USB-7846R OEM.

 

I am missing a Driver?  How do I add the PXIe-7846 to the LabVIEW project.

 

Paul

 

 

Trouble with Labview version creating a Stand-Alone application for Raspberry

$
0
0

Hello,

The equipments I'm using have the following specifications:

Computer:

-Desktop PC with Windows 7 64-bit

- Labview 2015 (32-bit) with Vision Acquisition

- Labview 2014 (32-bit) with Vision Acquisition

- LabVIEW 2014 Real Time Module

- LINX 3.0

 

Raspberry:

-Pi 3 Model B

- OS: 2017-04-10-raspbian-jessie

 

 

 

I am currently running a VI on my computer that acquires both Image and a Spectrogram and it's called "Image and Data.vi", this VI was created using Labview 2015, and has some specific Vision resources for the 2015 version on one of its SubVI's.

What I want to do is build this VI as a Stand Alone Application on my Raspberry so it doesn't need to be connected to my computer all the time.

I know that in order to connect the Labview to the Raspberry I must use the 2014 version, so I saved my VI using the command "Save for Previous Version" in which I chose the following options:

- Labview Version 14.0

- Toolkit Version LV 2012

- Picture Control v2

Now a folder has been created for the "Previous Version VI", and I add it to my Raspberry on a project as follows: 

(I don't know what is the difference between the 2 options of Add Folder Snapshot and Auto-populate, in this case I used Snapshot)

 image.png

 

I can see these folders include all the VI's involved in "Image and Data.vi" and also some files for the driver of my Spectrophotometer (Ocean Optics s2000+).

 

Now when I try to execute the "Image and Data.vi" (in this case "Image and Data alt.vi") it does not find the files related to Vision, that is "IMAQdx.ctl", "IMAQdx Snap2.vi", "IMAQ Rotate.vi", "IMAQdx Open Camera.vi", "IMAQdx Close Camera.vi" and etc.

If I try to select these files manually it shows this message:

image.png 

 

So I wonder, is there a way I can make Vision Acquisition work on my 2014 version of the vi?

The Vision Resource I use that is specific of the 2015 version is the "IMAQ Rotate", is there some way of transforming it to a 2014 version?

Please help me ! (:

 

Thanks in advance,

Oscar


[Best Practices] Closing vs. Hiding front panel

$
0
0

Hi there, I just wanted to point out and gain some more clarity on closing vs. hiding a front panel. For those who don't know, you can hide a front panel using the method FP.Open -> Hidden. You can close a front panel using the method FP.Close. To the user, both of these look the exact same, but there are certain cases where the behavior is different.

 

VI Running: VI stays running when hidden. VI stays running when closed if other VIs are open, but stops if no other VIs open.

Subpanels: A closed front panel can be inserted into a sub-panel, a hidden front panel cannot.

 

For a while I would use only the FP.Open with Standard or Hidden as the argument to show and hide a front panel, which avoids the case where all front panels might be closed accidentally, stopping the code when you don't want it to. Then, when I stop the code I check if the front panel is hidden and if so I close it so we aren't left with a hidden panel. Recently, I wanted to use sub-panels for a pop-in and pop-out type of UI, which requires actually closing the front panel so I can insert it into the sub-panel.

 

Attached is a project showing some of the behavior I mentioned. If you run Main.vi you can open, hide, and close the SubVI, while keeping both VIs running. If you press "Close Both FP", both front panels are closed and the code stops executing, even though the loops are not stopped. You can re-open Main.vi through the project explorer to see that it isn't running.

 

So this is kind of an open ended question. I just wanted to share what I have learned so far, and see how others prefer to show or hide front panels from the user, and any other use cases you've found where hiding and closing a front panel are different.

 

configure call library function

$
0
0

I copied a vi to a new computer.  On the new computer I use 64bit labview, but the vi library is missing because the old one use 32bit. I do have a 64bit library. The question is how I can reconfigure all the call library function  at one time instead of configure each sub vi. Each sub vi uses the same .dll file.

Calculate quantile for an array?

need to take 4 battery voltage reading

$
0
0

Hi.....I need to take 4 battery voltage reading from Labview and I'm using DAQ Model- (SCB-68). 

 

Here is the code one guy did previously. Can you please check it and let me know is it correct or not? It will be better if you have anymore easy code for this. 

 

Please...I badly needed your help. Thanks in advance.

Acquiring signals at different rates

$
0
0

Hi.
I am trying to acquire 2 differents signals using the same hardware (USB-6212).
The issue is that I have to do it at different rates to each channel, but all the examples that I've found about it use only one sample clock hence use the same sample rating for both channels, just like in the image that i attached.

 

Is there any way to make those two channels in parallel, at different rates? Should I use Master/Slave or any other desing pattern?

Further, how do I calculate the delay of the  acquisition time between those channels?

 

Viewing all 67383 articles
Browse latest View live


Latest Images

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