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

2 Levels Object Dictionary LUT (Look Up Table) [Code Exchange]

$
0
0

Hi,

I recently implemented a 2 Level Object Dictionary for LabVIEW and will share the code (screenshots only) as none is available online.

 

Screenshots:

Object Dictionary 2 Levels Add Entry to Existing L1 and Existing L2

Object Dictionary 2 Levels Add Entry to Existing L1 and Non-Existing L2

Object Dictionary 2 Levels Add Entry to Non-Existing L1 and Non-Existing L2

Object Dictionary 2 Levels Create OD (Example of implementation)

 

Object Dictionary 2 Levels Add Entry to Existing L1 and Existing L2.pngObject Dictionary 2 Levels Add Entry to Existing L1 and Non-Existing L2.pngObject Dictionary 2 Levels Add Entry to Non-Existing L1 and Non-Existing L2.pngObject Dictionary 2 Levels Create OD.png


Developing for PXIe controller - question

$
0
0

Hello,

 

I'm new to PXI and I had a question about developing LabVIEW code for a target chassis controller.  Say I purchase a controller with embedded operating system (example, PXIe-8840).  When developing an application on my PC (laptop), what is the normal process to debug module control VIs?  Do I need to compile an EXE and deploy to the controller?  Install LabVIEW development environment on the controller OS and test there in development mode?  Or can I interface with the chassis modules directly from my PC via some TCP link to the chassis controller?

For reference, using LabVIEW 2016 and plan to utilize test and measurement modules (digital I/O, SMU, o-scope, etc.)

write excel file

$
0
0

Hi friends, 

 

I am trying to save the level information of 4 tanks in a excel file. I need the first row contains the headers: Time-T1-T2-T3-T4-T5 and then all the data. How could be the easy way to do that with NO VI's. I have tryed but i had some problems. I am new in LabVIEW.

 

Thanks.

Create multiple cursors with different spacing on XY graph

$
0
0

Hello,

I'm trying to create 4 cursors each with different spacing. I came up with this idea (refer to the attachment), but when I executed, the program just bypassed the for loop. Nothing got computed. Can someone take a look at it and give me some hints? 

 

Thank you in advance!

MV

myRio Joystick

$
0
0

I have used a Joystick successfully on a myRio but for a different application I am trying one not on the approved list of joysticks (which is only 3). It recognises the joystick as the FGT Rumble3 in 1 ok but the data it gives out is rubbish. Using the test program the LEDs just give a quick flash when I press a button and the X axis data only goes up to about 200 and resets itself back to zero again and again as I change the direction.

This is in contrast to when I run a similar program on LabView itself on the PC - it works perfectly then. I realise that these are differing platforms but is there a way to get the myRio version working?

Bluetooth woes...

$
0
0

I am using a Classic Bluetooth module like this linked to a Arduino to send back some characters when the connected host sends a request like <send> . 

 

The snippet below works fine with standalone modules like HC05 . But does not even link with the SMT versions. Do the SMT versions need additional level translators or something like that ? I am powering them with 3.3V. 

Bluetooth_with_Arduino.png

 

Example 

 

Example of Standalone module :HC05 Standalone.PNG

 

 

 

 

 

 

 

 

Example of SMT boardHC05 SMT board.PNG

 

 

Adjusting the frequency of a square wave generated by CTR0_OUT of NI-Elvis II.

$
0
0

Hi everyone,

 

I've been asked to modify the frequency of a square wave generated using DAQ assistant whose output is wired to pin A0 of the NI-Elvis II board. The A0 pin is connected to the CTR0_OUT and the DAQ assistant is set to generate signals based on this counter output. The task says to modify the frequency of a 10 ms pulse train by wiring a numeric control to the input of the wait(ms) function. 

 

I start by configuring my DAQ assistant as shown below:

 

Screenshot (78).jpg

And so I generate a square wave with a frequency of 50Hz (1/20ms) in the instrument launcher oscilloscope. This is simply done by having the DAQ assistant running in a while loop terminated with a stop button. Only now I don't know how to change the frequency of the pulse train with code  simply using the wait (ms) function.I figured I must increase the width of the idle time by introducing a sizeable delay which I have tried. 

At first I researched the wait(ms) function and found out that any code that it runs in parallel with will execute if it takes longer to execute than the delay value. If the DAQ assistant writes 100 samples at a rate of 1kHz that would mean a time between samples of 100 ms. I then figured that I would need to introduce a delay encompassing 100 samples which take 100 ms each (10,000 ms) As shown:

 

Screenshot (79).png

This is the best I was able to understand how the software might be working with the hardware. I thought I'd increase the delay to start the sampling of the signal from CTR0_OUT in increments of 10000 ms so to increase the idle time and hence increase or reduce the frequency of a pulse train with a duty cycle of 10ms. 

This doesn't work and I still get a 50Hz square wave. If somebody could shed some light on this for me I'd greatly appreciate it, I have been researching this stuff for hours and can't seem to wrap my head around it. I now believe that a sample refers to both a high and a low pulse and not some arbitrary sample value on the period of the square wave at increasing increments in time but I still can't modify my signal in labview code.

 

Thanks,

Simon.

IQ Rate on MIMO OFDM using NI-USRP 2920

$
0
0

