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

Best way to create a large project to test an LED Driver

$
0
0

Hello experts,
I have been at this for almost a year, part time. I've rewritten it several times from the ground up as I learned. Small samples are
It seems like this should be a standard large project for LabView, but I am having trouble tying it all together. I have been able to take the device examples from one of the manufacturers and collect data for a few days, which is great. Now, how can more be added? I'm hoping there is a thread or example stash with all the answers.

The scenario is an electrical test setup for LED drivers, with four or more pieces of test equipment (up to 21) that need to scan (take samples) at the same rate and time. The minimum is an AC source, two power meters, and a DC electronic load. All need to save data to a file. The data will be voltage, current, power, and power factor. There need to be 3 to 12 tests that will need to be configured for: AC voltage and frequency changes, timing on each test from 30 seconds to 15 days, and the fewest number of files that contain all the data. I don't have NI hardware, so that limits the express VI's too. Later stages may need a Oscope or power analyzer to catch transients on RMS load, a DC power source, and thermocouples.

The project can be broken down into more manageable chunks. Is there an example that covers basic LED driver testing? Would the Core 3 training cover it all?

*) The configuration could be different based on the sample, so I started with a case structure for that. Inside that are the controls and initialization for each device.
*) What seems like should be next is a producer-consumer loop, with the measurements in the producer loop, and screen and file updates in the consumer loop. I've heard clusters may be unstable for what I need.
*) At the exit of the consumer loop is the device close and error recovery.

1) Looking for information, I can find example of how to set up one device, but not how to tie each stage to several devices at once. Is it better to have all the inputs loose just inside the config case? Or should they all be in a yet another while loop to be sure they sample at the same rate and time? Device selection and scan rate need to be common to all user visible panels. The rest need to be individual for each device controls. Is just inside the config case right for these to?

2) With more devices, each control and input is on the front panel, making it crowded. Ideally, each manual control should have matching a front panel control. Adding tab control helps to organize, but are sub-panels the best way to clean up the users view? Is there a better way?

3) What is the best point to get data for an input queue? What is the best format for the data to be in the producer and consumer loops? Should all the data be converted to dynamic and merged, or is it better to build a 1d array from each device, then build a bigger array with all the data from all the devices? All into a 1d array, or a bundle for each device? Or should each device have its own queue, to better support parallel processing?

4) When the data gets to the producer loop, should it be combined into (or stay) in the same merged/array for similar devices, or everything split to the different devices? This seems to be where an action engine would be used. The consumer loop would take the data and

5)On the output to a file, all the data can be connected from the display to be converted to dynamic and merged into a Write To Measurement.VI tdms file. Should this VI be inside the consumer loop or just inside the config case structure?

I could post what I have now, but I am not filled with confidence on what i have.

 

Thanks in advance,

John


Does creating queue/enqueue/dequeue/release queue work inside an FGV

$
0
0

I intentionally left my computer at work in order to force myself into some pad+pencil planning, so I can't test this. But I'm dying to know.

 

Can I make an FGV where the enum selects cases like "create/obtain", "enqueue","dequeue", and "release queue" to have the FGV make things easier? The main thing I'm uncertain about is whether the queue reference would immediately become invalid after creation since an FGV stops after a single pass of the while loop. 

 

Aside from convenience, it also seems like an easy way to ensure the queue is created/released in a single place. However, I'm also wondering whether this is a bad idea since I'd lose the event-like characteristics of having a dequeue with no time out in a loop that will actually be utilizing the data. I don't know, I'd like to hear comments on this vs using an FGV only for storing the reference, create, release functions.

Trying to implement Butterworth filter to remove noise from power lines in Pressure sensor

$
0
0

Hi,

Please see the attached VI I am using to collect data from my experiments. There is significant noise in the signal. I reached out to NI and they informed me that the noise is in 50-60hz frequency range and is from the power lines. They said that :

 

1) I can either average the data at sampling frequency which is a multiple of the noise frequency. In this case, I would need to sample at 300hz. I am not sure how to average data so I can see the values in real time(live) while I am running experiments. I am a beginner at LabView.

 

2) I can use a point Butterworth filter out the noise. I tried this in the VI attached but I am not sure if I implemented this properly. Do I need to sample at  a higher rate to implement that Butterworth filter?

 

 

How to find the maximum value of read data.

$
0
0

Hello Everyone,

 

