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

Much time consume in measuring Phase (degree ) of 50HZ sinusoidal signal.

$
0
0

Hi

 

i made a small program of degree measurement of a 50 Hz signal. in this program i just made easy comparison for testing the program which is,

 

if degree is < 180 then y=10

else

y=5

 

but results of detection degree of wave are too slow and due to this it almost remain at ELSE condition. but i need fast detction and comparison because i will used this program in my real time application which is based on the present degree value  of a 50HZ signal simulated inside in the labview environment. kindly guide me that the speed of detection and comparison is correct or somewhere i did mistake in the program. i will be highly thankfull to you

 

with best regards

mudasir ahmed


Hantek 1008C data type

$
0
0

Hello, I'm currently trying to use a PC based USB Hantek oscilloscope to take voltage readings for a prolonged time (few days). I can record this data using the Hantek software, but to do any sort of meaningful analysis I need to convert the data from a .DRC data format to anything else (bin, txt, csv).

 

I'm finding it incredibly difficult to decode the information. If you have any suggestions I'm very happy to discuss, a typical file is attached with 8 channels being recorded, only channel-1 has a 1 kHz 2Vp-p square wave visible. I'm certain that its a Chinese char encoding but haven't found the tools to decode.

 

The only other solution I can envisage is developing a new LabVIEW VI to capture the data and write to a file type that I want. I have already asked Hantek for driver details, but here amongst the core of established NI users, can I get a few pointers in setting up such a program (interfacing with the USB device)?

 

Thanks for your time

 

JD

Accelerometer (voltage) signals using NI6361 module (PXI)

$
0
0

Hi guys,

 

I have posted this question again but I still have problems with the DAQ. I am acquiring a voltage signal using a single axis accelerometer and NI6361 voltage module. I would like to setup the accelerometer to measure a signal range between +/- 5000g.

 

Accelerometer sensitivity = 0.516 mV/g where

1g = 0.000516 Volts or

 

1938 g = 1 Volt or

5000 g = 2.58 Volts

 

- I left the signal conditioning with +/- 10 Volts (Despite the fact that there is another one option to be set to +/- 5 Volts as well) -- Please see attached pdf

 

- I entered the sensitivity units to g

 

- I have set labview to measure a signal between +/- 10 Volts from the single ended one-axis accelerometer.

 

- An oscilloscope was connected with the card and it picked the same peaks with the LabVIEW. -- Please see attached pdf

 

- By hitting the accelerometer gently, the recorded signal was 400 mV = 0.4 V where it gives an acceleration of 775g.

 

- The accelerometer was also attached on the bullet for an impact test dropped from a distance of 50 mm. The recorded acceleration was 4000g which is quite high for such a small distance. I was expecting an acceleration of around 200g from even 2 to 4 meters according to some papers as well.

 

Can you please provide me with any help on how the settings are specified correctly between the accelerometer and coupler? I would highly appreciate whether you could correct me if anything of the above statement is wrong. I have attached a pdf file for your convenience.

 

Regards,

is it possible to have two data socket on one PC?

$
0
0

Hello,

 

I'm creating simple Tic Tac Toe  online game. I have problem because i have only one PC and i can't write/test my program. Is there any way to create two data sockets on one PC? one for player A and one for player B with two different IP's??

 

And my second question:

If i player A use Localhost to write variable A=50 and then player B connect to plyer A IP's and read variable A he will get 50 right?

waveform NULL display issue

$
0
0

Hi, I generated an array with random numbers and some of them are NAN, and the waveform shown is not continuous, how can I solve this problem? I want to keep an array with nulls in it, but I want it to be continuous when it is shown on screen.

 

Capture.PNG

Is it possible to display a string of ASCII decimal numbers in a string indicator?

$
0
0

Is it possible to display a string of ASCII decimal numbers in a string indicator?

 

(I am under the impression that these would need to be converted to ASCII first...)

 

I have the attached VI that displays hexadecimal numers in string indicators but

I want these to be shown as decimal numbers.

 

disp_code.png

 

 I have changed the Ch1-1 2 indicator to normal but it then dispays binary.

 

Any tips on any functions available to display the decimal equivalents of these values in a string indicator?

 

thanks

 

Datasocket write crashed my executable

$
0
0

Hi,

 

I'm using Datasocket to communicate with an OPC server (Cognex OPC).

Sometimes, one of the variable crash my executable (the application freeze and do not respond).

I've try to track what was the error code, but it seems that I don't reach the error out indicator.

