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

How to plot an XY graph with lines connecting some data but not others?

$
0
0

Sorry for the awkward phrasing of the question, I'm not sure what to call it.

 

Basically, I want to plot multiple data sets on the same XY graph (so they can be compared to each other). I want the points of a given data set to be connected by lines (as the XY graph does by default), but I don't want a line to connect them to the following data set (that is, if I pass it data set 1 and then data set 2 a little later, I don't want a line connecting the last point of data set 1 to connect to the first point of data set 2).

 

For example:

 

xygraph1.1.PNG

produces

xygraph1.2.PNG

 

because it's resetting every time by default, I believe. If I make it not reset:

 

xygraph2.1.PNG

all the data sets remain plotted (like I want), but you get that undesirable line I was talking about:

xygraph2.2.PNG

 

So what can I do? I don't know if I should use the express XY graph thing in this situation.

 

If I had to make a wild guess as to a solution, I could do something like, just do the 2nd thing I did, but in between data sets, set a property of the plot style (like the line color or width) such that the connecting line (between data sets) just isn't visible.

 

However there's probably a smarter way. Can anyone help me? thank you.


Need help modifying VI blocks for acquiring complex X/Y data

$
0
0

I'm working with these 2 VI blocks from Agilent 894XX Instrument driver and the thing is that: they are only able to read out Real X and Y values. The instrument is frequently required to work in "Zoom" mode, which output data is Complex. The term Zoom and Baseband are defined by the instrument in the image attached. I don't clearly understand the driver developer's code and the method it read-out the instrument in order to change them. Please help!

X axis.png

Y axis.png

Thank you so much in advance! 

Changing Ring Text in an array of clusters

$
0
0

I ran into the following problem recently, I was hoping someone could help. I am attempting to change the ring text of the ring controls that I have in an array of clusters. I am able to read out the text ring, but whenever I try to write to the text ring, I get an error about a strict type def. This occurs even though the control is a Type Def, and not a Strict Type Def. Probably something silly that I am overlooking, Thanks.....

Read from Delimited Spreadsheet File is merging cells

$
0
0

Hello all.  We are using Labview 2016 and are using the Read From Delimited Spreadsheet File function to read values from a spreadsheet and input those values into controls on our program.  Some values are text and other are numerical.  The spreadsheet is laid out that all data is in two rows; the first row is text data (descriptions) while the second row is mostly numerical values.  We chose the String polymorphic instance for the function and used the String conversion functions to convert the numerical values to strings for the front panel controls. 

 

However, we kept getting errors when running the program.  We used probes and saw that the Read From Delimited Spreadsheet function was actually merging cell values.  So if cell 1 has the value "Setpoint" (a string)  and the next cell has the value 4 (a number), the probe is showing the value Setpoint 4, which doesn't work for us because our program is set up to get a value in each cell of the spreadsheet.  So the program would never see that the setpoint is 4 because the 4 got sucked into the "Setpoint" descriptions.

 

We used this same setup in another program, but set the Polymorphic instance of the Read From Spreadsheet function to Double, and it did fine.  Is there a particular caveat of the string polymorphic instance that concatenates cells instead of reading them separately?

 

Thanks.

LabVIEW Option modification

$
0
0

Hi, 

I would like to learn how to modify the LabVIEW -> Tools -> Options. All the parameters under Option window. Is there a file which you can modify or apply changes by using the batch file?

 

Regards, 

max

Labview fails to initialize Tektronix Oscilloscope suddenly

$
0
0

It was working fine, then suddenly it fails to initializes the Tektronix MDO3024 oscilloscope in every VI file that has previously worked. I tried to restart Labview, the computer, the oscilloscope, replug the ethernet cable, reinstalling the oscilloscope driver, but none of these worked.

 I have attached a VI file as an example, all VI files which has stopped working does more or less the same thing as this one.

Here is the error message for one VI file

 

Possible reason(s):

The id query failed. You might have selected the wrong instrument, or the instrument did not respond.  You also might be using a model that is not officially supported by this driver.  If you are sure that you have selected the correct instrument and it is responding, try disabling the id query.
I have attached an example VI file below, all of the VI files which stopped working does more or less the same thing as the one attached.

Complete call chain:
     Tektronix DPO MSO 2000 4000 Series.lvlib:Initialize.vi
     Tektronix DPO MSO 2000 4000 Series Acquire Continuous Waveform Example.vi

 