I am writing data to a text file at 1000 samples/sec for approximately 20 minutes. There are five columns in the text file and I want to be able to determine the largest values in columns 2 and 4 when zero indexed. I see two methods to solve this problem.

 

The first method is to compare the currently read data with the read data from the previous loop. If it is greater, save the variable. Otherwise don’t save the variable. I know to create a local variable, but I don’t know how to reference the variable of the previous loop. Maybe use a shift register?

 

The second method is to run the VI and write all my data to the text file. After all the data has been written I can read the text file into LabVIEW. Converting the data from a string to an array I can use the “Array Max & Min” VI to find the largest value. I tried this method, but I didn’t know how to specify columns 2 and 4 in LabVIEW. I personally don’t like this method, because LabVIEW will have to load tens of thousands of data points. This will fill up the buffer and slow down LabVIEW.

 

Any tips/opinions on the best method would be appreciated!

 

Attached is an example text file and my VI.

 

Thanks

VISA: (Hex 0xBFFF006C) An overrun error occurred during transfer. A character was not read from the hardware before the next character arrived.

$
0
0

i am getting this overrun error with my serial communication with VISA .. my device is sending me a frame of 1640 bytes /sec , i  perform operation on 82 bytes that gives me  20 packets .. but some how after receiving 1500 packets ,nearly (1500*82=123000 bytes) this error pop up..

 i increase the buffer but the problem still exist but it occurs later depending upon the buffer size ..

 

how can i solve this issue ?

 

How to build array for every 2 iterations in while loop

$
0
0

Hi,

In one cycle of operation, there are two steps. 

I have 2 case structures inside while loop. one case structure will be true for each step. 

I need to build array , so that two case structure values to be in one row. currently I built two arrays to get values. Any idea ?

Malleable VIs with parameters

$
0
0

Hi All,

I have a need of parametrizing the malleable VI, or to be more generic any inlined SubVI.
The basic question is: is it possible to access the BD constants of the malleable (inlined) SubVI (with scripting for example) and store there different data for each instantiated malleable VI (like with the express VI)?

Are there any other methods of achieving what I need?
The example use case would be (it is not my use case, it is just an example Smiley Happy ): instead of connecting constant to the Stall Data Flow.vim double click it and set the desired delay.

Saving data in USB in the real time system

$
0
0

Hallo everyone,

I am trying to save my data in USB in the real time system VI. My data is coming from the FPGA around 2 KHz. So in the real time system I put a Timed loop with source type- 1MHz clock and a period of 4000 us. So data is saving in the USB in CSV format. But some data is always missing. I put a Square wave generator at 1.5 Khz in the FPGA VI and counting the event. When the counter is 40, I am counting the cycle. From the save value, I can see that some cycle is always missing. For example, If one cycle is 200 then the next cycle value is 220.

To connect the FPGA with RT VI, I am using Open FPGA VI references and passing it to the Read/Write control.

How should I program so that all the values are saved in the USB? I am pretty new in Labview.

Thank you.

 
 

Exporting Data with Multiple Columns in excel using Write Delimited Spreadsheet.vi

$
0
0

Hello,

 

I am trying to export data into an excel file and I found that it is possible by using the Write Delimited Spreadsheet.vi. However, I would want to insert the data in two columns as shown in the code attached. When I wire this 2d data into the vi function, I was able to export the 2d array data in csv format (also attached). But, the columns of the 2d array are just separated by commas(,) and are stored in just one column. Is there a way wherein each columns of the 2d array from LabVIEW will also be separated by columns in the excel file?

Global Variables and X-net problems?

$
0
0

Hello,

I made a program that take some frames from a .dbc file and change some parameters in it. I save it into a global variable,but when i use this variable the values are not correct(actually they are from main database,unmodified). In A picture you can see the modify process and at the end i write in a global var and i also do a verify to see the modify values and they are good. But in the B i use the same global variable and the values are not correct. In C you can see the output of A and in D the output of B. Anyone have a idea why this happens and how can be fixed? 

Thank you

How to make instrument drivers using dll file of the instrument control software?

$
0
0

Hello everyone,I am still new to labview and I am currently in need to make Labview drivers to control our injection set(ORTS32)..I tried to build VI's to control this instrument

but I am still struggling to establish communication with the instrument.I have attached (see the zip folder) the VIs that I developed as well as all necessary information.e.g instrument datasheet,dll files etc

 

Please help on how to build the VIs successfully.

Maximum number of shift registers/feedback nodes per a loop

$
0
0

Hello,