Is there an error log file somewhere that could help me to debug more?

Any idea why a Datasocket Write could do this? 

 

 

Thank you,

trying to delete the first 20 rows of my tdms file

$
0
0

Hello what do I need to change to delete the first 20 rows of the tdms file instead of the last 20?


Missing NetClusterArrayToString.vi

$
0
0

I'm trying to get started using an NI-8473 CAN Module.  Example code I've downloaded can't find a vi called NetClusterArrayToString.vi which I'm assuming is supposed to be part of the NI-CAN library?  

 

I'm wondering if anyone has seen this problem before or can at least let me know if that vi is part of the NI-CAN library and maybe I just had an issue with my install?

 

Thanks,

Richard 

Getting Around Error -41112 in Report Generation Toolkit

$
0
0

I have an application that runs tests then writes the data to Excel at the completion of each test. The problem is that the technicians use Excel to record what they did during their shift and if they are in the middle of editing a cell in Excel when a test completes, LabVIEW generates error -41112 when trying to create the output file. Here is the error description:

 

"Uncommitted changes appear in an active cell of an Excel worksheet. Select the cell and press the Enter key to commit all changes."

 

Just to be clear, this error only occurs when a cell is in the process of being edited as shown in the screenshot:

Cell Edit.png

 

I'm writing some code that will check for this specific error when trying to write the output file and if it does, stop the cell from being edited and then retry the data output. The problem that I'm running into is that I cannot figure out a way to command Excel to stop the cell from being edited (esentially hit the ENTER key in Excel). There is a SendKeys method for the Excel Application through ActiveX, but I have not had success in using this method to send the ENTER key to Excel. Changing the active cell does not work either. Any suggestions?

Create coordinate map using 2D array of clusters

$
0
0

Hi guys,

 