Here is the error message for another file.

 

Possible reason(s):

VISA:  (Hex 0xBFFF000E) The given session or object reference is invalid.

 

 

I also tried to follow the advice in the first error message by disabling the ID query. But then it gave me another error message.

 

Possible reason(s):

LabVIEW:  Scan failed. The input string does not contain data in the expected format.

MATLAB DLL C Wrapper initialize and terminate, part 2

$
0
0

I'm referencing this very old thread since it forms a part of a backstory, but doesn't resolve my issue directly and would like to find the root of the issue:

 

https://forums.ni.com/t5/LabVIEW/Matlab-Dll-Initialize-and-Terminate/m-p/285894

 

I have a MATLAB C DLL compiled using MATLAB 2017A (fully 64 bit), and the respective version of the Compiler SDK. I used Visual Studio 2017 Community (again, fully 64 bit...bitness is not the issue) to create a wrapper and console application to independently verify the DLL. The console application works fine, both as a single DLL function, and by calling separate init, function, term functions.

 

When I import the DLL into Labview 2016 64bit, the import goes fine and the first run of the DLL file works just fine. However, Labview reports an  exception from the DLL when the VI is run a second time or more. In my investigation, it looks like the MATLAB terminate functions fail the first time, and consequently the initialization of the next VI run fails, and crashes Labview.

 

I sincerely do not believe it is a DLL issue, since the console application calling the same DLL runs perfectly.

 

Any thoughts or fixes that aren't covered in the original thread referenced above?

Pulse counting in a timed loop

$
0
0

This should be simple, but i'm very new to lab-view and its causing me issues, if anyone could point me in the right direction.

 

I need to count how many pulses are given off by a 2 pin temperature sensor (LMT01). Number pulses correspond to temperature. I'm not sure how to count a set then reset to zero and continue to count future pulses. I've tried looking into timed loops and putting it inside a while loop but nothing happens. 

 

Regard attached code to simply down for now i am just using a push button to produce true/false data, so i am trying to count how many times the digital button is pressed in 10 seconds and then i want the counting to start again from zero, (if i wanted to add a delay is there a suitable way of putting this in, the LMT01 has a turning on delay and delay from each pulse set). I assume my issue is either with the set up of the timed loop or the initial set up of variables. As a side note the attached code does work with the timed loop as a while loop. 


Display each cell from a table

$
0
0

Hi all.Firstly sorry for my English.I have this table created in that way.Before to store data in the table i want to store that values, each cell in separate control.

I can make this with  a control who receive each value before the Build Array Block but i have 2 problems:

-how can make a block who can show my value, but on the same time send that value to table( i want to modify these controls or what they will be and these changes to be shown in table)

-this is a for loop, i can't check if itteration=0 , or 1 or ...or 7 to put values separately

Thanks in advance.

Tranferring Multiple CSV files to XY graph

$
0
0

Hello Everyone,

this is the latest version of the my application. I have attached the block diagram snippet here. If you run it, you will see you can filter out you preferred csv files into 'Active file' box by double clicking on the files from the 1st box once it loads there from directory. What I am trying to do is, I want to read more than one csv files from the 'Active file' box and plot the data sets all in one XY graph. I want to have multiple csv data sets in one XY plot because I want to compare the plots. If anyone can help me out or make suggestion, that would be great. if anyone can show me an appropriate discussion link, that would be also appreciated. Thank you. Multicolumn List Box V1.4.png

Serial Independent Read write

$
0
0

I'm writing a vi for communicating to a device that occasionally sends an update command to the computer. I've created a similar vi for debugging purposes to share (for advice/input below).

The requirements are as such:

1) After being initialized, the computer must listen to the device unless it is writing. (So that it can hear "!UPDATE!\n" [part 3])

 

2) The user interface will send commands to the device and wait for the device to send back a set of data with "!PRINT!\n" at the end. After "!PRINT!\n" is received, the center loop processes the data, and either writes a new request to the device or sends the data to the front panel.

 

3) Occasionally, the device will print "!UPDATE!\n" to verify that there is still a connection. If the computer receives "!UPDATE!\n," it needs to print back "!UPDATE!\n."

waveform plot selected cursor issues

$
0
0