I have this error
"niUSRP Write Tx Data (2D CDB).vi<ERR>Underflow: the Tx buffer was emptied before new data was provided.  Consider reducing the IQ rate, increasing the Write rate, or increasing the number of samples per Write."
What is the solution for this error? 
After I add some script in mathscript, the programm has error.
Is there any relation with the addition of script on mathcript?

Nihayatus

 


Deadpool Part 2 cast Euseioseufacebook

saving multiple images (AVI frames) in the same folder

$
0
0

hello,

I am trying to write a VI, in which I want to save multiple pictures (frames I've extracted from an AVI file) in PNG format in a folder. I have managed to save one frame, but I don't really know how to do that for multiple frames. I know I need to do a "for loop" for getting frames and I need to do a "for loop" for changing the name of an image while saving in a folder, but how do I run a "for loop" on a name of a saved image?   

my VI is included.

thank you!

How to get virtual TED file for a sensor?

$
0
0

Hi All,

 

I am trying to use a full-bridge load cell MLP-50. The manufacturer says that it is teds rated but doesn't have a file. How to either create or find teds file for a specific load cell?

 

Thanks in Advance,

VckdVj

custom x-axis labels in xy graph.

$
0
0

Hello,

I am running a test in which the value of RPM first goes up linearly and them comes down linearly and i want to plot the values obtained as output for each RPM. But since i want to plot this in xy graph as the RPM starts decreasing the graph starts moving backwards, to overcome this i kept on plotting the data where the RPM values appear to go beyond the limit but they are actually decreasing, so that the test is running backwards. Is there a way so that the x-y graph x axis shows the real values of RPM. I am attaching a figure where the test first runs forward and then backwards and both are plotted on the same graph. 

 

Thanks

Limit graph cursor movement

$
0
0

Hi, I was wondering if there is any way to set limits on cursor movement. I am using two cursors for setting the lower and upper limits of which data to save out of an array. Presently in my event structure on cursor move, I just compare the positions explicitly and if it is out of range I reset it to the position of the other cursor +- a little offset.

 

This still allows the cursors to move past each other, until the event loop gets around to pushing them back into place. I was wondering is there a better way to handle their limits?

LabVIEW scripting: highlight VI in project tree

$
0
0

Dear LabVIEW community,

let me ask you about the following.

 

How to programatically highlight VI in project tree? For library and class there is method "Hilite in Project Window" (wondering, why it is not "Highlight", but "Hilite"). But how to do the same for simple VI?


I've checked forum, different shortcut menu plugins, but couldn't find such implementation. The only what is close to it, is Delacor's functions, when after adding new user event, main method is highlighted in the project tree - but source code VIs are closed, anyway.

 

Could anyone help with it, please?

 

Thanks a lot in advance,

 

Sincerely, kosist90.

NXG WEB Module Graph Time Stamp error

$
0
0

Hello! I'm trying to display a graph that consists of two arrays - time and data. The time is in Unixtime format. But there is a problem: time is not correctly converted on the X axis. In normal NXG2018-05-17_14-17-55.png2018-05-17_14-18-45.png ev2018-05-17_14-18-45.pngerything is fine and the time functions are converted correctly ... need help !!!


win32com method to GET control's value

$
0
0

Hello,

 

I'm familiar with the procedure of how to set a control value in LabView with win32com.

import win32com.client

labview = win32com.client.Dispatch("LabView.Application")
VI = labview.getvireference(r'c:\Users\path\to\my\vi\something.vi')
VI.setcontrolValue('setx','0')

 But how do I read out that value?

Flow meter - configuration.

$
0
0

Hi ALL,

 

I am trying to read flow from Flow Meter (specification attached). K-factor = 24 Imp/l. = 0.0417 l/imp. So, I count edges inside the loop (time = 1000 ms) then multiply by 60 then multiply by 0.0417= l/min.

 

I have also attached modified example VI for my needs.

 

I don't know why I am reading flow 50 l higher then I am having on digital flow indicator.

 

Did anyone have the same issue?

 

Thanks,

gregorian7

 

Iterative reading from spreadsheet

$
0
0

I have not been given the details yet, but have been asked to write a SCADA system in Labview with a capability I have never thought of before- they want the ability to load the created data files and re-create process runs.

 

I will be making a 1 Hz sampling system for them, but am not sure as to how many channels or run duration to get file size estimates.  I have included the basic idea I have for making an "instant replay" VI, but am not sure if there are better ways to handle the data in terms of memory optimization.  At what sized file should I become concerned?  Is there a better way?  Thank you!

Scanned variable read function - all channels

$
0
0

Does anybody know a way to read all channels of a c-series module with one function? The below archived white paper shows all channels on a module can be read with the scanned variable read function, but when i do this, i get the attached error. I'd prefer one function icon that outputs an array instead of, for example, dragging and dropping 32 I/O shared variables then wiring these to a build array function.

 

http://www.ni.com/white-paper/8071/en/

 

Thanks guys!

Exponential Curve fit

$
0
0

Hi,

 

I am trying curve Fitting in Labview. The equation which I am using is y=a*exp(b^x).

I have only two co-ordinates and while using exponential fit.vi it fits d curve same as a linear fit.

Any help would be greatly appreciated.

 

Please find the attached vi and expected graph below

 

Thanks in advance

 

Viewing all 66814 articles
Browse latest View live


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