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

Get data type of dynamically loaded control file (.ctl) at runtime

$
0
0

If I open a control file (.ctl) that is a striclty type VI reference using the Open VI Reference function, how can I get the data type as a variant or similar during runtime showing the connector signature?

 

The front panel control only returns a raw refnum value not the data type.

 

E.g. for this type def control, I would like to get this information:

LabVIEW_2018-10-17_12-34-59.png

LabVIEW_2018-10-17_12-36-31.png


Resize front panel

$
0
0

Hello,

 

I have a small question regarding resizing of front panels. So I would like to somehow copy the excel behavior for one of my VIs, so the different sub-panels should resize themselves automaticaly when the VI is resized by the user.

 

My first approach was to use the "Scale object with pane" and "fit control to pane" functions. The problem here is that this function only reacts on the "mouse-up" event, so while the user resizes the window he sees a boring background. And this does not really look professional.

 

Then I tried to use the "Panel Resize" event in my event loop. This looks a bit better, but the rate these events are fired is just not high enough. When I resize the window a bit faster I still have the behavior from above (so I see the background of the VI). Unfortunatly there seems to be no way to increase the update rate for this event.

 

Another idea I had was to catch the mouse movement events. But then I realized I can only catch them when the mouse is over one of my sub-panels, and the border of the VI does not belong to one (sounds logical). Unfortunatly there is no "mouse-move" event for the complete VI.

 

So has anyone else an idea what I still could try. Because I am now out of ideas.

 

Thx and Greetings Dennis

Getting an extra dimension when unbundling array of clusters

$
0
0

Hello,
I am trying to export some data using the write to spreadsheet function. I get the spectra from a CCD camera using a VI I found in this post. That VI works perfectly, I can get the wavelength vs intensity plots on the front panel. The problem is, that the data comes in the form of "1D array of cluster of 2 elements" so I unbundle the clusters to get a 2D array which I could save as a spreadsheet but somehow I end up getting a 3D array. I have tried saving the 3D array into a text file as is and it only shows me the wavelengths and respective intensities. I reckon I might have caused lab view to just add an empty row as a 3rd dimension. I would highly appreciate it if you could help me turn this into a 2D array that I can export normally. I added the VI in question and some pictures.

problem.PNGit says that array is 3dsort of working.PNGthis is good that's how it should lookwriting raw data.PNGwrote the 3d array to a text filetext file.PNGthis is the text file (I basically wanted to have this but without that (0,0,0) and with x and y in columns instead of rows. Is there another way to do that)

Start DAQ acquisition or reading on TTL rising front

$
0
0

Good morning everyone,

What I have is a camera, an optical chopper, a NI DAQ 6221 and several other hardware elements.

The chopper is such to output a TTL signal (On and Off signal) thanks to a photodiode in front of it

The setup is such that the chopper is right after a beam splitter, so that the TTL signal actually tells me if I am acquiring the transmitted or reflected beam out of the BS, since the camera is triggered with a signal that doubles the chopper frequency.

What I want to do is to acquire the first frame always with the same beam (no matter which one of the two, but the same at any measurement).

In the attachments please find what I have done up to now, the software may look a little clumsy I know, but I am not a good Labview programmer.

At the moment I am sampling the TTL, notifying a change in its state for Ctr0 (2*fchopper signal), Ctr1 delays what is in Ctr1 and triggers the camera with trigger task.

Thank you for your time and kindness

how to program Bias function

$
0
0

Dear all,

 

i try to programm a bias function for my force/torque sensor, but my bias funktion doen't work in a good way. Is there some how get why?

I try to read in the first data an make offest with them as a array function. Is that wrong ?

 

Best Melina

New labview install - Cant build installer

$
0
0

Hi all,

 

I have several years experience in writing labview programs and deploying them to non-development machines, however I have never had to actually install the labview development software and I am running into an issue.

 

My program works fine on my development system. The problem I am having comes when I try to build the installer in LV 2018. When I try to build the installer, labview cant find DAQmx (see attached picture). I have installed the latest daqmx drivers so I'm not sure why I am getting this error.

 

If it matters, my program is reading data from a NI-GPIB-USB-HS with a visa read.

 

Adding to array of clusters and displaying them all in a XY graph

$
0
0

Hi there,

 

I've ran into an issue when trying to add another array to a cluster of arrays. Wondering if anyone has any pointers.

The program takes all the readings from the spreadsheet file and is meant to graph them all with different colours to differentiate which piece of data it is. I got it working when all the lines are the same colour but when trying to split each set of data into its own array it now only displays them one by one and saves none of them.

I have attached the VI and spreadsheet.

 

Excuse the mess of wires I'm pretty new to all this LabVIEW stuff, and the end condition is just a placeholder for the time being

Proportional Valve using DAQ

$
0
0

Hello, 

 

