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

Updating Variables Between two Loops

$
0
0

Hi all,

 

I use LabView for work and haven't had much formal training in it so I learn as I go. The problem that I believe I'm having is LabView won't let you pass variables from one loop to another to lets say update an input, my understanding is likely flawed. In the code posted below I need to be able to update the input of duty cycle based on the measured power of the laser. This program will ideally  calibrate a CO2 laser for any power you want by adjusting the duty cycle until the power meter is within +-1 watt of the power you would like to be at. This duty cycle than can be used as the input in another program to run the laser at a specific energy. Currently on the block diagram duty cycle will adjust but its not actually changing the input to the function generator. This is where my LabView knowledge comes up short.

 

Any ideas anyone? 

 

Thanks!


read from a text file line by line

$
0
0

Hi,

I am new to Labview and I am trying to output a text file line by line. For example if my text file is

 

START

SETRPM 1000

WAIT 10s

RAMP RPM linear,1000,2000,2 MAF linear,5,7,2

WAIT 5s

RAMP RPM sine,2000,1500,3 MAF sine,7,3,3

END

 

I want it to output

 

START

SETRPM 1000

SETMAF 5 ...and so on

 

I tried modifying this code provided by Altenbach but it is still not working as I want it to. Can anyone direct me toward how I can fix this?

Thank you!

 

How to sychronize data acquisition and actuator control

$
0
0

I am working on a program that controls a PI M-235.2DG actuator while collecting and storing data from a Keithley 2000 multimeter. The behavior of the actuator is dependent on the data being supplied by the multimeter. If the voltage value being read is above or below a certain constant, the actuator changes its movements. This is done with a "Greater or = ?" comparison and an array. I have both the data acquisition and actuator control in one giant while loop to ensure that they run in parallel. 

 

Unfortunately, this program failed to control the actuator and provide a constant stream of data. I have used programs in the past that have accomplished this, but the addition of the "Greater or = ?" statement and the inclusion of the actuator controls in the while loop seems be causing problems. Any tips?

 

P.S, I have included a copy of the vi.

Reading/Writing TDMS files

$
0
0

I'm  trying out TDMS files as a means of saving disk space for long tests. 

 

I struggling to find a clear tutorial on how to write multiple channels (but I think I got this one figured out), but more specifically, how to read multiple channels on a some kind of waveform graph. My searches have not yielded much.

 

Is there a better data format to use?

 

Rick

Advantages and Disadvantages of Dual booting Windows on PXI Device

$
0
0

 

Hello,

 

In solving my previous problem of running a DLL in RTOS I've stumbled upon another solution. But i wanted to know the pros and cons of this before i make the leap.

 

I want to install windows on the PXI device so that the NHR DLL files are run inherently on the windows kernel and i have access over my DAQ devices without placing them in the remote target.

 

What are the advantages and disadvantages of installing a windows only on the DAQ device and running all my operation from it. Do i loose my real time features? I dont know, I'm really new to LabView and may sound really dumb. Please excuse my lack of knowledge.

 

With Regards,

Khalid.

Demux a Signal in Labview after DAQ acquisition - Unbundle ???

$
0
0

 

Hello,

 

I am trying to demux a signal that has been digitally converted by the DAQ 6363. The bus signal (input analog signal) is formed with a  sequential sample that is related from its respective channel. Number of channels can dinamically change according to the experiment, as consequence, the number of columns from my output might need to follow it.

 

I would like in my output an array or variable that has the number of column as equal as the number of channels. I have seen in prevoius posts that the function "unbundle"  might do the job, but with a fixed number of columns.

 

Please, comments and suggestions are most than welcome

 

Best,

 

Joao S.

 

 

 

 

 

TCPiP communucation betwenn QT-server und Labview-Client

$
0
0

Hello everybod,

 

iam new in Network Programming with LabVIEW.

 

I have a data communication issue via TCP/IP protocol. I created a simple Client.vi that connect to QT-Server C++. if the connection established, Client.vi sent a simple string "Hello" to Qt-server. 

the Problem is: Qt-Server recieves an empty string with the size 0!!!!

 

