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

statistics express vi with an array as input

$
0
0

I am trying to obtain the statistics of an array of elements, with the statistics express vi. I used the build waveform, in order to connect the array as input to the express vi, but this only uses the last value of the array instead of the sum of all the values of the array.

I am using simple data to make the calculation, so that I know the value before hand.

I use the values 2 and 4 and I am trying to obtain the mean, but I get a wrong value.

Can someone please help?

Thanks in advance.


LabVIEW Error on OS X

$
0
0

I have a program that I wrote that works fine on Windows, but does not work when distributed to a coworker that runs LabVIEW on OS X. I don't currently have access to OS X for debugger, but was wondering if anyone sees anything that may be an issue for cross-platform compatibility.

 

The program reads a JSON string from a text file that contains base64 encoded data, and converts it to an array of doubles. I know that there is nothing fundamentally wrong with the approach since it works without issue on Windows. I believe the problem is somewhere in the json_read_channel.vi or the base64_decode.vi. When run on OSX, the program will just hang and never throw an error (which is what makes it difficult for me to debug remotely on an OS I am not familiar with).

 

Does anyone notice anything that seems out of place when run on OS X?

 

Thank you!

 

json_read_channel

base64_decode

 

Delay for retriggerable finite counter

$
0
0

Hello I'm new to labview and using a pcie-6323 and had some clock issues. What I am trying to do is use a counter to generate a clock (frame clock in the figure), and based on it to trigger and generate another "Camera trigger clock" to trigger a camera. The Camera trigger clock is a finite, retriggerable counter. This is an code writtern by lab alumni. Previously it worked very well.

Picture1.png

 

Recently I would like to add a constant delay for all the Camera trigger clock pulses- not just the initial one. When I saw this sample, https://decibel.ni.com/content/docs/DOC-10685, I tried to add the start.delay to my code, like the following figure. But once I run the program, I got a 200452 error code and the program needs to be closed.

Picture2.png

 

I also saw this link mentioned to use Enable Initial Delay On Retrigger., http://digital.ni.com/public.nsf/allkb/204538A044431C9B86257377004EB952 . But I tried to put it in several different positions, e.g. after the Creat Channel vi, after the timing vi, after the start trigger vi and after the trigger property node, I still got the same error problem.

 

I think the pcie-6323 should be with the STC3 Timing Engine, http://www.ni.com/pdf/manuals/370784g.pdf , so I don't know why I had the 200452 error. I wonder if there is a simple way to solve this problem and achieve my goal. I saw some examples used two counters to do this delay, but I guess there should be an easier way? If someone can show me a figure or sample vi, it would be very helpful. I really appreciate it!

 

Thanks a lot!

Future Age Calculator

$
0
0

Construct a subVi to calculate an age in years given a birth date and the current date as inputs. you should use 3 seperate integer controls( 6 total) to enter each date: one for the day of the month, one for the month, and one for the year. Enter months as numbers. One output for age in years.

Not sure where to even begin 

Can a LV executable use a vi for its execution?

$
0
0

Hi all,

I have created an executable for my labview project. I now want to know if this executable can be made to use a Labview VI (which was no used while building the executable) that is present in some location in that system. I am no sure whether this is possible or not. I would like to know if it is possible. If yes, how can that be made?

Thanks for the help in advance.

Regards,

Ramya

PDF Creation: Inserting a jpg Image

$
0
0

Hi All,

 

This is a Cross Post to from Adobe Forums as they do not allow attatching files...  However if anyone can help here it would be appreciated.  I am creating this PDF from LabVIEW but hit a stumbling block.


Hello All,

First Post In the Adobe Forums so please excuse if this is in the wrong forum.

I am trying to create a PDF file from scratch by going through the PDF Specification. I have had Success with tables shapes and text however I cannot seem to get an Image embedded correctly. I was hoping someone may be able to take a look of the formatting of my PDF and see wht is going wrong. Any other general tips as to the structure would also be welcome. The PDF file isnt to large and the picture I am trying to embedd is 32x32 px jpg with 8 Bits per Component. My Current Method is to open the jpg File as a Binary File and insert the whole Byte stream between the "stream" and "endstream" tags.

 