I have successfully managed to connect the Festo vppm proportional regulator valve(0-10V analog output) with the help of NI-DAQ card and LabView. My next task is to make a fluidic muscle,which is connected to the valve, perform oscillations(like tremor). To be more clear, I generate a pulse signal and by modifying its frequency and amplitude(in my case amplitude translates to voltage of the valve) I turn on and off the valve in any frequency and pressure (voltage-->bars or psi). I want to achieve frequencies up to 20Hz. But it doesn't seem very possible. 

I would like to know if it is possible by changing something on my program I can achieve grater frequencies or It only depends on the valve I am using.

 

Thank your for your time


Losing data along wire when not in Highlight Execution

$
0
0

I'm currently writing code to control some hardware. I have an FGV that I set up to pass the DAQ/VISA information throughout the main program. When I run the code in Highlight Execution mode, it works as intended. When I run it normally, data is somehow lost along a wire, as shown below with probes. How can I fix this?Losing Data.png

problem splitting a string to array elements

$
0
0

Hello, I'm working on a small LabVIEW project and I searched the web to divide a string into an array, the problem is not the string, I can change the delimiters at will, but when I want to see the contents of the array with an indicator always give a zeros....

 

As you can see in probe the spreadsheet string to array is 0.Captura.PNG

 Arduino program.png

 

Thanks!

 

Package Manager stalls when installing JKI State Machine

$
0
0

I am trying to install the JKI State Machine through the VI package manager. I have done this successfully on my PXI machines running Windows7. However, I am trying to do the same on my new PC running Windows10. In this setup, I am forced to download and install LabVIEW NXG with my JKI State Machine request. When it begins installing it starts with NXG but seems to freeze at the step of installing content files (as shown in the attached picture).

Any advice on how to get around this and not be forced to install NXG?

 

Thanks,

Steve

LabVIEW Developer Needed!

adxl345 output voltage

$
0
0

Hello, 

 

I have programmed the adxl345 with labview and linx via I2C protocol and I have the following question.

The output from the accelerometer is given in voltage if I am not mistaken. In order to convert it to m/s^2 I have to multiply it by 16*g where g=9.81 m/s^2 (suppose of course I have 16g resolution)?

 

thank you in advance

Relative path problem

$
0
0

Dear LabViewers,

 

I made a project which plays sound from a wav file. I inserted the file using a path.

I need to send the project to my programming teacher, but the path which works on my computer naturally does not work on his computer.

How can I solve this problem?

Thanks already!

 

Flip

Responding to prompts from python script with labview

$
0
0

Hi,

I am trying to communicate with the python script through Labview. Basically, the Python scripts prompts to enter some text, for example name in this sample script. I am using a sample vi i found through white papers. I am not sure how to modify to reply back to the prompt from the python script. 

I have attached the sample vi and the sample script. Any help would be appreciated. I am new to Python with Labview and I am using Labview 2014.


Thanks

manny


Parallel APT Stepper Motor control

$
0
0

Hello all. I am coming across some issues in running two stepper motors in parallel instead of moving in series as they currently are. I am using Thorlabs APT drivers to position both stepper motors to a specific location, but regardless of what I attempt I cannot make them both run at the same time. I am also fairly new to LabVIEW and parallelism so forgive me if the solution is minor. Attached is an image of the current set-up.

NI 9237 module - scale data from FPGA

$
0
0

Dear LabVIEW community,

 

let me, please, ask you a rookie question.

 

I've got measurement of Full Bridge transducer, using NI 9237 with cRIO. NI 9237 measurement is implemented on FPGA side, so on real-time part I receive data, and send it to host.

Transducer sensitivity is 2 mV/V, excitation voltage is 5 V, range 0... 10kN.

 

1. Does NI 9237 module really returns values in mV/V? I've found this info on the forum, but when I check examples, it seems, that it returns V/V. Where is the truth, please?

9237.png

2. Is excitation voltage somehow influence on data scaling? Currently, I understand sensitivity 2 mV/V in a way, that each change of 2 mV/V means change of force on 1 N. So, if I measure 100 mV/V, then it is equal to 50 N. 

Is it correct, please, or I'm missing something, and need to take into account excitation voltage + sensor range (0...10kN)?

 

Thanks a lot in advance,

 

Sincerely, kosist90.

How to Replace Random Array Elemnts in Parallel and in Place

$
0
0

I have an 1D array of Values that I want to replace in place and in parallel. The elements indices I want replaced are determined by an array of non-repeating integers. Since the elements and their values are independent I should be able to replace them in parallel and in place but I'm not sure how.

 

The VI shown below demonstrates the result I want but the for loop is not parallelizable (clearly because of the shift register). I have attempted to using an in place structure to pass the array into the for loop by reference but it was considerably slower than the shift register method below. Am I overlooking something simple?

Random_Replace.png

Attached is my example VI.

Issue with high speed voltage measurement (10 kHz)

$
0
0

I am trying to acquire voltage measurements for times between 1 and 5 minutes, but whenever I run my code I keep getting errors. Is there a better way for me to set up my block diagram to fix these problems?

 

Thanks

NI VISA Issue with Lecroy HDO 6054 Oscilloscope

$
0
0
Viewing all 67408 articles
Browse latest View live


Latest Images

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