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

Inverse Fourier Transform

$
0
0

Hi,

I have a basic doubt when using the IFT.vi

I'm analysing some data I do the FFT of some signals (accelerometers) and then I pick a particular peak and perform the IFT to obtain a time decay signal. I've tried both IFT Real and IFT Complex and they do produce different results but I'm not sure which one I should use. Anyone could clarify when to use one and the other?

Thanks!


Does "VISA Find Resource.vi" need administrative rights?

$
0
0

I developed an application with LabVIEW 2017 SP1 where I use "VISA Find Resource.vi".

One of my customers has problems when the user who runs the application has no administrative rights on the PC.

 

The OS is Win 7 x64 + SP1.

 

Does this vi require administrative rights to work

PID Potentiometer's Voltage Control

$
0
0

Hello dear Community,

I'm new to LabVIEW and I'm trying to implement a simple control and monitor algorithm using PID Advanced.vi. I'm using cRIO in Scan Interface mode (1mS scan period) with AI (NI 9205) and AO (NI 9265) modules.
My input signal is a square wave 0-1V, DC:50%, 10Hz - AI ch.0.
AO ch.0 connected to 500ohm potentiometer, AI ch.1 connected to potentiometer too.
The purpose is to get the same output signal upon the potentiometer as the input signal, while changing the resistance of the potentiometer (AI ch0 = ch1).
I've tuned the pid gains manually, the best I got is attached in scope screenshot (red - input, yellow - output). Oscillations increasing as potentiometer's resistance increases.

How can I improve my results? In the next phase I would like to get auto tuning of PID gains.

String Formating Date

$
0
0

I want to string format a timestamp to: fri, 4 may 2017 13:34:55 -0000
Well, that's really easy with the following instruction: %a, %d %B %Y %H:%M:%S -0000

 

But unfortunately I am using a Dutch OS and I get: vr, 4 mei 2017 13:34:55 -0000, which obviously is language specific. There are no language independent formatting codes listed in the manual. Doe anyone have a suggestion better than manually mapping these values?

Match Pattern not working as intended

$
0
0

Hello,

 