Thanks
Craig

 

 

 

Stacked waveform chart with time in the x axis.

$
0
0

Hello,

 

I want to achieve a stacked waveform chart with three different plots and the x axis has to represent the absolute time of the system. I can build a stacked chart with three different plots and a basic chart with the absolute time in the x axis. However, when I try to implement the two things together it doesn't work properly. 

 

I have attached the different implementations that I have tried. 

 

Any help is apreciated.

 

Thank you!

Problem displaying correct x-axis/y-axis data

$
0
0

Hello,

I'm a labview beginner..I have a problem with an xy graph of a cluster of 2x 1D Arrays. x-axis is a time axis and it starts at 45 sec, then 75, 105,....The arrays have the size of 1008678. Problem:The graph links an incorrect order of the x-values to the given y-values. I tried to plot the graph with another time values but with the same delta-t (30sec) starting from 0 sec, just to show u here how i expect my graph to look like. I hope that u can help me! thanks!


Arraywerte auslesen und bearbeiten

$
0
0

Hallo zusammen,

ich entschuldige mich schonmal für meinen ersten Beitrag falls ich irgendwelche Regeln hier im Forum nicht eingehalten habe oder überlesen habe.

Zu meinem Problem:

ich habe ein 2dArray mit >5000 Werten ich möchte gerne diese werte auslesen und vergleichen und dann im einem bestimmten Fall den oder die Werte Rot und /oder blickend machen.

das ganze Array was ich bekommen habe soll genauso wie am anfang aussehen nur das halt bestimmte Werte rot und /oder blickend sind.

hat jemand eine Idee oder kann mit Hilfe leisten?

Ich danke euch schonmal im voraus

MfG Andre 

Change speed of stepper motor

$
0
0

Hi,

 