In LabVIEW 2016, I have a Waveform graph with multiple cursors. I use a For Loop to sequentially make each cursor active and allow the user to drag the active cursor to a new location. This is done with an event structure with two events; "Waveform Graph":Mouse Move to have the cursor follow the mouse movement and "Waveform Graph":Mouse Up to sense the mouse button and leave the cursor at that location. So far, so good - this works. But in the cursor legend, I have the name of the selected cursor colored so the user will know which one he/she is using. Unfortunately the selected cursor does NOT change when I change the active cursor - but it does change to the active cursor when the Mouse Up event (but not the Mouse Move event) completes.

Is there some way to set the selected cursor equal to the active cursor before the Mouse Up event completes? 

Thanks in advance.

Tom W.

Register Event from a control within an array

$
0
0

I am attempting to register the "Remove" button for each active array element. I'm well versed in the Register Dynamic Event nodes but am struggling to access the reference for an individual control within the array.

 

Is this possible?

 

Thanks,

Craig

the number of channels in the data does not match the number of channels in the task.

$
0
0

I want to test my DAq with 2 output signal. This is my VI

This is the error i get..How can i send 2 signal ..IE: make my Task channel to two

Possible reason(s):

Write cannot be performed, because the number of channels in the data does not match the number of channels in the task.

When writing, supply data for all channels in the task. Alternatively, modify the task to contain the same number of channels as the data written.

Number of Channels in Task: 2
Number of Channels in Data: 3
 

LabVIEW on Linux issues with bookkeep.cpp

$
0
0

I've recently installed LabVIEW 8.2 on a Linux system. I have a LabVIEW program I want to run. The program has been confirmed to work on other Linux systems with the same version of LabVIEW.

 

However, when I attempt to start the program, LabVIEW will display the front panel for a split second before exiting without prompting. The next time I start LabVIEW, it gives me the error message indicating that bookkeep.cpp has crashed at line 853. What does this mean? Are there any known workarounds for this issue?


Comparing array elements value In labview

$
0
0

Let's say we have an array of 3,10,8,2

im hoping to feed this array to a loo in which my daq assist is located . If we need to increase send signal to channel 1 and if we need to decrease send to channel 2 

so for this array start by sending Boolean true signal 3 times , then second element is 10 so send 7 (10-3) more times to channel 1 then next is 8 so decreases by 2(10-8=2) so send twice to channel 2 and finally since last value is 2 so it decrease by 6 (8-2=6) so send 6 to channel 1... 

how can I do that ? Is there an easy way ? Maybe we just need 1 channel let's say channel 1 with default value 0 . So first digital signal 3 times to channel one then rest then send 10 times then reset to default ... 

how do you reset to default after each iteration ? 

How to connect usb(EEG sensor) instrument via visa

$
0
0

Hello,

I am trying to connect with EEG sensor .I attached link about the EEG sensor (http://www.digital-medic.com/).I am trying to using visa (http://www.ni.com/tutorial/3702/en/ ) to connect the sensor but error .error code is 1073807202.Could someone help me how to make programming to connect with sensor.Now I am working to built wheelchair with brain controlled.Now i have no idea how acquire data from the EEG sensor in Labview.Any suggetion for my problem.I never used Labviewbefore this.

Thank You

 

Implementation of digital IIR filter using directform structure

$
0
0

Hello

I want to implement a digital low pass IIR Butterworth filter using direct form 1. I have calculated the filter coefficients and the transfer function in z inverse using matlab. Now I want to implement it in labview and want to develop a direct form 1 filter structure using z transform delay node. Filter is of order 4 and coefficient of numerator and denominator are uploaded in image.

Any help is appreciated.

Thank You

 

  

Sort elements in a cluster in alphabetic order

$
0
0

How can I sort elements in a cluster in alphabetic order?

My cluster is big and reordering method(reorder controls in cluster) provided will not allow me to look at other elements outside the screen...and it is slow..

Problem with Scale object with pane in tab control .

$
0
0
Hi
My problem is that i cannot select "Scale object with pane" for the controls inside a Tab control if the Tab control "Scale object with pane" is turned on. I want both the Tab control and the controls inside to be scaled, for instance an Waveform graph or an textbox  when i resize my main window.
 
Thank you.
Viewing all 69497 articles
Browse latest View live


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