I need to create a coordinate map in the following format (I'll try to describe as best as possible):

1. The system needs to be X rows by Y columns (decided when I start my test) for this example lets just assume a 4x4 setup

2. Each square needs to contain 24 'squares' where squares are strings which describe the pass/fail of that device. 

 

The XxY system (for example 4x4) is straightforward to put together using a 2D array. However the additional information per 'square' is what's giving me fits. I've been trying to do it by using a 2D array where each element of the array is actually a cluster of named strings. In the attached vi's it's only 8 however as I mentioned it will need to be 24 later but I don't think the number really matters at this point.

 

As you can see in my example vi's attached, I can run the init vi to form the 2D array of clusters and then the idea would be to run updatebinmap vi after this to update. But if you run the code a few times you will see it doesnt work because each time it updates the global 'Dies' and then when I switch squares or reticles the old value is still there. So I know that's the flaw in this code...what I don't know is how to make it work. 

 

The idea would then be to print this 2D array into an excel or csv file in the format below where each 3x8 piece of data is what I am calling a square. I think this is a problem when using an array of clusters as well so I am open to any new ideas. Thanks for your help!

 

00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00
00 00 00 00 00 03 00 00
03 03 03 03 03 03 03 03 01 00 00 00 03 00 00 03 00 03 00 00 00 03 03 00
03 03 03 01 03 03 03 03 00 00 00 01 00 00 00 00 03 03 00 00 01 04 00 00
03 03 03 03 03 03 03 03 03 03 00 03 00 00 04 00 00 00 00 03 03 00 03 03
03 03 03 03 03 03 01 01 03 03 03 03 03 03 03 03 03 03 03 01 00 01 01 03 01 01 00 01 03 03 01 03
01 01 03 03 03 03 01 01 03 00 00 00 03 00 01 03 01 03 01 03 01 03 03 03 03 00 01 00 01 01 03 00
01 03 03 03 03 03 03 03 01 00 00 00 03 03 03 03 00 00 00 01 01 01 03 00 01 01 03 03 03 03 03 01
00 01 00 00 00 00 00 00 01 03 03 03 03 03 03 00 03 01 01 03 03 03 03 03 03 03 01 01 03 03 03 03
00 00 00 00 00 00 00 00 03 00 00 01 01 01 00 01 03 03 01 01 01 01 01 01 01 03 03 00 03 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 03 03 03 01 00 01 01 03 01 00 03 03 03 00 01 03

 

simulation control sampling time

$
0
0

Hi,

I'm using control & simulation loop and write  3 waveforms with Write to measurment file (into .lvm). The problem is it wrote 5 times same data (as attached) and made my file very big. Thus, I couldnt plot in excel.

I had try to change sampling time by check and changing input value in Timing Parameters (in Cinfigure simulation parameters) into 1kHz. Also add Create timing souce. But both ways not solve the issue.

 

Hope somebody can help me. I'm not sure either it is sampling time issue or saving/write to file issue or something else.

 

Many thanks!!

write to measurment file

$
0
0

Hi,

I use NI-Daq 9237 to measure with strain gauge. In Labview I take the acquisition with 'Daq Assistant' and save the data with 'Write to measurement file': here i save in TDMS. The file have three columns: in the first I can read the Time given by the clock, in the third the strain values and in the second i should read the intervals between the measurments in second, but here, where for examples i should read intervals of 0,1 seconds, I read always 0,1,2,3 and so on, even if I change Rate and Number of Samples for the acquisition. Someone know how to solve this problem?

Interlock protection with NI 9482

$
0
0

Hello,

 

I just want to double check that the following scenario works as I plan.

I have a cDAQ module NI 9482 (link). I would like to use one channel to protect externally my Pfeiffer QMG 220 spectrometer (i measure separatelly the vacuum level at the chamber, in case of too high pressure the LV code must disable the filament). I also have a 24V DC PSU.

I have attached the manual of the QMS, it describes the function of the "EXTERNAL_PROTECTION", page 14. and page 26. with pinouts.

I would connect the components in the following way. Is this config OK?

Thanks!

 

schemeit-project_QMS.png

Compilation problem since windows 10

$
0
0

Hi all, 

 

I have labview 2011 and my software was able to compil on windows 8.1.

 

I recently update my laptop to windows 10 but since i can't complete the compilation of my software.EXE

it stop just before the building application step

 

is any body have the same problem ?

 

I already try to reinstal windows 8.1 but it don't fix the problem

 

Thanks


How to modify NI's example of HARDWARE TRIGGER DETECTION for successful compiling?

$
0
0

hey,

 

I am using CRIO FPGA for detection of input digital signal. I have found an example named Hardware Trigger Detection. As it implies, I replaced controls with an FPGA IO module (I have attached the file). However, It takes a long time to compile and it seems stuck at  "generationg core" for ever. 

 

Can any body give some suggestions? Thank you!

User Event Error 1

$
0
0

Hi everyone,

 

I'm getting a user event error 1 which states that I have an invalid input parameter and I don't know why it is happening. The VI initializes and then waits for 15 seconds for UUT to boot up and if I interupt during this time  by clicking the stop button, the program generates a User Event Error1. However, if I don't interupt during this 15seconds, I'm able to stop the VI without the error message. Not sure if configured my dynamic events in the event structure correctly. Can anyone figure out what I'm doing wrong. I've attached the screenshots and code.

 

Thanks

Multiple setpoints with 5700A?

$
0
0

I am creating a calibration (verification not adjustment) routine for the PXI-4224. I want to control the Fluke 5700A to output 13 different DC voltages incrementally. I am fairly certain that I should be using an array wired to the Primary Value of the Fluke 5XXX Multicalibrator.lvlib: Set output values.vi .When I insert and wire an array constant (thinking this is correct as the values I want to be the testpoints are static) I am getting a "constant has undefined type" error.

 

How would I correct this to do the following:

1. Output a DC Voltage based on a predetermined list of voltages

2.When the routine for the first output voltage is complete, go to the next voltage in the "list". (I am aware that there needs to be a loop in place, I can handle that it is how to write the vi where on the following iteration the next value is sourced from the 5700A)

 

Thank you for your assistance

Chris 

scroll

$
0
0

Is it possible to put data in a string indicator w the latest info at the top?

Plotting data from two locations on the block diagram on the same graph

$
0
0

Hi everyone,

 

I'm trying to plot data from two seperate processes on one graph.  These processes occur in sequence.

I've developed several solutions, none of which produce the result I want.  What I want is for the data to be plotted in real-time as each process executes.

 

The two processes are functionally identical - a single 'for' loop.  With each iteration of these loops, a datum is produced and plotted.

The data is plotted in real-time, meaning that each datum appears on the graph as soon as it is produced.

 

However, I am not able to get the data from the second process onto the same graph in the same manner.

The closest I've gotten is associating the graph with a local variable.  This allows the data for both processes to be plotted in real-time, but the second set of data overwrites the first.

 

I've attached a very simple test VI demonstrating my problem.

 

Any help with this would be greatly appreciated.

Thank you

 

Viewing all 69240 articles
Browse latest View live


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