Client.vi

client.PNG

 

 

Qt-server

 

 

Qt-function recieve data:

QT Function recieve data

 

 

Please help Smiley Happy

 

 

programar compactrio fpga

$
0
0

Hola a todos, aprovecho este foro para pedir su ayuda con una complicación que estoy teniendo al programar una CompactRIO 9074 en modo FPGA, ya tengo instalados los Módulos Real-Time y FPGA en mi computadora, pero al momento de querer programar en modo FPGA en LabVIEW no me permite la opción de agregar mi tarjeta como se muestra en la figura siguiente:FPGA.jpg

Ojalá alguien pueda ayudarme y de antemano gracias por su dispocisión!


Measuring vechicle speed using two IR Sensors

$
0
0

Hi Everyone,

 

My program has to calculate the speed of passing vehicles based on interrupting the connection between the two IR transmitters and receivers. Also program has to count the number of passed vehicles. Devices are plugged into the Arduino UNO, and i use a LINX to connect Arduino to LabVIEW. The program detects infrared waves intervals but I don't know how to calculate the time between the termination on one wave and the other to calculate the speed. Distance between two sensors is permament. Please give me some suggestions.

cRIO 9064 FPGA 9402 Trigger input on DIO not read

$
0
0

Hi,

 

I have a cRIO 9064 using the C-Module 9402 as a fast DIO in a SCTL. I use it in a digital delay pulse generator (DDPG).

I have succesfully implmented the DDPG, triggered with an internal generated square wave clocked at 1 MHz.

and I measure perfect output pulses on an oscillascope.

My implementation is basically a clone of: http://www.ni.com/example/31131/en/

 

However when I try to trigger from an external 1 MHz, 6 volts amplitude; duty_cycle 50%, square wave coming in on the DIO3

there is no triggering, as seen on the Ticks_Between_Trig - which should be about 40, when there is correct triggering.

 

I have use the method  'Check Status'  to make sure the 9402 is ready before running in the SCTL.

( Note:  while it is labled Mod3 in teh screen shot, it is actaully Mod1 and it simple a namign mismatch - which when fixed does not change anything. )

 

I do not see any digital HIGH when monitoring the trigger input, which I do when using the internal trigger.

The LED flashes, often enough even though in reality at 1MHz.

 

My question is what trick do I need to have the 9402 DIO read the input signal.

I have followed the instructions here:

 

http://zone.ni.com/reference/en-XX/help/370984R-01/criodevicehelp/crio-9402/

 

but perhaps i missed something.

 

thanks

Michael

 

 

Writing to spreadsheet file in a loop?

$
0
0

Hi,

 

I am trying to write a series of images to a spreadsheet file. It is basically a video that has about 540 frames each frame is 1780X500 pixels. I am running a for loop that takes acquires a frame from the stack of frames and writes it to a .txt file. This operation for the given file size takes about 2 mins for the writing process. I need the raw data so i cannot save the images in any other format. I am told that 2 mins is a long time to be saving a 9 sec video. 

 

I attached the code. Is there anything in the code that is slowing it down or is it running at speed limit. I am new to labview and I am not sure how I can speed this up. The write header is a custom VI that just creates a 6 line header to write in the beginning for each file. Any help is greatly appreciated

 

Thanks

User able to zoom in/out picture in realtime on running Front Panel?

$
0
0

Well I've searched for this and have come up empty. What I would like to do is have a picture of a schematic up on the front panel, and while the VI is running the user can somehow zoom in/out of the picture in real-time.

 