Simple thing I'm confused about. I'm using Match Pattern to try and find [ in the string "Time[s]" and it seems that it is not finding it. What's going on here? It can find every other character in the string but not [. 

DSM application does not open up on a different user of a PC

$
0
0

LabVIEW was installed on my PC and was working well. A new account for a new user on the PC was created. LabVIEW can still be accessed, however when I click on NI Distributed Manager 2016 in Program Files in the new user account, the application does not open up. However, I can see that it started but it doesnt pop up.

REM-11180 Bus Coupler help!

$
0
0

Hello everyone, this is my first post here!  I just got hired at my first company and I am using LabView to do some R&D for our brand new REM-11180.  I am new to the LabView environment and Bus Couplers in general.  Do any of you have advice on a simple LabView project I could write to test the functions of the REM-11180?  I am a little lost on where to start so any help would be very appreciated!  

Delay a PRBS signal.

$
0
0

Hello guys, I have the following problem, I want to generate a Pseudo random binary sequence(i'm using the MLS sequence waveform), however the period of my pulse is the same period of the loop of my VI,which is 200ms, and I want to make each pulse last a range of 8s. I can't increase the time of my loop, because I won't have a real-time view of my system (i have a VI to control a intrumentation plant). Does anyone know how to do something like that?
I'm using the USB-6009.
Ps.: I'm sorry, I'm new to LabVIEW
Ps 2.: Sorry for the bad English, I'm from Brazil.


Running average - that old chestnut!

$
0
0

Hi all. I have been searching the forum for examples of a boxcar average but can't find anything that suits.

Let's say I have a continuous stream of data coming in at the left and a wire to a waveform chart at the right. I haven't done a vi because it's that simple. I don't know how many data points there will be.

All I want is a black box to insert in the wire that will give me a running average of n points, probably around 5. I don't want the source or the indicator to be inside any loop.

Nearly all of the examples have either a number generator and display inside a loop, or a fixed length array of data points to work on. I just want the data stream coming in, averaged as it goes, and going out. I'm sure it can't be too difficult.

Thanks for any help.

Andy.

Create Database using LabVIEW

$
0
0

I need to create a database of list of 5-10 users containing the username, account number, mobile number, fingerprint. And verify whether the user is authorized or not based on the fingerprint.
How can I do this in LabVIEW or what steps should I follow to reach the output?
Suggestions Required!

Saving intensity plot with cursor using IMAQ

$
0
0

Hello,

 

I have an intensity plot image that I want to save with cursor (without losing image quality) and having some issues. Can anyone point me where I'm doing wrong? I tried using overlay function to redraw cursor line in IMAQ but the coordinate is not right and the image size becomes 3 times bigger.

 

Thanks in advance.

 

Capture.PNG

Serial Communication Problem

$
0
0

Hi,

I want to communicate with my device (a CARD) equipped with a serial port.

First i must Open a com with 300 Baud rate, send a command and verify the response.

Second: Sent a command

Third: Open a second com with a Baud rate 9600 in the same Port

Fourth: Use Visa READ, and i must read a chain of character that confirm that open session is OK.

The problem is I don’t receive any response when i use visa READ in the Fourth Step and Bytes at Port = 0.

The picture below:

Capture.PNG

Lectura de voltaje

LabVIEW: Memory is full error, using a gigE camera

$
0
0

Hi,

 

The LabVIEW Application I am working on uses a gigE camera to pull in an image. However, when I attempt to pull in an image I get the LabVIEW: Memory is full error. The application ran recently. I think what may be causing issues is that there was a power outage recently. I reset the camera settings to what they should be for the LabVIEW App to run successfully, but the program is still displaying the same error. I have confirmed that the camera is connected through the NI Max. Any help would be appreciated.

 

Thank you

Flatten Unflatten vs TypeCast - Speed Test

$
0
0

LV2013

 

As is my custom, I checked out two alternate ways of doing something, to see which was faster.

 

Objective: To convert a "Generic" U8 Enum to a "Specific" U8 Enum.

IOW, both are TYPEDEFed enums with 256 values.

One will remain generic, to be used in a generic transceiver method, the other will be specific, to be used in a specific application.

 

Directly connecting a generic control to a specific indicator will not work, as LV (properly) complains that they are not compatible.

 

Scheme 1 flattened the Enum into a string, then unflattened it as the specific type:

G2S Flatten.PNG

 

Scheme 2 does a typecast from general to specific:

G2S TypeCast.PNG

 

Both are in INLINE SUBROUTINE VIs, so call overhead should be ruled out.

 

My Timing mechanism is well tested, been used for 20 years.

 

I was surprised to find that the FLATTEN + UNFLATTEN scheme was faster.  Significantly.  (227 nSec vs. 393 nSec).

 

My question (strictly academically) is WHY?

 

My thought is that the TYPECAST simply reuses the space occupied by the incoming variable and re-declares it to be the new type. IOW, no time at all.

 

Whereas, the FLATTEN has to allocated space for a string, create a LENGTH word, then take the string and extract one byte and create a new variable.

 

Obviously I am mistaken, so WHY?  Is the optimizer really smart enough to figure out what I'm doing and bypass some of that?  If so, why not on the TYPECAST case?

 

The VIs are attached if you care to play with it.

 

 


programatically instancing SubVI inside of lvlibp

$
0
0

I have a project that utilizes a plugin architecture to load some VIs dynamically.  It does this through the use of a packed project library.

 

The plug-ins that get loaded are generated via VI scripting.  The plug-in makes a call to a SubVI.  I know how to create the SubVI through VI scripting by using the New VI Object node and wiring the path terminal to the VI I wish to instance...but now I need to make it point to the one that's inside the PPL, not the native one stored on the disk.

 

To be specific, the name of the VI is IP_wrapper and the name of the PPL is view_support_lib.lvlibp.  Picture opening up the block diagram...I can right-click and drop down IP_wrapper.vi, or I can right click and choose the lvlibp, then a new dialog opens up and I choose IP_wrapper from inside that PPL.  If I then hovered the mouse over each of these, one would show up as IP_wrapper.vi, the other would show up as view_support_lib.lvlibp:IP_wrapper.vi.

 

I know how to add IP_wrapper.vi to a block diagram via VI scripting, but what I am asking is, how do I add view_support_lib.lvlibp:IP_wrapper to a block diagram via VI scripting?

Agilent 34980A MUX 4 wire measurement

$
0
0

I'm trying to do a 4 wire resistance measurement on a single channel (3034) but the values are very different every time I run the code. Can't figure out what I'm doing wrong.

Capture.JPG

 

 

Access the timestamp value of an EPICS variable

$
0
0

We use EPICS clients/servers on cRIO platforms.  I would like to access the timestamp of when the EPICS variable was updated.  The timestamp is visible in the Distributed System Manager and we can access it from other consoles outside of the LV environment.  Getting the timestamp outside of LV is an "option" when reading the VAL or other fields.

Any suggestions? 

Strange LVOOP / Notifier problem

$
0
0

I have cluster with 4 elements - objects (first three class 2DO2DI2AL, the last one class DIAL). APPINIT loop creates NOTIFIER for every object in cluster and stores notifiers references inside objects private data. MAIN loop periodically change some data inside all objects and send values via Notifier. GUI loop gets data from notifiers and displays them.

MAIN loop behaves correctly. However GUI loop shows bad data.

I went through the code again and again and I'm not able to find whats wrong.... :-( 

 

Keep in mind that forking of cluster wire is only for getting Notifiers refs into GUI loop (no data of objects !!!). Data transfer via notifiers.

 

Thanks for any help...

How to use more than two condition in if statement inside the formula node?

$
0
0

I know how to use the if and if else in the formula node, but is there any way that I can check multiple cases inside if statement?

for instance: How to write the following syntax in the formula node?

if (u1==1) && (u2==1) && (u3==1) && (u4==1) 

 

Ameer

Viewing all 69758 articles
Browse latest View live


Latest Images

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