Quantcast
Channel: All LabVIEW posts
Viewing all 203621 articles
Browse latest View live

Re: measure time lapsed from reaching threshold to execution

$
0
0

 


 wrote:

Thank you for your explanation.

 

For my experiment, I think I am pretty much done but for learning of how to use LabVIEW, I want to better understand error handling. 

 

I looked everywhere and tried to create the error in and out I circled below (found the image online) but couldn't.  So, I just opened a few random examples and copied pasted it.  Could you tell me where I can find those units? (sorry, my lab computer just crashed so im using my personal laptop to post this question)

post-11742-126892283135.png


Those are terminals for front panel controls.  If you go to the front panel and the Array, Matrix, & Cluster palette, you'll find those controls there.


Re: Error 1 in myRIO LABVIEW 2017

$
0
0

I don't have my "myRIO" currently available, and also haven't installed the myRIO toolkits yet, but if I recall correctly, when the myRIO is connected to your PC via USB, then MAX can "see" it.  It might show up as a Remote System (since that's how it works with LabVIEW).

 

There is also information to be found on the Web (linking back to this Forum).  For example, No myRIO detected.  See if these suggestions are helpful.

 

Bob Schor

Re: measure time lapsed from reaching threshold to execution

$
0
0

My computer finally rebooted and this is what I ended up with.

 

Thank you so much!

hereitis.png

Re: Installing NXG on another drive

$
0
0

I don't recommend symlinking the install itself but I'd be interested in seeing what happens if you symlinked the Addons directory (next to the install, contains libraries NXG ships, examples, driver plugins, etc.) to another drive. I would expect that to be safe, and it probably accounts for a significant portion of the vanilla NXG install.

 

Keep in mind you might experience slower first load times because of this, if it works at all.

 

There may be an official answer on this, just throwing ideas out there. (There may even be a cleaner way to do this through package manager I'm not aware of)

Re: measure time lapsed from reaching threshold to execution

$
0
0

You really still have a potential race condition because you seem to talk to the same instrument in parallel (upper code vs lower code). Since the two code fragments are independent there is no real guarantee what will happen first.

You should create a data dependency to ensure that the two code fragments execute in a defined and desirable order.

You should also only have exactly one instrument string constant if they are all the same. You can branch the wire to the various use locations. (Imagine you have to change the device string because of a change in hardware. In your current code, you would need to make identical changes in N different locations, and if you forget one instance, the resulting malfunction might be hard to track down).

 

 

I also don't understand why you need to take the same AI reading twice in immediate succession. Most likely the result does not change. You probably can eliminate the first I read and the bigger case structure without change in functionality.

 

Nothing is generating any error, so that entire error wire in the shift register never changes its value, so why is it there?

 

Re: Error 1 in myRIO LABVIEW 2017

$
0
0

My myRIO is operating. It starts and I can see values in test. The problem is when I try to build some application on Labview.

Re: About How to develop Xnode

$
0
0
‎09-13-201812:44 PM
 
wiebe@CARYA wrote:

Again in my defense, I'm stuck in 2013, and haven't noticed much change.
Well, gee, nobody notices much change when they're stuck.

Re: Error 1 in myRIO LABVIEW 2017

$
0
0

Using MAX, look at the software installed in your PC and on your myRIO.  Make sure they are compatible (i.e. you don't want LabVIEW 2017 on the PC and 2015 on the myRIO).  You need:

  • LabVIEW (on Host)
  • LabVIEW Real Time Module (on Host)
  • LabVIEW myRIO Toolkit (on Host)

There should be a Getting Started Wizard that configures the myRIO (you may have already done this).  Did you set up your myRIO to use USB when running, or TCP/IP over WiFi?  I thought the Wizard set up WiFi -- I remember having some problems getting communications running with LabVIEW 2016, but I think we got it running, eventually ...

 

Bob Schor


Re: measure time lapsed from reaching threshold to execution

$
0
0

Thank you so much for your comment

 

The error wire and register were something suggested earlier. So i just blindly put them there ( i thought it was in case my machine breaks down or some breakdown) should i just delete it?

 

The AI being read twice was to simulate the amount of time it takes for the voltage cutoff to kick in. I wanted to include the input reading in the time measured. 

 

Regarding the race thing, i guess i will move the sequence ( the bottom half) in another case above. I will post my updated work soon.  Thank you

Re: Community Nugget: Sub-millisecond timing in LabVIEW

$
0
0

LabVIEW 2018 Includes the new function High resolution Wait.vi that is a waitable object based on the high resolution timer exactly as mentioned above. 

 

Thank you NI!


And I stand corrected.  The new function is High Resolution Polling Wait.vi  Its Block diagram is open.  It does not create a waitable timer object as I had been led to believe it does use polling QPC.  Hardware and BIOS can greatly effect the nodes latency CAVEAT EMPTOR!  There are several improvements / Differences with this new node over the attached example in this nugget.

  1. The vi is set to run in any thread and will share its greedy loop iterations across threads and cores
  2. It has been made cross platform so it supports all OS's that LabVIEW Supports
  3. It behaves identical to Wait (ms) on RTOS's  That is, it waits at least "seconds to wait" it never returns prematurely as can happen With Wait (ms) on Windows.

Re: measure time lapsed from reaching threshold to execution

Re: measure time lapsed from reaching threshold to execution

$
0
0

 wrote:

The AI being read twice was to simulate the amount of time it takes for the voltage cutoff to kick in. I wanted to include the input reading in the time measured. 

 


That does not "simulate" anything. If you want to include the AI time, you would simply delete the outer reading and the outer case structure completely (as suggested!) and connect the reading indicator to the inside. Right now you take a reading and if it is outside the threshold you immediately take another reading again. At this point, you already know the result.. Once is enough to get the elapsed time if arranged correctly! It is peanuts to always measure the timing, independent of the comparison. 

 

The correct use of the outer error terminals would be that if this is a subVI and called with an error, ALL code here should be bypassed. In this case you would  place a big case structure around the code and put everything in the "No error" case. Then you would also wire across all the various DAQ Vis, so if they generate an error, the loop should stop and the subVI return the error. It really depends on what you want to happen if things go wrong.

Re: measure time lapsed from reaching threshold to execution

$
0
0

Before moving it into a new case in the upper half of the code, I have a question.

 

The reason I had the outer case structure was to measure the time difference only when the voltage was exceeding the threshold. 

 

The way I have it now probably isn't what you suggested but this is how i interpreted it. The way it's set up now, the time difference reading is continuously updated no mater what. 

hmmm.png

 

The only way I can think of is what I have below, but this obviously returns an error..

 

hmm2.png

Re: measure time lapsed from reaching threshold to execution

$
0
0

This is what would be my final product (including moving the lower half into the upper half)

 

I really appreciate your patience... 

 

hmm 222.png

Re: measure time lapsed from reaching threshold to execution

$
0
0

Use block diagram cleanup.  Too many crooked and hidden wires.


Re: measure time lapsed from reaching threshold to execution

$
0
0

Thank you again..  (my apologies for too many edits.. I've bee spotting little things here and there) 

 

hi thereeeee.png

 

Re: measure time lapsed from reaching threshold to execution

$
0
0

This does not look right, because an "over threshold" would get ignored while any of the other booleans are true. There needs to be a priority. In fact, if any two are true (one button and the overvoltage at the same time), you'll execute the empty default case.

 

 

Re: measure time lapsed from reaching threshold to execution

$
0
0

I pushed the voltage reading and comparison to threshold to the top (case 1).  Is this what you mean by prioritizing the threshold comparison?  

 

The mechanical action is set such that it latches when pressed.  I don't think I can have more than one being true simultaneously. 

 

I see your point.  I turned on the "highlight execution" and held two of the buttons. (so two of the inputs are True).  I noticed that the output of "Boolean Array To Number" was 192 and that led to triggering "default."  

 

Although this wont ever happen in my experiment, I would like to know how you would prioritize the voltage reading compared to the threshold.  

 

 please.png

 

Re: measure time lapsed from reaching threshold to execution

$
0
0

If the overthreshold is the highest bit, you could make its case 128 ...... which will give that case no matter which other buttons are pressed.

 

You might also consider using search 1-D array for the first true, and the index will be what drives the case structure.

Record data at every 50ms

$
0
0

How to record the data at every 50ms?

Viewing all 203621 articles
Browse latest View live


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