I'm working on porting code from an embedded system to LabVIEW. I need over 60 variables to be held in memory (via either shift register or feedback node). I use both as I read they gave same performance and since I don't need other than previous variable value (global scope in text based programming).

 

My problem is, once I added like 40 variables, the latest added value started to affect the update of others (some variables started to hold same value after few iterations). I checked the code several times and it is supposed to work. It is certainly weird behavior. All variables are initialized.

 

Just needed to point out that I use formula node with those shift registers and feedback node as an intermediate step before porting all code to LabVIEW.

 

So, is anyone aware of the maximum number of shift registers allowed either generally or connected to formula nodes? Thanks

 

Calculate frequency of each pulse from encoder

$
0
0

I am trying to calculate the frequency from an encoder, but I want the frequency for each pulse, and not just the average frequency so that I am able to find the percent difference between the max and min values.  By creating a waveform from the array and the time between samples and using extract multi tone I am able to get 3 frequency values, but I need a larger sample size to have reliable data.

Event structure for the disable property node

$
0
0

Afternoon Gurus,

 

I am writing a piece of code which has several parallel event structures, each with several cases embedded. Within 3 or 4 of these cases I need to enable and disable many numeric controls. Always the same ones to the same state.


Rather than have a disabled property node for each controller in each case, I was thinking of having a new event with one set of the disabled property nodes in and then use a FGV as the selector (enabled, disabled, disabled and greyed), which is set in the cases. Is this a good way of doing this or is there something neater. Attached is a PNG which is just a simplification of the problem.

 

Mucho ta-ness!

Event case not catching value change EVEN WITH value signalling node

$
0
0

Afternoon all,

 

Sorry if this has been covered before, but I've spent a while searching the forums and come up none the wiser.

 

I understand that programmatically changing a front panel object doesn't generate an event unless you use the Val(Sgnl) property note, but why isn't this picking anything up even with one?

 

There's no other event structure in use, front panel locking is off, and the new value does go to the front panel object - the event structure just doesn't seem to notice.

 

What am I missing?

 

Cheers


What is this symbol?

$
0
0

Hey,

can somebody please tell me what this symbol is for?

Best regards

set coordinate system using NI Vision Assitant

$
0
0

Hi I have 2 questions regarding NI Vision Assistant, I am getting the coordinate position of a ball using circle detection. 1) How do I configure the system so the reference point (0,0) is on the bottom left corner instead of the top left corner?  

 

2)Also,  How can I output the normal image after it has been processed in the NI Vision Assitant? It seems that it is going through every single step and I cant see the object position when running it. 

 

Thanks in advance

 

 

Writing PWM data to analog using FPGA

$
0
0

Hello,

 

I am working on a project to read the period of a PWM signal using FPGA. I am transferring that data to the host(RT) to calculate frequency and then convert it into an analog signal to write it on an analog channel in RT.

 

However, it is not writing anything to the analog channel. Can somebody suggest a proper method to do it, I just want the latest data because the frequency will remain same, so there is no need to buffer? Also, if I can know that what is the possible cause of the error in my VI?

 

Regards,

Kashish Dhal

VISA Serial configuration

$
0
0

Hello all,

 

I'm trying to run the Simple Serial.vi from the Serial.lvproj from the examples included in LabVIEW 2013. I am trying to connect to the COM1 port on my computer, which shows up on the windows Device Manager.

 

LabVIEW gives the following error:

"Error -1073807342 occurred at Property Node (arg 1) in VISA Configure Serial Port (Instr).vi->Simple Serial.vi" with "Possible Reason: VISA:  (Hex 0xBFFF0012) Invalid resource reference specified. Parsing error."

 

 I installed the VISA version 16 drivers and I can see the com port in the device manager and I can connect (and disconnect) from COM1 using Realterm (serial terminal program). The one thing that seems off is in NI MAX under Devices and Interfaces there is a line with a yellow warning symbol that says "No VISA resources found".

 

Do serial ports need to appear in NI MAX to be able to be used in LabVIEW? If so is there anything special I should do to get them to appear in MAX? I have a built in serial port as well as a USB serial port and I have been unable to move past this seemingly very simple step of recognizing and connecting to a serial port.

Plotting data from text file

$
0
0

Hello, I started using Labview from few days and my first need is to plot some data reading it from a text file.

Attached an example of data file I need to read and plot.

Thanks for helping me.

 

Viewing all 69241 articles
Browse latest View live


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