I know there is a thing called Zoomfactor which you instantiate in a way in the Block Diagram, but that seems to zoom in on a picture pre-run of the program. The zoom is not real-time. There is no real user ability to zoom in/out with free will using the Zoomfactor that I can see. (sorry I forget the function's full name). And I've seen posts by someone named George Zou who seems to have come up with a VI that is closer to what I want, but the VI's I pulled from his site don't seem to work with my computer (my rig is running XP with Labview 2013 currently). So, I was just wondering if anyone else had found other suitable answers to my quire?

shift register array

$
0
0

I need to create a program that will take a six element array, and using shift registers have it output an array that keeps the first element the same, then adds the second and third elements together, then adds the second through 6th element.  So if the input array is 2, 12, 10, 5, 20 and 25, the output array will be 2, 22 and 72.  I am thinking that using shift registers and a for loop would work, but I cannot get it to work.

 

Thanks for any help

pull string from array as number

$
0
0

Hello im working on a small project which involves taking CPU usage information from an iPhone and sending it via a webserver to labview.

I managed to get the first part working in a python shell using ssh and got it into labview via the http GET vi. i managed to put it into an array as its a just a long string and its working fine.

 

I would now like to pull out the third colum of data as numerical values and just basically add them together. 

I am trying to pull out the third colum into a cluster of strings then using "scan from string" to convert to string to numerical valuse.

The issue is im only getting the third colum, second row number value and everything else is 0 (with supressed errors). im not fully awear on how the array to subset works so a little help here would be appreciated.

 

 

However i do want to develop this further so as well as the above so any information on how to make a bar chart using colum a as the x name and colum b as the y value would also be appreciated.

 

Attatching image of the code as it currently is and a copy of the CPU information i get from the phone (the inforation from the phone cannot be changed)

Deleted NI MAX Module and unsure of how to restore previous "global channels/Tasks"

$
0
0

Hello All,

 

I'm still new to labview so please be gentle.

 

I am diving into a .exe file and revamping a system to work again. Cut to the chase, I deleted a module (NI 9217) from the cDAQ chassis 9172. I deleted and did not save the "global channels and tasks" associated with the module. My question is, if I want to have everything back to where it was before I deleted, Is there a way to do this? I have no idea what was associated with it before.

 

Thanks


Acquisition on NI sbRIO 9636

$
0
0

 

 

Hello! I am working on my faculty project and I have to do acquisition on NI sbRIO-9636. How can I choose sampling period of acquisition? I am working according to an example on NI website below:

 

http://www.ni.com/tutorial/4534/en/

I can't figure it out which sampling period should I put in Host.vi and which in Target.vi in order to have proper acquisition? For an example, I would like to have sampling period 10 milliseconds. How to configure loop-time in Host.vi and how in Target.vi?

 

Thank you

graphs

$
0
0

HI,

I want to see the values of graph points during mouse hover. But sometimes it is not showing the values when placed at graph points ..

Also when zoomed in it shows values at those places where graph points are not present.. 

So what will be the required modifications  in this following vi.

Transfering a boolean signal out of a while loop after every iteration

$
0
0

I am using a "Mask and Limit" to produce boolean signals based on data being collected. Inside the loop, this will obviously produce a boolean with every iteration. However, I need this boolean signal to be available outside of the loop with every iteration as well. Is there a way to make this constant stream of booleans available outside of the loop?

 

Thank you in advance.

Using VISA and RS232 devise , loosing the COM port .

$
0
0

Using VISA and R232 devise communicating fine with labview and I can  Read and Write.

however, I want to turn OFF the devise, then turn it ON again (part of the test), and be able to continue .

The COM port is not communicating . unless I turn both the devise off  and Exit  LV then restart again.

How to do that without restarting LV.

thanks

Excel template for spreadsheet

$
0
0

Hello all. With your help I am near completion. I am using a "write to spreadsheet" and would like to know how I can create a header, so to speak. The operator's will be expected to create a new file each time the Vi is run. So, along the top I need each column to have written "Capacitance" for column 1, "Impedance" for column 2, and "Temperature" for column 3. So, as the Vi is run the top row populates with the names given above, then the data will be written under each of the headings.

 

The second thing, and I don't know if this is possible, is that I would like the spreadsheet to have the first two columns be in scientific notation form, and the last one in general form, on the actual spreadsheet. I don't know much about Excel but I think what I would like to do is create a template, have the data written to it and then force the operator's to perform a save as so the template is left as it was before the test. Hopefully this makes sense. I have attached what I am "playing" with, trying to make it work.

 

Thanks much.

Viewing all 67408 articles
Browse latest View live


Latest Images

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