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

Get This VI Clone Reference

$
0
0

So lets say I have a reuse function that setups up my VI's front panel the way I like.  It has an input for the VI reference, that it should be setting up the front panel for, but if you don't provide a reference it will get the calling VI reference using the call chain, and an Open VI Reference.  It then closes this reference after it is done.

 

If I drop this function on a reentrant VI then things could be a bit hairy.  I can still use the call chain to get the name of the clone VI, and I can still use the Open VI Reference with it.  But according to LabVIEW R&D being able to open a new reference to a clone VI is not something that should work due to possible instability.

 

So my question is this, how can I get a reference to a clone VI, from within that clone VI, without explicity passing that reference in, in a safe way?

 

Because this idea exchange idea exists I assume there isn't a way.


case structure with string as a case selector

$
0
0

hello every one !
i have little issue with the case structure 
situation :
I have created the case structure and case selection is done by the string,
according to the case selection respected led should glow 

the case structure is as follow :

case 1 [when string is "abc"]

            {

              led 1 = true 

              led 2 = false

            }

case 2 [when string is ''pqr'']

            {

             led 1 = false

             led 2 = true

            }

case3 [when string is '''',default]

            {

             led 1 = false

             led 2 = false

            }

 

now what is happening :
i clicked on the"run continuously"

now when i type the any of the string nothing is happening !! :smileyfrustrated:

 

my observation :
when i type abc/pqr in the string input, it actually blinks the led for very small fraction of time which i can not see and finally set into the default case.

 

what I am expecting from this code !
when i put "abc" in the string input , 'led 1' should beturn on and remain on untill i put pqr into the string input
same when i put pqr into the string input, led 2 should be turn on and remain on untill i put abc into the string input !

 

Thanks in advance !
 

Number of Groups in TDMS file?

$
0
0

Hello,

 

Is there a way I can read the number of groups in a pre-existing TDMS file? I want the groups to be named numerically so if I know how many groups there are in a file that was opened, I can automatically set the group name for the next one.

 

Kenny

no Create New option under MAX - Devices and Interfaces

$
0
0

I downloaded LabVIEW  2014 SP1 for evaluation, and need to create simulated devices to follow the tutorials.  When I open MAX and right-click on Devices and Interfaces, there is no Create New option, either in a pop-up menu or in the Devices and Interfaces display.  Expected Create New… » Simulated NI-DAQmx Device or Modular Instrument.  NI DAQmx is installed.  Has anyone encountered this or have a suggestion?  Hope to get this running before the evaluation period is up.

Stop Interval Scanning for Fluke 2638A

$
0
0

Hello,

 

I am trying to create a DAQ VI for Fluke 2638A that measures temperature every 15 minutes and logs data in an Excel file. I created a producer/consumer architecture for this VI. 

 

During the 15 minute interval (900s), how can I have the user press the Stop button and end the program? I would like to interrupt the Wait for Scan Complete subVI since this is where it stays during the interval.

 

I am thinking of an event structure where the stop button is pressed, and sends a signal to the FL 2638 Abort Scanning subVI. I am unsure on this approach.

 

Another idea is to modify the Wait for Scan Complete subVI and add an event structure for the Stop button.

 

Please let me know if there are better ways to do this VI or any comments that I can learn from.

 

Fluke_2638A.png

crio pxi shared varialbe

$
0
0

I have a project that contains a PXI and a cRIO.  The users getting data from the cRIO also need the time from a shared variable in a library hosted on the PXI.  I need to build a startup.rtexe for the cRIO and stand-alone apps for the user computers. 

 

1)  is the best way for the users to see the time from their apps using indicators data bound to the shared variable on the PXI?

2)  I need to write the time to a TDMS file on a user computer.  Should I use the shared variable for the same purpose?

3)  how does this affect deployment for the startup.rtexe for both the PXI and the cRIO?

4)  is it correct to assume when I build the stand-alone apps for the users I will need to include the shared variable library from the PXI?

NonLinear System

$
0
0

Hello guys, first thanks for the attention.

 

I'm trying to use the nD Nonlinear System Single Solution Vi to get one solution of a nonlinear system, but seems like i've got some error at the parser. I tried to figure it out what was making such issue, and I think that there's something wrong with the brackets,  but I didn't found what. 

The error mensagens -23001,-23083,-23081 apears in the Vi .I'm attaching my program, if anyone could take a look I would be so glad. 

 

 

Sorry for my bad English.

Thanks.

Dialogue box critique

$
0
0

Hi all,

 

I've been trying (in vain) to create a good dialogue box that does some bounds checking on user inputs before allowing them to be sent to the main application. Ideally, when an input is out of range, it'll blink until it gets put into range. Generally this means that bounds can only be positive (nonzero, nonnegative numbers) and that VISA resources cannot be left blank. Additionally, the difference between two of them must be bigger than or equal to 40(Range Max - Range Min >= 40). Normally, my code is pretty modular, but I think this being my first real foray into UI design has left me struggling to make things look and work nicely. I've posted the VIs thus far for critique.

 

I've described how it should work. As to how it's actually working, I've noticed that whenever I have two things that are out of range, and I fix one, the OK button is no longer blocked. I think this may have to do with how my events are set up, but can't be sure. What do you think? How can I make this better? Am I missing something fundamental in my design layout?

 

thanks,

 

ijustlovemath


AVI2 not writing frames/timeout

$
0
0

I have designed a VI using a state machine to configure, grab, and save a video stream to AVI. We are using LabView V14 on WindowsXP (yes, I know) with a Point Grey USB3 camera. We use this in our single-molecule biophysics experiments.

 

The intended design contains three states: Standby, Activate, and Record. Standby allows the user to configure the camera and image size. Activate initiates a grab and allows live modification of FPS and image offsets in order to properly frame the experiment. In the Record state, the VI should begin writing frames to uncompressed raw AVI. We use raw uncompressed AVI since we perform highly precise image processing on the images afterwards-- individual pixel intensity levels are very important.

 

The state machine seems to work well as I can cycle through the different states just fine. The Standby and Activate cases work as intended. However, there are two problems with the Record state....

 

1) The resulting AVI file only contains one image, the first frame grab. This is despite the fact that the Grab/Write loop is iterating-- I used an indicator to be sure. I modelled this loop after several code examples found online and I am coming up empty handed as to why this is happening.

 

2) At high frame rates (>30), the Grab and AVI2 Write loop will exit spontaneously after some time. I have observed that tt high frame rates the buffer seems to grow at a larger rate than the loop iteratations, i.e. it is acquiring images into buffer quicker than the loop is executing. I do not know if this is the source of the problem, or perhaps it might be related to both problems-- or maybe even a third problem entirely that also needs fixing.

 

I have attached snippets for the Activate and Record cases and I would appreciate any assistance. Thanks!

 

 

Root Loop, Time/Date Browse and DAQmx Watchdog

$
0
0

I've just run into the issue where the time/date browse calendar control blocks execution of my system.  See here for discussion about this problem.

 

I've got a data aquisition loop running that uses the DAQmx watchdog, and opening that browse window is causing my watchdog to starve, thus causing my application to shut down.  Curiously, when I open drop down menus, as Jack illustrates in the aforementioned thread, I do not see the same behavior.  It's not really clear to me what is causing it to block, but the dropdowns don't.

 

I'm wondering if anyone has any further explanations, or suggestions for workarounds. 

grid size [VI Editor Options] property

$
0
0

Hello Quick question about VI programmatic Editing, specifically the [Editor Options] section.

I have not been able to find the property/method for the block diagram/ front panel 'editor grid size'. In the UI the setting is found on this page:

 

editor options.png

When working with old code, the first thing I do is up these values to the x86 limit (4095) so I only see the origin X,Y lines and not the fine scale grid*. This afternoon I am looking for a way to Mass Edit a .llb or folder of .VIs with VI editor properties/methods but [A] could not find them myself and [B] Could not find anything online about them.

 

NOTE: This post will be managed, I will post any solutions I find in this section, or after 1 week post what else I tried before giving up.

 

* Why don't I just disable the grid? The origin Lines are very useful for my current project, the grid is not. 

Desktop Execution Trace Toolkit "Rules"

$
0
0

Sorry about the vague subject.

 

I've got a memory leak and naturally wish to use DETT to resolve the issue.  However, I continue to receive VI Server is not on or something like that.  I've got 2011 SP1, 2014 32-BIt, and 2014 64-bit installed on my dev machine.  The application I wish to remote DETT is a 2011 app.  When I try to use DETT for localhost, it apparently only "works" for both 2014.  But when running 2011 Dev, it can't find it.  All VI Server setup has been properly done, I can assure you.  I tested against my development because I can't seem to use DETT to remote.  My question: Does DETT have version restrictions?  Do I need to have 2014 RTE running on the remote machine in order to access VI Server?  Or do I need to be using a "2011" version of DETT to accomplish what I wish to do?  Basically, am I seeing version issues?  Or what issue could I possibly be seeing?  I saw an earlier thread for 2011 and the guy mentioned something for DETT that I don't see as an option anymore.  So to me, I think that clearly means that there is a distinct difference between 2011 and 2014 DETT.

threshhold

$
0
0

I want to reduce coefficent of 2D CWT scalogram to zero value below certain threshold. The CWT scalogram is basically a 2D array map.

 

 

Anil Kumar

 

 

web service with asp.net support

$
0
0

Hi,
I am new with labview web service. I have little problem. Could you help me please? For your information, I'm using asphostportal.com hosting and I have windows account that supports .NET 4.5. I want to know if i can use labview web service to do this task or not?

Thank you.

changing the colour in table

$
0
0

hi,

    i need how to change the row and column colours, when  there is a text in table text should be a constant text is equal mean the colour should be change . 


Simple object tracking

$
0
0

Hello, I am very new to labview and I am trying to build a vi that will let me open an .avi video file and track an object's motion throughout each frame of the video.

 

I want to have a box to mark the location of the object for each frame, and I plan to do this by using subtraction to locate the object by subtracting all the values of one frame from the frame before that. This way, after subtraction, the only remaining non-zero values should be where the object has moved to. Additionally, I think I may have to implement some sort of threshold value so only certain values will be tracked, but I have not put this in the vi yet.

 

To read each frame, I used the IMAQ frame reader and put the values of that frame into an array (ImageToArray function). However, I am not sure how to set this up in my vi and everything I have tried ends up in error. Also, I am unsure which function to use to actually mark the location of the fish and how to implement it into my loop. I tried to assimilate the example Object Tracker's vi into mine, but I was a bit confused as to how their vi was structured, and how the functions should fit.

 

 

I have attached what I have so far in my vi, any help or guidance on how I can further build my vi would be greatly appreciated. Also, I am sure there are errors all over my vi, but I am unsure on what to fix so far. Thank you very much!

event structure

$
0
0

How to develop a coding that will count the number of arrow key presses using event structure in Labview?

Shaft Position -- Rounding Errors (Q&R)

$
0
0

Hi fellaws,

 

I am working on a Real Time aplication in which I have to acquire the position of a shaft through a incremental quadrature encoder.  That part I have already implemented. The shaft has attached a rod and can rotate freely towards its saddle. So here I want to set my "Zero Angle" or reference position for the rod, upright.

 

My worries begun when in Real Time code I was using the function "Quotient & Remainder" in order to stablish a valid reference point. I mean, if the shaft rotates more than a revolution, I need that the return value is e.g. 30º and not 390º, and the same in counterclockwise direction.

 

I thought that implementing this with Q&R funtion will work, but then I realized that it drives the simulations towards infinity, so I am looking for help to tweak the code in order to get this done and create an implementation that does not do the same in my RT mpu, and would make my application to fail or break.

 

I am attaching a snippet so you could get the idea os the problem. I was reading some older post in the forum, and there are people discussing so wheter is better to round the input floating point numbers to a set precision, others that you could put a bullet there and convert the DBL to SGL, but here I am looking for a quick and possibly not so dificult solution. In the code, the numeric controls are for simulation purposes.

 

It seems that this piece of code works fine, but I assure you that it drives my simulation vis crazy, and was making my control action went to 600V when it should be 1V.

 

Maybe the solution for how to put a reference in the encoder meassurement is to use another function or maybe it is in the data type or the numeric precisison of the inputs. i will put here also my dissertation when trying to solve this matters.

 

Q&R Rounding Errors.png

 

 

Why do the LabVIEW examples that use the queue design have one loop in the top level and all the others as subvis?

$
0
0

Specifically the Weather Monitor example under connectivity/Web Services and the FPGA design examples.

 

There are several parallel loops. One of the parallel loops will be in the top level VI. The others are all in sub-VIs. After the third example I was looking at it seemed obvious this was being done as a standard, but I don't know why it matters.

 

Why not all of them as SubVIs? Why not all of them as top level loops? (Well OK maybe not that one.)

 

 

How can I represent more than one plot in an only one chart?

$
0
0

Hello everyone,

i got a code where I don't understand how to represent more than two plots, with different scales each, in the same waveform chart.

As brief review:

* 2 adquisition data wired to Bundle

* wire from Bundle to waveform chart.

* options of th chart: stack plots.

 

I've tried to expand the Bundle but the problem is that I'm wiring a 3 element cluster to a 2element cluster chart. I don't understand how to upgrade the chart...

preg2.gif

(there's the two plots in each chart)

 

preg.gif

(there's the code, where I've already tried expanding any bundle and wiring other signals, then wiring the bundle's output to the chart)

 

I think if I could add more scales, it will be possible to plot three plots on the same chart.

preg3.gif

 

Thank you for your time

 

Marcelo A J

 

Viewing all 69758 articles
Browse latest View live


Latest Images

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