I'm a student and for a part of my thesis I need to control a stepper motor. For this I'm using a leadshine M542 driver and I control the driver with a NI9472 module. Moving from one point to another works. But when I start the motor needs to gradually speed up. Could someone help me to implement that code (I tried, see VI but it doesn't work)?

 

Thanks

SPI read sensor VN-100

$
0
0

I'm trying to communicate with VN-100 IMU sensor. How can I convert the read frame to three floats?

In a normal programming lanague I'd make a record of three floats and write to the adress of each element in the record. Is  it possible to do this in LabView?

 

a.png

 

 VN-100 IMU.jpg

Bug report: Find text not working in this example (LabVIEW 2014 x64)

$
0
0

Open the attached vi with LabVIEW 2014 x64 (ignore all the missing sub vis).  Look at case "5 linear averaging count", notice that there is a string that contains, among other things "Data: Cleanup 1".  Use find to search for the string "Data:".  It will find nothing.  Remove the case structure such that the contents of case "5 linear averaging count" is all that is left.  Repeat the search.  It will find the text.

Labview serial communication with RS 232

$
0
0

Hello,

 

I am new to LabVIEW and wanted to know how to get started with serial communication. I have a usb-serial adapter which shows up as a COM port. I want to send custom pulses through the COM port and read in pulses in response not using any known protocall. Is this possible using LabVIEW, or will I have to create a separate program to do this?

Restoring Class accessors via properties

$
0
0

LV2013

 

When creating an accessor for a class data member, you have the option to make this accessor available via property nodes.

 

I accidentally removed an accessor VI from the project.

 

The VI itself still exists; it's easy enough to ADD the file back into the project.

 

But when I do so, the properties that used it don't reconnect.  I can replace them with the VI and all is well, but there are cases where I want two or more values and I want to use one property node to get them.

 

How do I tell this VI that it should be accessible via property nodes?

Scripting Help - Remove/change items from a Project

$
0
0

I need some help with scripting. I have a bunch on VIs, such as Main, UI, Data, etc in my project. (These VIs have debugging VIs built in.) I have managed to make a script that changes them slightly before compilation of an exe file. (Removes the debugging VIs) Before modifying the VIs I make backups such as Main_debug, UI_debug, etc in my project. This works fine although I feel like my script is a house of cards.

 

I would like to make a script that uses the backup files to replace the ones I just modified. That is, Main_debug -> Main, UI_debug -> UI, etc. Howver, whenever I try to do this I get an error. I have tried using the method remove items from project and delete, but I always get the error that the operation is not allowed because the VI is in memory. What am I missing?

 

Thanks for your help.

 

Regards,

mcduff


Losing data using VISA Read

$
0
0

So I'm newbie in LabView and I'm trying to get some measurements data from ADC. I made simple VI which demonstrates my problems. I lowered Baudrate to 800 to catch the problem. So i have meander signal, ADC simply send me "0\n" on LOW and "5\n" on HIGH - 2 bytes each. So 800 Baud it's 800 bit/sec = 100 byte/sec = 50 messages "0\n" or "5\n".

I make 2 test signals:

1. 25 Hz. All was fine. Look at first pic. U can see 25 periods in 1 sec (50 time points)

2. 1 Hz. Here i'm loosing about 20% of data. I can't understand why and how. On the second pic you can see than we have 20% more than 1 period in 1 sec (50 time points). I tried save data and i had 41 data point in 1 period! 20% lost. Frequecy exactly 1Hz. Even if i count on Waveform Chart during 60-100 seconds i got right frequency! But some data is lost.

 

I tested it with different cases. And when Signal frequensy much lower than Baud rate (messages rate) i have almost exactly 20% lost data. 1 Hz, 10Hz or 1kHz. Always about 20% lost.

 

So why this happens? It's problem with Baud rate? Or it's because i made some mistake? But i simplify my program to just VISA read example. What's the problem?

I'm a power engineering student and I need some help programming!!!

$
0
0

First off, i have never used LabVIEW a day in my life. i have to use a mydaq to run a relay that controls a heater. I have create a VI that will countdown any input amount from 1 hour up to 12 hours that comes on when the time is selceted and shuts off when the timer ends. Any help will be greatly accepted.... 

Ethernet/ip slow response on new PC

$
0
0

Hi folks,

I created a VI which uses the Ethernet/ip driver to control some variable frequency drive motors in the lab. The executable runs fine on the laptop where the program was devleoped, but the motor start/stop response has a long, inconsistent delay when run on a new Dell 7040 desktop. I thought the issue was the Windows 10 OS but I ran the program on a seperate laptop running Windows 10 and everything works fine, motors start/stop like they should. Anyone out there exeperienced a similar issue?

 

Jason

 

NI USB 6251 BNC does not generate correct waveform

$
0
0

Hey everyone,

 

I am a graduate student new to spectroscopy and I am having issue with my NI USB 6251 data acquisition box. My LabView program is supposed to generate a triangle wave from +2 to -2 V, but I am not observing this on the oscilloscope. I am observing a square wave of approx. 100 mV.  I also tried running programs written by other labmates and the same issue occurs. I have tried different oscilloscopes and programs, so I believe the problem must be with the data acquisition box. 

 

Any advice would be helpful. I am very confused as to why this would be happening since the computer clearly says to make a triangle wave and it has worked every day until now. Any ideas for troubleshooting this are greatly appreciated. 

 

Thank you!!

Finding the peak value of AC current on a waveform chart and displaying on a new waveform chart continuously

$
0
0

I am using a DAQ to measure AC current.  Currently, the data is being displayed continuously on a waveform chart.  I would like to find the peak current and display on a new waveform chart along with it's associated time stamp as the current data is being acquired.  I've tried using Waveform Min Max.vi and am able to get the Peak Current Value and the time stamp; however, I am not able to build a new waveform since the waveform is expecting an array of values.  How can I build an array of peak current with its associated time stamp?

Viewing all 67265 articles
Browse latest View live


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